Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-5517

navigator.device.capture.captureVideo crashes on android 4.4

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      when using navigator.device.capture.captureVideo the app crashes in 4.4 .

      This had been previously fixed in 4.3 to throw and error and retrieve the captured video instead of crashing the app.

      12-02 11:28:56.819: E/AndroidRuntime(25693): FATAL EXCEPTION: main
      12-02 11:28:56.819: E/AndroidRuntime(25693): Process: com.example.test, PID: 25693
      12-02 11:28:56.819: E/AndroidRuntime(25693): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://media/external/video/media/1531 }} to activity

      {com.example.test/com.example.test.Testing}

      : java.lang.IllegalStateException: Do not perform IO operations on the UI thread. Use CordovaInterface.getThreadPool() instead.
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread.deliverResults(ActivityThread.java:3346)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3389)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread.access$1200(ActivityThread.java:135)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1445)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.os.Handler.dispatchMessage(Handler.java:102)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.os.Looper.loop(Looper.java:137)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread.main(ActivityThread.java:4998)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at java.lang.reflect.Method.invokeNative(Native Method)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at java.lang.reflect.Method.invoke(Method.java:515)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at dalvik.system.NativeStart.main(Native Method)
      12-02 11:28:56.819: E/AndroidRuntime(25693): Caused by: java.lang.IllegalStateException: Do not perform IO operations on the UI thread. Use CordovaInterface.getThreadPool() instead.
      12-02 11:28:56.819: E/AndroidRuntime(25693): at org.apache.cordova.CordovaResourceApi.assertBackgroundThread(CordovaResourceApi.java:351)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at org.apache.cordova.CordovaResourceApi.mapUriToFile(CordovaResourceApi.java:130)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at org.apache.cordova.mediacapture.Capture.createMediaFile(Capture.java:378)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at org.apache.cordova.mediacapture.Capture.onActivityResult(Capture.java:334)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:915)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.Activity.dispatchActivityResult(Activity.java:5435)
      12-02 11:28:56.819: E/AndroidRuntime(25693): at android.app.ActivityThread.deliverResults(ActivityThread.java:3342)
      12-02 11:28:56.819: E/AndroidRuntime(25693): ... 11 more

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              trenthennessy Trent Hennessy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: