Getting a package name from OSLibrary's getRecentTasks (java.util.List)
:sign0163:
For the app I'm making I need to get the package names of the last 4 opened apps. I'm using XverhelstX's OS lib and the command getRecentTasks. My problem is that I don't know how to convert what it returns into the package names of the recent tasks
returns something like this:
[android.app.ActivityManager$RecentTaskInfo@41de32a8, android.app.ActivityManager$RecentTaskInfo@41de3560, android.app.ActivityManager$RecentTaskInfo@41de3808, android.app.ActivityManager$RecentTaskInfo@41de3a10]
Is there a command to get the package names from this?
:sign0163:
For the app I'm making I need to get the package names of the last 4 opened apps. I'm using XverhelstX's OS lib and the command getRecentTasks. My problem is that I don't know how to convert what it returns into the package names of the recent tasks
B4X:
OS.getRecentTasks(4,0)
[android.app.ActivityManager$RecentTaskInfo@41de32a8, android.app.ActivityManager$RecentTaskInfo@41de3560, android.app.ActivityManager$RecentTaskInfo@41de3808, android.app.ActivityManager$RecentTaskInfo@41de3a10]
Is there a command to get the package names from this?
Last edited: