KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am calling the method and expect location updates multiple times: locationManager.requestLocationUpdates("gps",0 ,0, loc_listener); My loc_listener is defined as: LocationListener loc_listener = new LocationListener() { private final String TAG = "xoxoxo.LocationListener"; public void onLocationChanged(Location l) { Intent locationAlert = new Intent("xoxoxo.LOCATION_CHANGED") .putExtra("target_location", l); sendBroadcast(locationAlert); // locationManager.requestLocationUpdates("gps", 0 ,0, this); } public void onProviderEnabled(String p) { Log.i(TAG, "Provider enabled"); } public void onProviderDisabled(String p) { Log.i(TAG, "Provider disabled"); } public void onStatusChanged(String p, int status, Bundle extras) { Log.i(TAG, "Status changed"); } }; Defined as is, I will only get an update once, both on HTC Evo 2.2 and 2.2 + Google API emulator. The hack to get multiple updates is to uncomment the line which registers for updates on each update: locationManager.requestLocationUpdates("gps", 0 ,0, this); Have you guys seen anything like this?
Tags (comma-separated)
Save Edits
Cancel