|
Post by fnllc on Oct 1, 2019 20:31:31 GMT
My app crashes instead of returning an error when trying to record Audio and I denied permission. Wat I expect is the same behavior as with camera. When camera does not have permission, the camera callback is called with status = error.
Log:
I 10/01/2019 16:25:15:364 e64034f0 HttpServer| Process URI: '/app/Fence/record_audio' I 10/01/2019 16:25:15:365 e64034f0 APP| RHO serve: /app/Fence/record_audio I 10/01/2019 16:25:15:365 e64034f0 APP| Params: {"new_or_edit"=>"new"} I 10/01/2019 16:25:15:371 e64034f0 RhodesApplication| Inside runwhen before return I 10/01/2019 16:25:15:371 e64034f0 HttpServer| GC Start. I 10/01/2019 16:25:15:377 e64034f0 HttpServer| GC End. E 10/01/2019 16:25:15:388 e1fdf4f0 AudioCapture| AudioSource error=setAudioSource failed. E 10/01/2019 16:25:15:469 e64034f0 HttpServer| HTTP Server select error: -1
Code:
def record_audio # Settings if System::get_property('platform') == 'APPLE' Rho::AudioCapture.fileName = 'fence_audio_' + Time.now.to_i.to_s elsif System::get_property('platform') == 'ANDROID' Rho::AudioCapture.fileName = Rho::Application.databaseBlobFolder + '/fence_audio_' + Time.now.to_i.to_s end Rho::AudioCapture.maxDuration = 1000 * 60 * 15
Rho::AudioCapture.start({}, url_for(:action => :record_audio_callback, query: { mode: @params['new_or_edit']} ))
end
|
|
|
Post by fnllc on Oct 2, 2019 16:20:16 GMT
|
|
|
Post by Alex Epifanov on Oct 2, 2019 19:18:51 GMT
Thank you for the contribution! We will review your PR shortly.
|
|