Has anyone tried to use accompanist permissions wi...
# compose-android
c
Has anyone tried to use accompanist permissions with special permissions like
android.permission.PACKAGE_USAGE_STATS
? I have... and no luck in getting it to work. Open to any pointers...
c
The user has to manually grant it through the settings.
> NOTE: Most methods on this API require the permission android.permission.PACKAGE_USAGE_STATS. However, declaring the permission implies intention to use the API and the user of the device still needs to grant permission through the Settings application.
https://developer.android.com/reference/android/app/usage/UsageStatsManager.html
c
Gotcha. Didn't know if maybe there was still a way to "observe" the value of that permission in my composable
a
@Colton Idle i dont remember the implementation of accompanist permission but permissions on android are not observable. accompanist is probably checking if the app/lifecycle was moved to foreground and emit the permission state. if accompanist doesn't work for the particular permission you need, what i said above is one way to fake the observability.
c
will probably go that route. thanks for the pointer
👌 1