TBLauncher
TBLauncher copied to clipboard
Results list with last accessed apps?
Description
I currently have "Recent history" as initial results list. This does not, however, include all recently accessed apps, since I sometimes trigger apps from within other apps.
Solution
Is there a way to fetch the most recently accessed apps from the system in order to show those in a results list, instead of just those apps that were started by TBLauncher directly?
Alternative solutions
Additional context
I don't know of any way without asking for impossible permissions. But haven't looked into this much.
Accessing the recent activity of a users without consent, could force users to believe that your app is some sort of spyware installed on their device.
π The Solution:
Using UsageStatsManager.queryEvents
Most methods on this API require the permission android.permission.PACKAGE_USAGE_STATS
this is a special permission and not a runtime permission like CAMERA or WRITE_EXTERNAL_STORAGE which can be requested by the app. This is evident, as this is a sensitive permission, accessing userβs personal data, regarding which the user needs to be aware.
My reasoning would be that the permission itself wouldn't be an issue, since 1) TBLauncher makes no network connections, and 2) I consider the "severity" of this permission to be on par with the contacts and the phone permissions.
I do appreciate the difference of those two being a runtime permissions, though, while this one isn't, and the fact that "average" Android users never really see the difference between apps that do or do not require the INTERNET permission.
I consider the "severity" of this permission to be on par with the contacts and the phone permissions.
This is not a permission that can be granted in a popup, like with contacts. I think it might be similar to the "Device Admin" permission.
I'll keep this open for when I have time to investigate the UsageStatsManager API
Yeah, that's what I meant with
I do appreciate the difference of those two being a runtime permissions, though, while this one isn't
Thanks for looking into this! π
Not an Android dev, but what about splitting the permission into a companion app, as mentioned in #324?
Oof I almost forgot about the fact that I created this issue, even though I keep running into this thinking "boy, wouldn't this be nice to have" π