Hi,
I'd just like to create to get a location (not tracking, just get the
last postion fixed), but for my mock location provider, I'd like this
fix change time to time.
I tried the old method by creating a new directory under the location
directory but it seems it does not work anymore (as documented by the
way :-) ).
I also add the test providers with the method :
public static void addMyMockLocationProvider(LocationManager locmgr) {
String mocLocationProvider = LocationManager.GPS_PROVIDER;
if (locmgr.getProvider(mocLocationProvider) == null || !
locmgr.isProviderEnabled(mocLocationProvider)) {
locmgr.addTestProvider(mocLocationProvider, false,
false, false,
false, false, false, false, 0, 5);
locmgr.setTestProviderEnabled(mocLocationProvider,
true);
}
}
But I still don't have the position given in KML file I send thanks to
DDMS (or even GPX files) (I import files and then push on the "PLAY"
button when clickable).
I have the folowing error in the logcat:
08-25 19:11:30.926: ERROR/LocationManagerService(52):
isProviderEnabled got exception:
08-25 19:11:30.926: ERROR/LocationManagerService(52):
java.lang.IllegalArgumentException: provider=network
08-25 19:11:30.926: ERROR/LocationManagerService(52): at
com.android.server.LocationManagerService._isProviderEnabled(LocationManagerService.java:
1145)
08-25 19:11:30.926: ERROR/LocationManagerService(52): at
com.android.server.LocationManagerService.isProviderEnabled(LocationManagerService.java:
1131)
08-25 19:11:30.926: ERROR/LocationManagerService(52): at
android.location.ILocationManager
$Stub.onTransact(ILocationManager.java:211)
I can't also succeed in having my current location in the standard
maps application. The system still returns 0, 0 !
Does anyone here can provide a quick step by step solution to have a
mock location provider working ?
Thx !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---