Please don't leave a service running forever for this.  Not that it would
guarantee you'd find out, anyway, since there will be times your service
gets killed temporarily.

If you just want to know about changes after you install, you could have an
intent receiver in your manifest to be launched when the broadcast is sent.

On Mon, Dec 13, 2010 at 8:21 PM, Frank Weiss <[email protected]> wrote:

> Since the API apparently doesn't support a synchronous status, here's
> another, somewhat more complicated option. Add a service to your app that
> receives the status updates and stores them in the app's preferences, or
> somesuch. Then your app can get the most recent value synchronously. Note
> that the service would only run when an update is broadcast, but even if
> your app's activities are not in the foreground. The complicated part is
> handling all the corner cases - reboot, app update, etc.
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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