Start and check if app running in background

3,031 views
Skip to first unread message

thyfo...@gmail.com

unread,
Jul 11, 2015, 5:56:07 AM7/11/15
to automa...@googlegroups.com
Hi everyone.
I was just wondering, is it possible to start app in background? If so, is it also possible to check if an app is already running in background. App in foreground block doesn't seem to fit all my flows. Thanks for your help in advance.

Automate developer

unread,
Jul 11, 2015, 1:50:11 PM7/11/15
to automa...@googlegroups.com, thyfo...@gmail.com, thyfo...@gmail.com
In Android, an app activity in the background are not considered running, it's paused, and shouldn't really be doing anything.
A true background app, like music player, has a service running in the background.

Automate currently doesn't have a block for check if a service is running, but i can add it.

thyfo...@gmail.com

unread,
Jul 11, 2015, 6:25:26 PM7/11/15
to automa...@googlegroups.com
Thanks for your answer.
It actually seems that what I considered as bg app is indeed a service. There is an app I wanted to automate that has an option to be 'put to background'. I had 2 flows. One turning gps on when this app is in foreground and turning off while not. And the other flow to start the same app only when I start another. Unfortunately what happened was that my app was working as a service in the bg, but was no longer in foreground so the first flow was triggered, etc. It would be awesome if I could check if service is already running in background. Thanks for your help.

ldeb...@gmail.com

unread,
Feb 28, 2016, 4:51:16 AM2/28/16
to Automate
Hello,

It would be great indeed to check if a service is running in background.
I do have the need to validate if music application is running, even if it's not in foreground.

Many thx for your help !

Henrik "The Developer" Lindqvist

unread,
Feb 28, 2016, 1:47:13 PM2/28/16
to Automate, ldeb...@gmail.com
There's no efficient way, except polling, to check running services, and even that likely doesn't work since Lollipop. But i'll test:
http://developer.android.com/intl/es/reference/android/app/ActivityManager.html#getRunningServices%28int%29

jdjs...@gmail.com

unread,
Aug 9, 2016, 6:43:23 AM8/9/16
to Automate
Was this functionality every added to Automate? If so, where is it?

Florian HubSpace

unread,
Aug 9, 2016, 10:47:56 AM8/9/16
to automa...@googlegroups.com, jdjs...@gmail.com

globa...@gmail.com

unread,
Sep 28, 2018, 6:22:05 PM9/28/18
to Automate
Hi, one begginer question... Where I can pick a specyfic aplication to check? In witch block?

Henrik "The Developer" Lindqvist

unread,
Sep 28, 2018, 7:25:23 PM9/28/18
to Automate
Check what? To pick an app use the App pick block.
Reply all
Reply to author
Forward
0 new messages