Sunday, December 26, 2010

[android-developers] How to use a homescreen widget button to shutdown a service?

I have a button whose WidgetProvider kicks off a service with a
PendingIntent. That works just fine. How do I similarly attach an
event handler to the button so that when it is pressed a second time,
it shuts the service down? Is there an appropriate pattern to follow
for something like this?

Thanks.

--
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
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate