Thanks Kostya, for sharing this information,
I need one more information: If my service class after complition wish
to update the activity class, how can we do it?

I am just a beginner and haven't much knowledge of android.

On Sep 1, 1:24 am, Kostya Vasilyev <kmans...@gmail.com> wrote:
>   One more thing:
>
> Android uses the same Linux process for your WidgetProvider as well as
> service that updates the widget (again, I'm assuming you followed the
> Wikipedia sample).
>
> The WidgetProvider will be created and invoked as necessary, this, in
> turn, should cause your service to be started when you call
> "startService(this, UpdateService.class)".
>
> A task killer is likely to interfere with the first part of this
> sequence - i.e. preventing the WidgetProvider from responding to update
> events in the first place.
>
> -- Kostya
>
> 31.08.2010 23:50, Kostya Vasilyev О©╫О©╫О©╫О©╫О©╫:
>
>
>
>
>
> > If your code is set up along the lines of the Wikipedia sample widget
> > (which it seems to be), and the widget's onUpdate invokes the service
> > with startService, then everything should be fine already.
> > StartService will, obviously, start the service as necessary.
>
> > If there are still problems updating the widget, ask your user to add
> > your service to the task killer's exclude list. Better yet, try to
> > educate the user about the evil nature of task killers, perhaps he/she
> > will stop using them altogether.
>
> > --
> > Kostya Vasilyev --http://kmansoft.wordpress.com
>
> >> 31.08.2010 22:14 О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫ "Alex" 
> >> <maroeb...@gmail.com
> >> <mailto:maroeb...@gmail.com>> О©╫О©╫О©╫О©╫О©╫О©╫О©╫:
>
> >> What is the correct way to ensure that a widget update service is
> >> restarted if it has been killed?
>
> >> In my widget, I start the service in the onUpdate event, but if the
> >> widget and service are killed (by a task killer, for example), the
> >> widget restarts, but the service doesn't.
>
> >> On Aug 31, 6:01 pm, Kostya Vasilyev <kmans...@gmail.com
> >> <mailto:kmans...@gmail.com>> wrote:
> >> >   A Service can still get killed ...
>
> >>http://developer.android.com/reference/android/app/Service.html#Proce...
>
> >> > -- Kostya
>
> >> > 31.08.2010 20:48, Agus О©╫О©╫О©╫О©╫О©╫:
>
> >> > > A thread hosted by the ApplicationContext ...
>
> >> > > On Tue, Aug 31, 2010 at 9:22 AM, Kostya
> >> Vasilyev<kmans...@gmail.com <mailto:kmans...@gmail.com>>  wrote:
>
> >> > >>   The difference is that Activity lifecycle is managed by the
> >> user, and
> >> > >> Service lifecycle ...
>
> >> --
>
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group...
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget 
> --http://kmansoft.wordpress.com

-- 
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

Reply via email to