Is there a way for a background thread to determine if an activity within the same process is the current activity?
I have a subscription based application with a trial period that periodically updates information on a background thread. If the background thread detects that the trial period has expired, I want to bring my application to the foreground and notify the user that the trial has ended. I can start the main activity from the background thread using FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TOP when the main activity is not in the foreground or if the main acitivity has started a child activity but I run into problems if the main activity is in the foreground. In this case I need to send it a message. Any help would be appreciated. -- 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 To unsubscribe, reply using "remove me" as the subject.

