[android-developers] Re: Re-register AlarmManager events on upgrades
Thanks that sounds good --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Re-register AlarmManager events on upgrades
On Wed, Mar 18, 2009 at 4:36 AM, Dianne Hackborn hack...@android.com wrote: Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was due to an update, and allow this broadcast to be received by the app to restart itself. This cupcake thing very much reminds me of Duke Nukem Forever... --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Re-register AlarmManager events on upgrades
On Wed, Mar 18, 2009 at 3:47 AM, Stoyan Damov stoyan.da...@gmail.com wrote: On Wed, Mar 18, 2009 at 4:36 AM, Dianne Hackborn hack...@android.com wrote: Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was due to an update, and allow this broadcast to be received by the app to restart itself. This cupcake thing very much reminds me of Duke Nukem Forever... Really? You think Cupcake is not going to ship in the next 12 years? --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Re-register AlarmManager events on upgrades
On 18 Mrz., 16:56, StefanK skyntc...@gmail.com wrote: Often when you use AlarmManager, you have to also register to for TIME_ZONE_CHANGED event to account for cases when the phone moves to a different time zone. As it turns out it appears that those are sent every time the phone updates its time form the cell tower (several times a day) so if you register for TIME_ZONE_CHANGED you can use it to reschedule your tasks automatically on next event. It is not perfect but it works. (This is what we use in BeyondPod podcatcher) I did this too The problem is that it may never be called if a user doesn't use automatic time updates. Until cupcake is available i fixed it by storing the version string as a preference and told my users to start the app once after updating it. In case the stored version doesn't match the current version i do re- register. --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Re-register AlarmManager events on upgrades
Hi I have the same problem. As far as I know the only way is to set a Service to start after the installation is done. Maybe you can put a service that runs once (not really a service hehe) that it will be initiated after the installation is complete, set up the alarms and end the service. Other thing you can do is to react to the android.permission.RECEIVE_BOOT_COMPLETED so next time the user reboots the phone you can re-register the alarms. Hope it helps. Daniel On Mar 17, 7:27 pm, Michael Bollmann michael.bollm...@googlemail.com wrote: I read that the AlarmManager looses all registered intents if case the application that registered those intents is upgraded. What is the correct approach to re-register those intents considering the user does NOT start the application after upgrading 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Re-register AlarmManager events on upgrades
Fwiw, cupcake will add a new field to PACKAGE_ADDED to tell you if this was due to an update, and allow this broadcast to be received by the app to restart itself. On Tue, Mar 17, 2009 at 3:44 PM, daniel.benedykt daniel.bened...@gmail.comwrote: Hi I have the same problem. As far as I know the only way is to set a Service to start after the installation is done. Maybe you can put a service that runs once (not really a service hehe) that it will be initiated after the installation is complete, set up the alarms and end the service. Other thing you can do is to react to the android.permission.RECEIVE_BOOT_COMPLETED so next time the user reboots the phone you can re-register the alarms. Hope it helps. Daniel On Mar 17, 7:27 pm, Michael Bollmann michael.bollm...@googlemail.com wrote: I read that the AlarmManager looses all registered intents if case the application that registered those intents is upgraded. What is the correct approach to re-register those intents considering the user does NOT start the application after upgrading it? -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~-~--~~~---~--~~ 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---