Condition for "app in foreground" (oreo).

Post your questions and help other users.

Moderator: Martin

Post Reply
wfrcrd
Posts: 116
Joined: 27 May 2015 08:57

Condition for "app in foreground" (oreo).

Post by wfrcrd » 11 Mar 2019 10:49

Ho to everyone,
I've looked around on the previous topics but I was not able to find the answer.
Sorry if you have already solve it.

On kitkat a condition "app running" with the app in foreground and the screen off was correctly recognize it,
but in oreo it seems not working anymore.

There's a way to check if an app is in foreground when the screen is off?

Thank you in advice!

EDIT:
Sorry, I've not considered the screenlock, wich was disabled when I was using kitkat.
I will work on it.

anuraag
Posts: 371
Joined: 24 Jan 2015 02:06

Re: Condition for "app in foreground" (oreo).

Post by anuraag » 11 Mar 2019 10:58

Known issue http://automagic4android.com/forum/view ... f=5&t=6085
Condition App Process Running can only detect Automagic itself but not whether other apps are running (this was a security feature introduced with Android 5.1.1, the existing workaround does not work anymore). No workaround known.
http://automagic4android.com/forum/view ... f=5&t=6943
Condition Service Running can not detect services of other apps anymore. This is a new restriction from Google. No workaround known.

wfrcrd
Posts: 116
Joined: 27 May 2015 08:57

Re: Condition for "app in foreground" (oreo).

Post by wfrcrd » 11 Mar 2019 14:49

Thank you . :(

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Condition for "app in foreground" (oreo).

Post by Desmanto » 11 Mar 2019 15:14

Not working anymore. If you have root, you can use the alternative by parsing data from dumpsys : viewtopic.php?f=5&t=7557
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

wfrcrd
Posts: 116
Joined: 27 May 2015 08:57

Re: Condition for "app in foreground" (oreo).

Post by wfrcrd » 12 Mar 2019 10:51

Desmanto wrote:Not working anymore. If you have root, you can use the alternative by parsing data from dumpsys : viewtopic.php?f=5&t=7557
Thank you so much , it works!

Wibbly
Posts: 418
Joined: 17 Mar 2014 09:02

Re: Condition for "app in foreground" (oreo).

Post by Wibbly » 12 Mar 2019 11:30

For what it's worth the condition App Task Running is working for me on a Pixel 2 running Pie

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Condition for "app in foreground" (oreo).

Post by Desmanto » 12 Mar 2019 15:53

App Task Running still works, but condition service running doesn't work anymore since Oreo. Some app use background service and can't be detected by App Task Running. I used to use the dumpsys to check if certain service is still running or not. But now, the app has been working properly, so I don't use it anymore.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Post Reply