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

The camera does not work Android 7.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not A Problem
    • None
    • Master
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: