the problem is that a user could create multiple app widgets (on the
desktop), in which case the static variable would point to the last
one created...

On Oct 2, 1:38 pm, Dianne Hackborn <[email protected]> wrote:
> You can just have a static variable that the service sets when it is created
> and clears when destroyed.
>
>
>
> On Fri, Oct 2, 2009 at 1:31 PM, sdphil <[email protected]> wrote:
>
> > so is there a way in the outer class to get access to that Service
> > object?
>
> >        context.startService( new Intent(context, UpdateService.class) );
>
> > to start the service, but then how do i get a reference to the
> > UpdateService object that it indirectly creates?
>
> > On Oct 2, 1:17 pm, Dianne Hackborn <[email protected]> wrote:
> > > This is true, because the system will launch the service as needed,
> > outside
> > > of the environment of whatever the container class is.  All of the items
> > in
> > > the manifest are top-level components, owned by the application itself,
> > not
> > > some other class in it.
>
> > > On Fri, Oct 2, 2009 at 1:10 PM, sdphil <[email protected]>
> > wrote:
>
> > > > looking at this example --
>
> > > >http://android-developers.blogspot.com/2009/04/introducing-home-scree.
> > ..
>
> > > > if the inner UpdateService class is not static, it cannot start the
> > > > service.  The ActivityManager complains "Unable to start service
> > > > Intent"...
>
> > > > any ideas why?
>
> > > > tia.
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to