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
Chrimaeon
06/30/2024, 7:53 AM
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.
Gotcha. Didn't know if maybe there was still a way to "observe" the value of that permission in my composable
a
Alex Styl
06/30/2024, 8:19 PM
@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
Colton Idle
06/30/2024, 8:49 PM
will probably go that route. thanks for the pointer