Android Question Request Permission on click

Addo

Well-Known Member
Licensed User
Longtime User
i am using audio streamer i am trying to request the mic permission when i click on an image

by doing following

B4X:
If rups.Check(rups.PERMISSION_RECORD_AUDIO) = False Then
    
rups.CheckAndRequest(rups.PERMISSION_RECORD_AUDIO)
Wait For Activity_PermissionResult(Permission As String, Result As Boolean)
If Result Then
isaudioactive = Result
Else
ToastMessageShow("error", False)
End If


    
Return
End If

when ever i try to start recording i got illegal exception as is no permission allowed unless i restart my application
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…