Android Question error when use Wait For Activity_PermissionResult

hanyelmehy

Active Member
Licensed User
Longtime User
When Try To use
B4X:
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
i get this error
B4X:
An error occurred:
(Line: 0) Wait For Activity_PermissionResult (Permission A
java.lang.Exception: Sub AFTER_SLEEP signature does not match expected signature.
public static void anywheresoftware.b4a.pc.PCResumableSub.afterSleep(int,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception

class java.lang.Integer, class anywheresoftware.b4a.pc.RemoteObject, class java.lang.String, class java.lang.String,
i try this solution with no sucess
B4X:
Dim c As RequestDrawOverPermission 'this is the name of the class
        c.Initialize
        Wait For (c.GetPermission) Complete (Success As Boolean)
        Log("Permission: " & Success)
 

walterf25

Expert
Licensed User
Longtime User
When Try To use
B4X:
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
        Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
i get this error
B4X:
An error occurred:
(Line: 0) Wait For Activity_PermissionResult (Permission A
java.lang.Exception: Sub AFTER_SLEEP signature does not match expected signature.
public static void anywheresoftware.b4a.pc.PCResumableSub.afterSleep(int,anywheresoftware.b4a.pc.RemoteObject) throws java.lang.Exception

class java.lang.Integer, class anywheresoftware.b4a.pc.RemoteObject, class java.lang.String, class java.lang.String,
i try this solution with no sucess
B4X:
Dim c As RequestDrawOverPermission 'this is the name of the class
        c.Initialize
        Wait For (c.GetPermission) Complete (Success As Boolean)
        Log("Permission: " & Success)
Have you tried declaring the runtime permission variable in the activity from where you're calling the permissions?

Walter
 
Upvote 0
Top