When I use this code (from this example):
In Android 14 I always get False to HasPermission in the first time, even I set the permission to true.
When I click again, I can see the permission was granted and HasPermission returns True.
How can I get the correct return to HasPermission in first time?
Thanks in advance for any tips.
B4X:
Wait For (GetScheduleExactAlarmPermission) Complete (HasPermission As Boolean)
Log("HasPermission: " & HasPermission)
In Android 14 I always get False to HasPermission in the first time, even I set the permission to true.
When I click again, I can see the permission was granted and HasPermission returns True.
How can I get the correct return to HasPermission in first time?
Thanks in advance for any tips.