plyer icon indicating copy to clipboard operation
plyer copied to clipboard

Add a `require_permissions` decorator to use on android methods

Open tshirtman opened this issue 3 years ago • 3 comments

adding the decorator with permissions on a method or function will automatically require the permissions when the method is called.

tested on the gps example, but as it worked, added on the other android implementations using the permissions requested in the buildozer.spec of their example.

tshirtman avatar Jun 13 '21 23:06 tshirtman

Since API 23, Android requires permission to be requested at runtime.

what about this?

kulothunganug avatar Jun 14 '21 09:06 kulothunganug

Since API 23, Android requires permission to be requested at runtime.

what about this?

Hm, we should maybe check if the api level is < 23 and change the decorator to just return the initial method in that situation? Are apps targeting API < 23 still accepted?

edit: https://developer.android.com/distribute/best-practices/develop/target-sdk

When you upload an APK, it needs to meet Google Play’s target API level requirements. New apps and app updates must target Android 10 (API level 29) or higher; except for Wear OS apps, which must target API level 28 or higher.

tshirtman avatar Jun 14 '21 12:06 tshirtman

I am facing an issue microphone is not working with Android 10 or 10+ when api is set to 31 or more

KINGMOHIT avatar Jul 14 '22 12:07 KINGMOHIT