TBLauncher icon indicating copy to clipboard operation
TBLauncher copied to clipboard

Results list with last accessed apps?

Open ltguillaume opened this issue 1 year ago β€’ 7 comments

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

ltguillaume avatar Aug 09 '22 15:08 ltguillaume

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.

TBog avatar Aug 09 '22 15:08 TBog

πŸ“Œ 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.

TBog avatar Aug 09 '22 16:08 TBog

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.

ltguillaume avatar Aug 09 '22 16:08 ltguillaume

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

TBog avatar Aug 10 '22 14:08 TBog

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! πŸ™‚

ltguillaume avatar Aug 10 '22 14:08 ltguillaume

Not an Android dev, but what about splitting the permission into a companion app, as mentioned in #324?

opk12 avatar Sep 22 '23 13:09 opk12

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" πŸ˜…

ltguillaume avatar Sep 22 '23 14:09 ltguillaume