M Maciej Member Licensed User Longtime User Jul 16, 2014 #1 Hello, Is it possible to check an Activity state (running, paused, ...) from a foreground service ? Thank you in advance, Maciej
Hello, Is it possible to check an Activity state (running, paused, ...) from a foreground service ? Thank you in advance, Maciej
thedesolatesoul Expert Licensed User Longtime User Jul 16, 2014 #2 Yes, just do IsPaused(Main). Upvote 0
M Maciej Member Licensed User Longtime User Jul 16, 2014 #3 Oups, I forgot to precise : to check the state of an Activity of another Android application (foreground service does not belong to the application I would like to check the state) ... Upvote 0
Oups, I forgot to precise : to check the state of an Activity of another Android application (foreground service does not belong to the application I would like to check the state) ...
thedesolatesoul Expert Licensed User Longtime User Jul 16, 2014 #4 Ok, it is still possible BUT google is going to change the API in the L Preview so be careful with it. http://www.b4x.com/android/forum/th...d-osstats-and-getforegroundapp.34954/#content Upvote 0
Ok, it is still possible BUT google is going to change the API in the L Preview so be careful with it. http://www.b4x.com/android/forum/th...d-osstats-and-getforegroundapp.34954/#content
M Maciej Member Licensed User Longtime User Jul 16, 2014 #5 Thank you ! I have also found this one : http://www.b4x.com/android/forum/threads/get-the-currently-running-activity.39387/ Upvote 0
Thank you ! I have also found this one : http://www.b4x.com/android/forum/threads/get-the-currently-running-activity.39387/
thedesolatesoul Expert Licensed User Longtime User Jul 16, 2014 #6 Yes, that also uses the same API so just to be sure you may want to test on Android L if it works. Upvote 0
Peter Simpson Expert Licensed User Longtime User Nov 15, 2014 #7 thedesolatesoul said: Yes, just do IsPaused(Main). Click to expand... Your reply is a godsend @thedesolatesoul Last edited: Nov 15, 2014 Upvote 0
thedesolatesoul said: Yes, just do IsPaused(Main). Click to expand... Your reply is a godsend @thedesolatesoul