[android-developers] Re: " No longer want " meaning when implementing an app widget
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 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 have the
> service issue an update intent to the widget (when needed).
>
> If you use the service on every action on the widget, I'd go with what Mr.
> Murphy said. If you update the display of the widget a decent amount where
> you don't need to fire off the service, I'd go with the code in the widget.
>
> Steven
> Studio LFPhttp://www.studio-lfp.com
>
> On Saturday, October 15, 2011 12:11:28 PM UTC-5, Mark Murphy (a Commons Guy)
> wrote:
>
>
>
>
>
>
>
>
>
> > On Sat, Oct 15, 2011 at 1:05 PM, Studio LFP <studi...@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
> > widget
> > > to update itself.
>
> > Or, just have the service update the RemoteViews via AppWidgetManager
> > directly. No sense in starting up some other component to do something
> > the service can do directly.
>
> > --
> > Mark Murphy (a Commons Guy)
> >http://commonsware.com|http://github.com/commonsguy
> >http://commonsware.com/blog|http://twitter.com/commonsguy
>
> > _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0
> > Available!
--
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
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home