friends,
i have created an application in which i am getting GPS location onCreate Method and
onPause method i remove Location updates.
after taking gps update i left my mobile idle and whole night it was in idle mode and my application was running in it, in the morning bettery was down due to GPS i guess.
any one guide me how to handle this situation in which method should i stop using GPS if application is idle other than onPause()?
any help would be appreciated.
If you stop receiving broadcasts (thus unregistering your BroadcastReceiver in the onPause() method of your activity), there is no reason why your application would keep receiving updates from the LocationManager.