How to stop LocationManager to broadcast the location to BroadcastManager.
Posted
by
SKuamr
on Stack Overflow
See other posts from Stack Overflow
or by SKuamr
Published on 2010-12-23T06:49:14Z
Indexed on
2010/12/23
6:54 UTC
Read the original article
Hit count: 266
Hi i added one Broadcast listener for LocationManager [GPS_PROVIDER] with a pending intent.
so now when i close my application on phone location manager is updating the broadcast listener perfectly... so this is working fine.
Now issue is, i want to stop the LocationManager to update the Broadcast listener... but i am not able to do so... i am again running the application and using locationManager.removeUpdates function to stop it but it still updating the location to Broadcast Manager.
Please help me out... its very urgent...
Thanks in advance..
Started the Location Manager.
Intent intent = new Intent("com.test.geoL.RECEIVE"); //Broadcast Receiver Action PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(),0, intent, 0); locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, pendingIntent);
© Stack Overflow or respective owner