Tuesday, January 29, 2013

Re: [android-developers] AppWidgetProvider onDeleted vs onDisabled


On Tue, Jan 29, 2013 at 10:51 AM, Jake Colman <jake.colman@gmail.com> wrote:
I am finding that, on occasion, after I delete my widget from my
homescreen the underlying Service that I use is still receiving alarms
and doing work.  I do all my clean-up in onDisabled and do nothing on
onDeleted.  Is it possible that onDeleted can be called without an
intervening call to onDisabled?

You've verified that the method is definitely not being called? It could be that it's being called and you have a bug, like not deleting the correct alarm or something.

Also, if you're cleaning up a single instance, I think you should use onDeleted. onDisable is for when there are no widgets at all left and you need to clean up some shared state or something.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

--
--
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
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment