About Android Runtime and Framework Connection

24 views
Skip to first unread message

mak

unread,
Feb 2, 2009, 4:36:28 PM2/2/09
to android-platform
Hi All,

1. I am able to run Test GPS Map Application on Emulator.
While Installing on Target, it is getting installed and I can see
that GPS related functions are getting register in AndroidRuntime.cpp
from register_android_location_GpsLocationProvider. As I need to test
my LBS implementation i.e. below the framework which talks to pro-
prietary GPS Stack to communicate with Vendor GPS Chip.

I have put up some printfs into GpsLocationProvider.cpp, As
GpsLocationProvider.cpp has init/start/stop/cleanup/disable functions
which are getting register with JNI Register. I am not seeing that any
of this functions are getting call from Application.
Is this my understanding right ? It is supposed work as below:

GPS Test Appilcation (.apk)->JAVA Packages->JNI(AndroidRuntime.cpp)-
>Framework(GpsLocationProvider.cpp)->LBS Interface(gps.cpp)->GPS Stack
(Vendor Specific)->Kernel Driver(UART/USB)->Hardware.


2. Is there anyway I can do more debugging on above things using SDK
or Emulator with putting some printf ?

Let me know your inputs on this.

Regards,
_-_Mayank Rana_-_

Urs Grob

unread,
Feb 2, 2009, 4:51:44 PM2/2/09
to android-...@googlegroups.com
I would use LOGD instead of printf. You can use it of you include
JNIHelp.h. If not, you'd have to #include <utils/Log.h>. LOGD works
the same like printf so you can replace it. I think there's even LOGI,
LOGW and LOGE, ....

Also you have to #define LOG_TAG "xyz" to make the log messages apear in logcat.

try looking in existing libraries how they implement logging. (e.g.
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=libs/ui/Camera.cpp)

-- Urs

mak

unread,
Feb 3, 2009, 2:42:51 AM2/3/09
to android-platform
Here I used LOGD only. I mean that I am putting some debug messages in
the code which I am not able to see. As I mentioned that I am only
able to see that It is getting register but not getting called those
registered functions.



Regards,
_-_Mayank Rana_-_

On Feb 3, 2:51 am, Urs Grob <grob....@gmail.com> wrote:
> I would use LOGD instead of printf. You can use it of you include
> JNIHelp.h. If not, you'd have to #include <utils/Log.h>. LOGD works
> the same like printf so you can replace it. I think there's even LOGI,
> LOGW and LOGE, ....
>
> Also you have to #define LOG_TAG "xyz" to make the log messages apear in logcat.
>
> try looking in existing libraries how they implement logging. (e.g.http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;...)
>
> -- Urs
>
>
>
> On Mon, Feb 2, 2009 at 10:36 PM, mak <mayank.rana...@gmail.com> wrote:
>
> > Hi All,
>
> > 1. I am able to run Test GPS Map Application on Emulator.
> > While Installing on Target, it is getting installed and I can see
> > that  GPS related functions are getting register in AndroidRuntime.cpp
> > from register_android_location_GpsLocationProvider.  As I need to test
> > my LBS implementation i.e. below the framework which talks to pro-
> > prietary GPS Stack to communicate with Vendor GPS Chip.
>
> > I have put up some printfs into GpsLocationProvider.cpp, As
> > GpsLocationProvider.cpp has init/start/stop/cleanup/disable functions
> > which are getting register with JNI Register. I am not seeing that any
> > of this functions are getting call from Application.
> > Is this my understanding right ? It is supposed work as below:
>
> > GPS Test Appilcation (.apk)->JAVA Packages->JNI(AndroidRuntime.cpp)-
> >>Framework(GpsLocationProvider.cpp)->LBS Interface(gps.cpp)->GPS Stack
> > (Vendor Specific)->Kernel Driver(UART/USB)->Hardware.
>
> > 2. Is there anyway I can do more debugging on above things using SDK
> > or Emulator with putting some printf ?
>
> > Let me know your inputs on this.
>
> > Regards,
> > _-_Mayank Rana_-_- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages