[
https://issues.apache.org/jira/browse/CB-13008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16083074#comment-16083074
]
Mohammed MECHERI commented on CB-13008:
---------------------------------------
I just discovered that on permssion request i get this Exception as well:
E/AndroidRuntime: FATAL EXCEPTION: main
Process:
com.smiladada, PID: 20767
java.lang.RuntimeException: Failure delivering result
ResultInfo{who=@android:requestPermissions:, request=1, result=-1, data=Intent
{ act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity
{com.smiladada/com.smiladada.MainActivity}: java.lang.RuntimeException: start
failed.
at
android.app.ActivityThread.deliverResults(ActivityThread.java:4089)
at
android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
at
android.app.ActivityThread.-wrap20(ActivityThread.java)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
at
android.os.Handler.dispatchMessage(Handler.java:102)
at
android.os.Looper.loop(Looper.java:154)
at
android.app.ActivityThread.main(ActivityThread.java:6119)
at
java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
> Can't record audio
> ------------------
>
> Key: CB-13008
> URL: https://issues.apache.org/jira/browse/CB-13008
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-android
> Reporter: Mohammed MECHERI
>
> So i have a hard time trying to record audio :
> My Code :
> var my_media = new Media("toto.3gp",
> ()=>onSuccess(),
> (err)=>onError(err),
> (status)=>mediaStatus(status)
> );
> console.log(my_media); // Media {id:
> "07053344-6274-09eb-62ca-d63f099f2a4b", src: "toto.3gp", _duration: -1,
> _position: -1}
> my_media.startRecord();
> console.log(my_media); // Media {id:
> "07053344-6274-09eb-62ca-d63f099f2a4b", src: "toto.3gp", _duration: -1,
> _position: -1}
> I made sure that the media object is correctly initialized and it is.
> on Android console i got this:
> 07-10 19:59:20.019 31861-31917/com.phonegap.reacthotloadingtemplate
> E/MediaRecorder: start failed: -2147483648
> 07-10 19:59:20.019 31861-31917/com.phonegap.reacthotloadingtemplate
> E/PluginManager: Uncaught exception from plugin
>
> java.lang.RuntimeException: start failed.
>
> at android.media.MediaRecorder.start(Native Method)
>
> at
> org.apache.cordova.media.AudioPlayer.startRecording(AudioPlayer.java:160)
>
> at
> org.apache.cordova.media.AudioHandler.startRecordingAudio(AudioHandler.java:287)
>
> at
> org.apache.cordova.media.AudioHandler.promptForRecord(AudioHandler.java:543)
>
> at
> org.apache.cordova.media.AudioHandler.execute(AudioHandler.java:118)
>
> at
> org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
>
> at
> org.apache.cordova.PluginManager.exec(PluginManager.java:132)
>
> at
> org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:57)
>
> at
> org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
>
> at
> org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
>
> at
> org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
>
> at android.os.Handler.dispatchMessage(Handler.java:102)
>
> at android.os.Looper.loop(Looper.java:154)
>
> at android.os.HandlerThread.run(HandlerThread.java:61)
> Media Permissions are correctly set by the plugin (Automatically):
>
> <uses-permission
> android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
> <uses-permission android:name="android.permission.RECORD_AUDIO" />
> <uses-permission
> android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
> <uses-permission android:name="android.permission.READ_PHONE_STATE" />
> So what do you think the problem is ?
> [1]: https://github.com/apache/cordova-plugin-media
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]