Android Question Opening app settings

stevenindon

Active Member
Licensed User
Hi all,

I have my app running which requires a few permissions (camera, gps, write external). In any case, if the user do not allow permission (to either one of it for 3 times, the request for permission will not pop up anymore). Under such condition, how can i launch my app settings - asking user to enable permission?

* Something similar to B4i -

If App.OSVersion >= 8 Then
App.OpenURL("app-settings:")
End If

* Please see my app settings - attached jpg
 

Attachments

  • permission.jpg
    permission.jpg
    36.7 KB · Views: 178
Last edited:
Solution
B4X:
Dim in As Intent
in.Initialize("android.settings.APPLICATION_DETAILS_SETTINGS", $"package:${Application.PackageName}"$)
Try
  StartActivity(in)
Catch
  Log("Failed to open app settings")
 End Try

stevenindon

Active Member
Licensed User
Thank you Erel. The code above executes and bring me to the 'App Info'... instead of 'App Permission'. Is there any possibilities to go directly to 'App Permissions'?

*Please see attached image file
 

Attachments

  • AppInfo.jpg
    AppInfo.jpg
    35.2 KB · Views: 327
  • permission.jpg
    permission.jpg
    36.7 KB · Views: 314
Upvote 0
Top