Hi NTR
,
Did you solve the problem?

I have the same problem. The LocationManagement only get "gps"
provider in the folder of /data/misc/location, others won't.

Thanks for your help in advanced

On 4月11日, 下午11時39分, NTR <[EMAIL PROTECTED]> wrote:
> I'm trying to make my own mockup location providers, but I just can't
> get them to work. I have the following file structure in the emulator:
>
> /data/misc/location/house/kml
> /data/misc/location/house/properties
>
> The kml file is obtained by saving a path in Google Earth.
>
> Code:
>
> LocationManager locationManager = (LocationManager) getSystemService(
>             Context.LOCATION_SERVICE);
>
> Location location = locationManager.getCurrentLocation("house");
>
> Permissions:
>
>     <uses-permission android:name="android.permission.ACCESS_GPS" />
>     <uses-permission
> android:name="android.permission.ACCESS_ASSISTED_GPS" />
>     <uses-permission android:name="android.permission.ACCESS_LOCATION"/
>
>
>
> Either the location is null, when executing the code in an intent, or
> if I run the code in a service, the following exception is shown in
> the log:
>
> ERROR/JavaBinder(520): java.lang.NullPointerException
> ERROR/JavaBinder(520):     at
> android.server.LocationManagerService.getCurrentLocation(LocationManagerService.java:
> 690)
> ERROR/JavaBinder(520):     at android.location.ILocationManager
> $Stub.onTransact(ILocationManager.java:149)
> ERROR/JavaBinder(520):     at
> android.os.Binder.execTransact(Binder.java:274)
> ERROR/JavaBinder(520):     at android.dalvik.NativeStart.run(Native
> Method)
>
> Once again, any advice? :/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to