AutoExit app/script für Android/Aliendalvik

Begonnen von itoss, 04 Jul 2022, 10:37

« vorheriges - nächstes »

itossThemenstarter

Link zum ursprünglichen Thread : https://jollausers.de/thread/1064-autoexit-app-script-f%C3%BCr-android-aliendalvik/

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 :
ZitatCheckInterval=300s
AndroidDefaultProcesses="com.android.systemui com.android.phone android.ext.services ..."
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.

=> https://forum.sailfishos.org/t/autoexit-app-script-for-android-aliendalvik/11987


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