Hi Marcel, One of the changes in 0.9 is that the mock GPS provider isn't enabled by default. You need to apply mock settings to it to make it available, and also to enable it. Do this with the LocationManager as follows:
locationManager.setTestProviderEnabled(LocationMananger.GPS_PROVIDER, true); locationManager.setTestProviderStatus(LocationMananger.GPS_PROVIDER, LocationProvider.AVAILABLE, null, currentTimeMillis()); For this to work you also need to add the mock location permission to your manifest: <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" /> If you're having trouble finding a compatible GPX file, try pushing manual values (using the manual tab) or importing a KML file (there's plenty of them on the web, or you can make your own with Google Earth). Cheers Reto On 20 Aug, 14:57, marcel-182 <[EMAIL PROTECTED]> wrote: > Hi Nate, > > Could you please supply a working gpx file? I googled some sample gpx > files but "playing" them with DDMS didn't work. > > On 20 Aug., 12:45, Nate <[EMAIL PROTECTED]> wrote: > > > > > I ran into this issue as well I found you can use ddms and a gpx with > > the "gps" provider to achieve a similar test case. > > > On Aug 19, 4:46 pm, marcel-182 <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > after migrating my application from m5 to the new 0.9 SDK I don't get > > > any location updates for the GPS LocationProvider. > > > > The documentation (http://code.google.com/android/toolbox/apis/ > > > lbs.html) says: > > > "Note: By default, the LocationManager currently provides a single > > > LocationProvider called "gps" that simulates a journey between two > > > locations in the San Francisco Bay Area." > > > > What I have done: > > > 1. Added <uses-permission > > > android:name="android.permission.ACCESS_FINE_LOCATION" /> to the > > > AndroidManifest.xml (and of course deleted the old permissions) > > > 2. Implemented a LocationListener > > > 3. Replaced the old request method and Intent / IntentReceiver stuff > > > with this: > > > mLocationManager.requestLocationUpdates( > > > Constants.LOCATION_PROVIDER, // Has the value of > > > LocationProvider.GPS_PROVIDER > > > Constants.LOCATION_UPDATE_MIN_TIME_MILLISECONDS, // 3000 > > > Constants.LOCATION_UPDATE_MIN_DISTANCE_METERS, // 10 > > > mLocationListener); // Which is the LocationListener I implemented > > > > Looks quite accurate but LocationListener.onLocationChanged(Location) > > > isn't called :-(. Any ideas? > > > > Regards, marcel-182- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

