iOS Question user allowed the microphone or no ?

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can use this code:
B4X:
Private Sub TestMicrophonePermission
   If App.OSVersion > 8 Then
     Dim no As NativeObject
     Select no.Initialize("AVAudioSession").RunMethod("sharedInstance", Null).RunMethod("recordPermission", Null).AsNumber
       Case 1970168948
         Log("Undetermined")
       Case 1684369017
         Log("Denied")
       Case 1735552628
         Log("Granted")
     End Select
   End If
End Sub
 
Upvote 0
Top