In order to restart if stopped by Android
It's for Music widget, when music app is stopped by Android I have to restart it for the controles to be working fine
Unrooted
Is there a way to know if an app is active ?
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Is there a way to know if an app is active ?
It should be partly possible by looking at the list of processes. However i'm not sure in what way it would help in solving the issue.
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Is there a way to know if an app is active ?
if the music app is not in the process list I'll be able to restart the app (from a script or from tasker)
Is it possible to build process list in a script ?
I've seen some example but not in javascript (copied on a script and not working but I assume it must be not the same syntax)
Is it possible to build process list in a script ?
I've seen some example but not in javascript (copied on a script and not working but I assume it must be not the same syntax)
Bruno 

Re: Is there a way to know if an app is active ?
There may be some ready to use APIs although this is discouraged by the system goals (I haven't check this for a while), and ultimately it is always possible to list the content of the /proc directory where all processes have a folder which name is their pid.
Any chance to solve the root issue? Restarting the app based on process check seems convoluted and might be fragile
Any chance to solve the root issue? Restarting the app based on process check seems convoluted and might be fragile

-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Is there a way to know if an app is active ?
I've tried to root but after saying OK, it wasn't.
I can survive : I've set a start of my music app when On screen , with Tasker
I can survive : I've set a start of my music app when On screen , with Tasker
Bruno 
