[android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Efi Merdler-Kravitz
but the widget is still on screen and it's working, so it's not fully terminated, what part of it is being terminated ? On Oct 15, 6:40 pm, Kostya Vasilyev kmans...@gmail.com wrote: What this means is... Android decides that your process isn't important enough to keep around, so it gets

Re: [android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Mark Murphy
On Sat, Oct 15, 2011 at 12:49 PM, Efi Merdler-Kravitz efi.merd...@gmail.com wrote: but the widget is still on screen and it's working, so it's not fully terminated, what part of it is being terminated ? Your process. The home screen is not your app. The home screen runs in its own process. The

[android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Studio LFP
A widget on the home screen is just a cached view that is shown there. Since the widget is a BroadcastReceiver with disconnected UI, it only runs when an action happens. Once it deals with the action, and updates a RemoteView object which it sends to the system, it dies. A widget is not

Re: [android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Mark Murphy
On Sat, Oct 15, 2011 at 1:05 PM, Studio LFP studio@gmail.com wrote: To support a widget for long process, you might want to start up a service and do whatever you need to do there. Once you have the new data or whatever you were trying to get, you can send an intent broadcast to tell your

Re: [android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Studio LFP
True, I just usually have all the display update code in the widget itself, so instead of duplicating it, I just send an update intent to the widget. Either way, to maintain only one set of display update code, you'd either have to have the widget start the service (even when not needed) or

[android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Efi Merdler-Kravitz
Thank you for the answer. Even when Android removes my process, it still keeps my static state, i.e. static variables, is it a bug in Android ? On Oct 15, 8:48 pm, Studio LFP studio@gmail.com wrote: True, I just usually have all the display update code in the widget itself, so instead of

Re: [android-developers] Re: No longer want meaning when implementing an app widget

2011-10-15 Thread Mark Murphy
On Sat, Oct 15, 2011 at 7:06 PM, Efi Merdler-Kravitz efi.merd...@gmail.com wrote: Thank you for the answer. Even when Android removes my process, it still keeps my static state, i.e. static variables No, it does not, by definition. If your static variables are intact, the process was not