OnNewIntent() is probablythe method you are looking for.

http://code.google.com/android/reference/android/app/Activity.html#onNewIntent(android.content.Intent)

-Ravi

On Dec 26, 2:42 am, Jay-andro <jayan...@gmail.com> wrote:
> I have a service that runs in the background periodically and checks a
> database for some data. If it finds whats it's looking for, it shows
> an Activity to the user to alert him/her of this condition. Next time
> it runs, if the condition still persists I only want to show the
> activity if it is not already on display. So I need to detect if the
> activity is still on display from the last time before deciding to
> show it again. The alert activity is in the same app as the service.
>
> How can I reliably detect that the activity is on display?
>
> (I could track this by setting a global and unsetting it when the
> activity is destroyed (?) but I dont feel that's going to be reliable.
> I'd much rather find out definitively from Android whether the
> activity is showing or not.)
>
> Thanks
> Jay
--~--~---------~--~----~------------~-------~--~----~
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