SinaDeveloper Member Mar 20, 2023 #1 Hello In my app I need to check if another app is open or not I can get the list of running apps on lower versions of Android: B4X: Copy Dim AM As ActivityManager Dim Info() As RunningTaskInfo = AM.GetRunningTasks For i = 0 To Info.Length - 1 Log(Info(i).GetPackageName) Next But this code does not work on high Androids like Android 12. How can I get the list of running applications in all Androids? Do you need a special permission?
Hello In my app I need to check if another app is open or not I can get the list of running apps on lower versions of Android: B4X: Copy Dim AM As ActivityManager Dim Info() As RunningTaskInfo = AM.GetRunningTasks For i = 0 To Info.Length - 1 Log(Info(i).GetPackageName) Next But this code does not work on high Androids like Android 12. How can I get the list of running applications in all Androids? Do you need a special permission?
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2023 #2 It requires a special permission: https://developer.android.com/reference/android/app/usage/UsageStatsManager You need to declare it and enable it in the device settings. Upvote 0
It requires a special permission: https://developer.android.com/reference/android/app/usage/UsageStatsManager You need to declare it and enable it in the device settings.