Thanks PassionDEV,
As you correctly guessed, the actual problem was with permissions.
This helped:
If FirstTime Then
rp.CheckAndRequest(rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result<>True Then
ExitApplication
End If
rp.CheckAndRequest(rp.PERMISSION_RECORD_AUDIO)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result<>True Then
ExitApplication
End If
…
So these work fine.