In my app, I need to receive push notification and open the application to do things. I have managed to register with the GCM and received message with IntentService.
I want to know how to do the things below from the IntentService. 1. How to detect if the application is in foreground, background or not running? 2. How to find out the top activity if the app is running (either foreground or background) 3. If it is not running, how to launch it. 4. If it is running in background, how to bring it to foreground Please help. Thanks -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

