Android Question App Permissions

Declan

Well-Known Member
Licensed User
Longtime User
I have an app that I need to autostart once Android has booted.
All works well, But I have a few issues:
I am running Android 5.1 and I need to be able to:
Unlock the Screen (has no password)
Open App Permission Management.
This I need to do from within my code - or the app Manifest

In the attached screen shot, if I tap the "App permission" label twice, my app loads no problem.
I have been looking at this post:
B4X:
https://www.b4x.com/android/forum/threads/addpermission-a-list-of-permissions-in-android.39401/#content
Is there a Manifest setting that I can insert into my app Manifest that will set the above?
Could I add the following to the Manifest:
B4X:
AddPermission(android.permission.DISABLE_KEYGUARD)
If so, what is the actual syntax to add this to the Manifest?
 
Last edited:

Declan

Well-Known Member
Licensed User
Longtime User
Umm, sorry.
Here is the screenshot.
 

Attachments

  • AppPermission.png
    AppPermission.png
    52.6 KB · Views: 188
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Declan

Well-Known Member
Licensed User
Longtime User
Thanks,
Do I place this code in Starter Service or Activity Main?
B4X:
Sub SetShowWhenLocked
   Dim r As Reflector
   r.Target = r.GetActivity
   r.Target = r.RunMethod("getWindow")
   r.RunMethod2("addFlags", 6815872, "java.lang.int")
End Sub
 
Upvote 0
Top