Mark, Yes, I meant an "app widget" and, yes, the app widget is being updated via android:updatePeriodMillis and the AlarmManager. The onCreate method is NOT being called following an APPWIDGET_UPDATE since I see those happening elsewhere in my debug log. The AlarmManager is managing several alarms, one of which is every 60 seconds (we've discussed this in a different thread and I will reengineer this in my next release). Since the alarm is triggering so often, it sounds unlikely that the widget was swapped out of memory since it was quiescent and then recreated on account of the alarm having triggered. Having said that, the timestamps for both events (onCreate and the alarm) are identical.
...Jake >>>>> "MM" == Mark Murphy <[email protected]> writes: MM> I assume "widget" means "app widget". MM> In that case, is your app widget being updated, via MM> android:updatePeriodMillis or AlarmManager? MM> if the answer is "yes", then your process is being terminated in MM> between updates, then recreated on the next update, triggering a new MM> Application object and onCreate(). This is perfectly normal and MM> generally beneficial to the user. MM> On Thu, Jan 17, 2013 at 3:40 PM, Jake Colman <[email protected]> wrote: >> >> My application extends the Application class so that I can initialize >> ACRA in the onCreateMethod. My application consists primarily of a >> widget that monitors something and sends a notification when a condition >> exists. If the application or widget is installed and that condition >> already exists at the time of installation, the notification is >> triggered. >> >> I've started getting reports that the notification will trigger at >> random even after it has already triggered correctly. I had the user >> send me my Debug Log with an email telling me when the notification was >> triggered. Based on the timestamps the notification was triggered >> because Application.onCreate was invoked. Why would >> Application.onCreate be invoked by Android after the application and >> widget were already installed and without the user doing anything? >> >> -- >> Jake Colman -- Android Tinkerer >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en MM> -- MM> Mark Murphy (a Commons Guy) MM> http://commonsware.com | http://github.com/commonsguy MM> http://commonsware.com/blog | http://twitter.com/commonsguy MM> _The Busy Coder's Guide to Android Development_ Version 4.5 Available! MM> -- MM> You received this message because you are subscribed to the Google MM> Groups "Android Developers" group. MM> To post to this group, send email to [email protected] MM> To unsubscribe from this group, send email to MM> [email protected] MM> For more options, visit this group at MM> http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

