0

In my application, I have implemented GCM and I want to show an AlertDialog or Open Application's Activity depending upon the state of my Application, i.e. if my application is at Foreground state then upon clicking on Notification I want to display an AlertDialog and if the Application is in Background state then the Notification should launch my Application.

Please let me know is there any way through which I can check the Applications status on clicking Notification.

I want to know that from Notification Area on from the Application

Thanks in Advance

Abhishek Dhiman
  • 1,631
  • 6
  • 25
  • 38
  • Closed this question as it's duplicate of [check android application is in foreground or not?](http://stackoverflow.com/questions/8489993/check-android-application-is-in-foreground-or-not). – Paresh Mayani Jul 19 '14 at 07:39
  • @Paresh I want to check that from Push Notification's Click not from inside of my Application – Abhishek Dhiman Jul 19 '14 at 07:41
  • Just try to implement and update with your R&D, as of now it's look almost similar issue. – Paresh Mayani Jul 19 '14 at 07:42
  • And given questions links in comments are almost similar to your issue. Look into it and try to implement by your own! – Paresh Mayani Jul 19 '14 at 07:44
  • I have asked here because I have done R&D for it. Else I'll not post a similar question again. – Abhishek Dhiman Jul 19 '14 at 07:44
  • Check: [Determining the current foreground application from a background task or service](http://stackoverflow.com/questions/2166961/determining-the-current-foreground-application-from-a-background-task-or-service). Isn't it a same? – Paresh Mayani Jul 19 '14 at 07:45

0 Answers0