Android Question Use minSdkVersion in manifest for SYSTEM_ALERT_WINDOW permission

ArminKh1993

Active Member
hi
how can i use this permission just for android 10 and up?Because of Google's sensitivity to sensitive permissions and because I have no problems with older Android without this permissions
B4X:
AddPermission(android.permission.SYSTEM_ALERT_WINDOW
in other word i dont want to use or have this permission in older androids
maybe somthing like this
B4X:
AddManifestText(
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" android:minSdkVersion="29"/>
)

is this possible?
is my code correct?
thanks in advance
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
No. There is no such thing. You can only set the maximum version.

However there is no real reason to worry about it. Android 6+ devices do not show the permissions during installation and if you don't request it at runtime the users will never know that your app requests this permission on Android 10+ device.
 
Upvote 0

ArminKh1993

Active Member
No. There is no such thing. You can only set the maximum version.

However there is no real reason to worry about it. Android 6+ devices do not show the permissions during installation and if you don't request it at runtime the users will never know that your app requests this permission on Android 10+ device.

what about android older than 6 ?
i really just need this on android 10
is this b4a limitation? or is how android works?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
As I've answered there is no such thing. This is how Android works.

 
Upvote 0

ArminKh1993

Active Member
As I've answered there is no such thing. This is how Android works.



is these codes not applicable to this topic? can u please have look at this?
https://developer.android.com/guide/topics/manifest/uses-permission-sdk-23-element

at this time at least it's good to make sure that the devices with android older than 6, do not show this permission during installation
 
Last edited:
Upvote 0
Top