I wants to determine whether my app is in foreground or background on device. In my app, When i get push notification on device then it is require to me that identify 1. whether app is in background or foreground? 2. What is/was the current/last opened activity of app.
and one more thing, I also wants to find out the check box value(checked/unchecked) of "show notifications" checkbox of app setting(find it by going setting->app manager->select my app from list). According to the value of this checkbox, different code will execute in my app.
Yours help is appreciated,
Thanking you.