Android Question Permission error

wineos

Member
Licensed User
Longtime User
Hi, how to solve it? Thank you!

Screenshot_20200304-134441351.jpg
 

JohnC

Expert
Licensed User
Longtime User
You will need to add Runtime permissions to your app:

 
Upvote 0

wineos

Member
Licensed User
Longtime User
You will need to add Runtime permissions to your app:


I want to use the calendar object, and I have read your link, and find difficulties to change the GMap code to Calendar code.

Please help! Thank you so much!
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
Try something like these:

B4X:
    Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_CALENDAR)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        'ok to read calendar
    Else
        ToastMessageShow("No read calendar permission...", True)
    End If

    Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_CALENDAR)
    Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
    If Result Then
        'ok to write to calendar
    Else
        ToastMessageShow("No write calendar permission...", True)
    End If
 
Last edited:
Upvote 0
Top