Thanks very much for the help, that did it.
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Hi
I have a toggle button which i use to start and stop a service
When i press the button the service starts fine but i cant seem to stop it.
The boolean a in my code below return true but the service keeps running.
What am i doing wrong? any help would be great.
Thanks in advance
toggle =
Do you have any code that binds to this service?
2011/6/20 Boozel boozelcl...@gmail.com
Hi
I have a toggle button which i use to start and stop a service
When i press the button the service starts fine but i cant seem to stop it.
The boolean a in my code below return true but the service
No, i need the service to run independently from the activity
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Ok.
Your code calls startService and stopService with different Intent objects:
toggleIntent vs. toggleMapIntent.
Does the stop intent actually point to the service you want to stop?
If not, you are stopping someone else's service.
-- Kostya
2011/6/20 Boozel boozelcl...@gmail.com
No, i need
sorry i changed the variable names to make it more readable they are
actually both the same intent toggleIntent declared above.
Could it be because the intent would essentially be redeclared each time the
button is pressed with the line Intent toggleIntent = new
Intent(MyActivity.this,
Changing that doesnt seem to help?
Any ideas?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
How are you checking for whether the service gets stopped?
2011/6/20 Boozel boozelcl...@gmail.com
Changing that doesnt seem to help?
Any ideas?
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
The service continues to write to the log
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
Does the service's onDestroy ever get called?
2011/6/21 Boozel boozelcl...@gmail.com
The service continues to write to the log
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
You are responsible for stopping whatever work your service does in its
onDestroy().
You can look at the current state of all actively running services with adb
shell dumpsys activity services. Make sure your service is actually in
there. If it isn't, you aren't cleaning up your worker.
On
11 matches
Mail list logo