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

Android 7 / Android 8 - capture.captureAudio cause No Activity found to handle Intent { act=android.provider.MediaStore.RECORD_SOUND 7

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Node version: v7.9.0

      Cordova version: 7.0.1

      cordova-android version: 7.1.0

       

      Description

      Affected target: Android 7 (sdk = 24), Android 8 (sdk = 26)

      Not affected target: Android 6 (sdk = 23)

      code:

       

      // capture callback
      var captureSuccess = function(mediaFiles) {
          var i, path, len;
          for (i = 0, len = mediaFiles.length; i < len; i += 1) {
              path = mediaFiles[i].fullPath;
              // do something interesting with the file
          }
      };
      
      // capture error callback
      var captureError = function(error) {
          if (error.code) { console.log('Error code: ' + error.code); }
          else { console.log('Error: ' + error); }
      };
      
      // start audio capture
      navigator.device.capture.captureAudio(captureSuccess, captureError, {limit:2});

       

      Android 8 log: "Error: No Activity found to handle Intent { act=android.provider.MediaStore.RECORD_SOUND }"

      while Android 6 can open recorder 

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gssfed GSS FED
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: