android - GPS emulator tracks -


i using android emulator ddms simulate movement using gpx file. there 1000 entries in gpx file. however, i'm finding onlocationchanged method being triggered few times during course of entire file. code follows...

locationmanager locationmanager = (locationmanager)    this.getsystemservice(context.location_service);           locationmanager.requestlocationupdates(locationmanager.gps_provider, 1000, 1, mylistener);  mylistener = new locationlistener(){ public void onlocationchanged(location location){     double mylat = location.getlatitude();     double mylon = location.getlongitude();       ...     } ... } 

my understanding of requestlocationupdates being set 1000 should request location update every 1 second provided location more 1m away previous. correct? if so, why retrieving few of lat/lon pairs gpx file? wouldn't retrieving thousand? (the gps data running there constant motion.)

i haven't had luck using emulator locations using gpx, kml, or manually entering lat/long coordinates . in experience, setting location , distance minimums in requestlocationupdates work on real hardware not in emulator.

if using gpx file testing purposes, try setting time , location constraints 0 , 0 see if registers 1000 of points within emulator.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -