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

The camera does not work Android 7.0

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: Master
    • Labels:
    • Environment:
    • Flags:
      Important

      Description

      javascript
       document.getElementById("paizhao").addEventListener("click",loadImage);
      
               function loadImage() {
                  navigator.camera.getPicture(onLoadImageSuccess, onLoadImageFail, {
               
                      destinationType: Camera.DestinationType.DATA_URL
              
                  });
              }
              function onLoadImageSuccess(imageURI) {
                  var src = "data:image/jpeg;base64," + imageURI;
                  document.getElementById("getImage").src =src;
              }
              function onLoadImageFail(message) {
                  navigator.notification.alert("error´╝Ü" + message, null, "");
              }
      
           <p>
          <input type="button" value="phone"  id='paizhao' />
          <img src="" id="getImage" style="width: 120px;height: 120px;"/>
      </p>
      

      Listen to the incident, tell me exposed beyond app through ClipDate.ltem.getURI () how to solve?

      This question bothered me for a long time, hoping to get your help, thank you

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              a578242325 leekx
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: