My application consists, for the most part, of an appwidget and a service. The service is triggered by an alarm which kicks it to update the widget's remote views.
I use a singleton class to track the phone's location. The service accesses the singleton's instance to get the current location when the alarm is triggered. If the widget has been configured to track the location dynamically, a different alarm on its own interval will trigger the location instance to be updated with current data. This way the service simply has to access the singleton's instance to get the latest location information. All this is fine and good and appears to be working well. One of my users is claiming that after some period of time using my widget, the widget no longer knows the location. The only way this can happen is my location instance was deleted and recreated. I'm now wondering whether the scope of singleton is caught up in lifecycle issues. I know, by hard experience and asking alot of questions, that I cannot assume that the appwidget remains in scope. I also cannot assume that my service remains in scope. Both of these components can be killed at anytime by Android. I get that. But does that mean that my singleton can be taken out of scope as well? -- 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 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