I am trying to figure out the best way to handle push notifications in a multi-activity application.
What I would like to be able to do is the following:
1. if the application is running in the background, bring the application to the front, keeping the same activity open, and fire an event indicating that a push message was received. It would also be nice to determine which activity is current active in this case
2. if application is not running, launch the application .
#2, launching the application is not an issue, however determining the application state:
Running background, running foreground or not running is the issue I am trying to address.
Thanks in advance