Open AppWerft opened 8 years ago
Were you able to solve this issue? I'm facing the same problem on some devices.
Yes, in new sdk 5.4.0. you can easy request the permissions.
I am using SDK 5.5.0 and tried on SDK 5.4.0 I get
"Uncaught Error: setAudioSource failed." audioRecorder.startRecording
In tiapp.xml I added
`
`
Hi,
in my simple app (android 5-.* Nexus5) comes after 'audioRecorder.startRecording' the error message:
02-03 12:01:59.316 203 822 W ServiceManager: Permission failure: android.permission.RECORD_AUDIO from uid=10231 pid=26728 02-03 12:01:59.316 203 822 E MediaRecorderService: Request requires android.permission.RECORD_AUDIO 02-03 12:01:59.316 26728 26749 W System.err: java.lang.RuntimeException: setAudioSource failed.
Here my code snippet:
Remark: in my manifest is outside of application the entry: uses-permission android:name="android.permission.RECORD_AUDIO"/
I found in /system configuration/apps/myApp/permissions an unset checkbox for microphone. After setting I can start the recorder without problems. I think we need a method audioRecorder.hasMicrophonPermission() and an intent to this configuration of app.
Like this: