• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Servicestop() doesn't stop GPS acquire

tneva82

Newbie
When user press log off button following 2 lines should happen:

stopService(myIntent);
unbindService(mConnection);

myIntent is same intent that was used to start service(desperate attempt to get this working). mConnection is basically straight from android's development center.

I have verified that service's onDestroy gets called. There it sets boolean variable true to make Runnable stop it's course(which among itself starts up gps tracking if certain requirements happen), calls the locationManager's removeCallbacks and finally calls super.onDestroy function.

I thought this was supposed to be enough to stop the service from running and acquiring GPS positions(and likely sends them to server too) but the GPS acquiring symbol is STILL blinking. I presume this is not just graphical error by the phone but that it still is searching(and wasting battery).

What have I done incorrectly? What else I need to do to get the service stop when I want?

Service dying off when android decides off yet staying up when I'm trying to get it closed. Funny world this android. Nothing easy it seems :(
 
Another issue that just came up. Even if I shut down via task monitor the bloody thing restarts again automatically after short period...

What am I doing so wrong?
 
Back
Top Bottom