Hello munzelmann,
using testprovider should work, ddms not (see this thread:
http://groups.google.com/group/android-developers/browse_thread/thread/32c0e799290b4854/44b72dd05fdedd52
).
Try this for manual test:
***
LocationManager lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
lm.setTestProviderStatus(LocationManager.GPS_PROVIDER,
LocationProvider.AVAILABLE, null, System.currentTimeMillis());
lm.setTestProviderEnabled(LocationManager.GPS_PROVIDER, true);
lm.requestLocationUpdates(PROVIDER_NAME, 0, 0, mLocationListener);
Location loc = new Location("gps");
loc.setLatitude(13.32); // just mock values
loc.setLongitude(13.32);
lm.setTestProviderLocation("gps", loc);
***
So at least you should now get updates whenever you call
setTestProviderLocation (I think that's what you were missing). Your
permissions (mock_location and fine_location) are alright.
On Aug 26, 11:59 am, munzelmann <[EMAIL PROTECTED]> wrote:
> Did anybody get the GPS mock provider working?
>
> I tried everything mentioned in this thread, especially:
> - set permissions ACCESS_MOCK_LOCATION and ACCESS_FINE_LOCATION
> - call
> locationManager.setTestProviderEnabled(LocationMananger.GPS_PROVIDER,
> true);
>
> But I still get no location updates.
>
> Then I tried to use ddms to provide locations. I got these log
> messages exactly one time:
>
> 08-26 09:41:04.246: DEBUG/GpsLocationProvider(50): TTFF: 12458
> 08-26 09:41:04.807: DEBUG/LocationSample(613): location changed :
> Location[mProvider=gps,mTime=0,mLatitude=0.0,mLongitude=0.0,mHasAltitude=true,mAltitude=10.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=false,mAccuracy=0.0,mExtras=Bundle[mParcelledData.dataSize=52]]
>
> 0.0/0.0 is definitely the wrong location.
>
> http://code.google.com/android/toolbox/apis/lbs.htmlmentions the
> command "geo" to provide mock locations. I can't find this command.
>
> Therefore I see no way to further develop my application using the new
> 0.9 ADK - which is a pity.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---