Okay when user presses logout button what's supposed to happen is:
Basically I need to shut down the service on background. So far so good. Except the service restarts itself over and over again! Even if I kill the program from task manager the service restarts itself. Other programs aren't using the service. Heck even when I deinstalled the program the foreground program information popped up indicating it was STILL there(albeit this I solved by rebooting phone).
This is obviously not acceptable behaviour. When user says he's finished with the program 'least he can expect is for the program to stay down rather than keep eating battery by acquiring GPS signal and sending them to server. The program is not intended to be "once you log in you need to deinstal me and reboot phone to get rid of me!" type of program!
Can somebody help me to get the program shut down when asked to?
Code:
stopService(myIntent);
unbindService(mConnection);
mIsBound = false;
Basically I need to shut down the service on background. So far so good. Except the service restarts itself over and over again! Even if I kill the program from task manager the service restarts itself. Other programs aren't using the service. Heck even when I deinstalled the program the foreground program information popped up indicating it was STILL there(albeit this I solved by rebooting phone).
This is obviously not acceptable behaviour. When user says he's finished with the program 'least he can expect is for the program to stay down rather than keep eating battery by acquiring GPS signal and sending them to server. The program is not intended to be "once you log in you need to deinstal me and reboot phone to get rid of me!" type of program!
Can somebody help me to get the program shut down when asked to?