Bijesh P V
Bijesh P V

Reputation: 798

Android Application user permission conflict with android aar library user permission

How do can we handle android(>=23) user permission, for the following situation.

--Now When the application is running, the user deny permission with never ask again option checked for both Android Application as well as android AAR library.

  • How can user enable the permission?

  • How to handle this issue in the android library?

Since when going to setting in the android device, if we allow location/camera permission only android application permission is getting enabled. The Android library permission is disabled completely.

Upvotes: 0

Views: 899

Answers (1)

bhw1899
bhw1899

Reputation: 87

Providing run time permission check in a library is definitely not a good idea. It couples heavily app and its library. Suppose that you can only ask for permission in a library while you could not implement the callback to deal with it. So the app has to do this instead.

The best practice is to control the run time permission within app. While you can still use some other gentler way to mind the users or app developers that this library needs this permission, like dialog, toast, or even throw an exception in some certain cases.

In a word, the app should manage all the permissions it needs, not the library.

Upvotes: 1

Related Questions