0

I am developing an android mapping application, using OSMDROID API, I need to get the location of the user once and center the map in that location, I register the current activity to listen to location updates, after the first location is receive, I unregister the listener, the code is

//to regiter to locationchanges
locMgr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 5000, 3, this); 
//to unregister to updates
locMgr.removeUpdates(this);

the code work very fine when I send one location, but If send a KML file to the emulator, I get a blue screen, and If I press back button and enter the same activity again I find the map centered at one off the locations send in the KML file. the question is why I am geting this blue screen and would that hepen if I test the app in a real phisical handset???

Abdalwhab Bakheet
  • 1,133
  • 2
  • 11
  • 17

1 Answers1

0

If you send gps fix from KML file in DDMS, It sends lat \ lon consecutively util KML file end (if you do not control). Please make sure that how did you handle if you get one more gps fix in a seconds. May be blue screen is coming invalid lat / lon. It shows sea on map.

Tushar
  • 56
  • 3