AutoExit app/script für Android/Aliendalvik

Begonnen von itoss, 04 Jul 2022, 10:37

« vorheriges - nächstes »


Link zum ursprünglichen Thread :

Hi, i am writing on an app that shuts down automatically the android support when no android app is running on Sailfish OS. I thought all android apps have an "android" string in the process name but this adoption was wrong. the script should work relative simple :
AndroidDefaultProcesses=" ..."
ExcludedApps="App1 App2 ...."

for i in $(pgrep -a android | cut -d " " -f2 ); do echo "$AndroidDefaultProcesses" | grep  "$i" || AndroidApp=active ;done
if [[ ! $AndroidApp == active ]]; then
    kill <PID_OF_Aliendalvik> or <aliendalvik shutdown/quit cmd) fi
"pgrep -a android" does not match for android apps cause the android apps do not have any android string in the processname. So i need a command to show all running android processes.


Kurz und knapp : weis jmd wie ich mir alle laufenden Android Apps anzeigen lassen kann ?