islam bayome
islam bayome

Reputation: 3

how to make permission for PACKAGE_USAGE_STATS without intervention from the user

i want to make a permission for android manifest this permission is

android.permission.PACKAGE_USAGE_STATS

for make the android system track my app statistics but the problem is that the system doesn't respond to the code in the manifest .

the code is :

<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS"
    tools:ignore="ProtectedPermissions" />

my question is that how to make that without intervention from the user?

Upvotes: 0

Views: 205

Answers (1)

fabc
fabc

Reputation: 182

I do not believe it's possible, or advisable if it is possible, to activate a permission without intervention from the user. That's why it's called a "permission", because you need to request the user's permission in order to access that functionality in Android. For more information regarding permissions, see:
https://developer.android.com/guide/topics/permissions/overview https://developer.android.com/training/permissions/usage-notes

Anything that requires "permission" requires the user's express consent, because it uses restricted data.

Upvotes: 1

Related Questions