title: How to get the Cordovo navigator object instead of the javascript navigator object?
body: <p>I'm very much new to cordova. I'm trying to create a simple app, where the user is able to take a photo, and that photo is then displayed in an html image tag.</p>
  
  <p>I have ran into a few issues, which I'm finding difficult to solve:</p>
  
  <p>(1) firstly when   running this demo mobile app on android, </p>
  
  <pre><code> navigator.camera.getPicture(onSucess, onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL, sourceType: Camera.PictureSourceType.PHOTOLIBRARY });
  </code></pre>
  
  <p>navigator.camera is retuning null. This is because the browser is referring the navigator object to the javascript navigator object instead of the cordova one. How can I fix this?</p>
  
  <p>(2)   When Running on the android emulator in Visual Studio, I'm getting the following error when trying to assign to the  with the imageUri</p>
  
  <p>code:</p>
  
  <pre><code>function onDeviceReady() {};
  
  
      $("#takePhotobtn").click(function () {
          //  camera plugin code to open camera and display pic.
          navigator.camera.getPicture(onSucess, onFail, { quality: 50, destinationType: Camera.DestinationType.DATA_URL, sourceType: Camera.PictureSourceType.PHOTOLIBRARY });
      });
  
      function onSucess(ImageData) {
          $("#candidatePhoto").attr("src", "data:image/jpeg;base64," + ImageData);
          alert("yes this works updated");
      }
  
      function onFail(message) {
          alert('Failed because: ' + message);
      }
  </code></pre>
  
  <p>error: Failed to load resource: data:image/jpeg;base64,blob:http%3A//localhost%3A4400/c78426c3-2f0e-4b9a-955c-df0005519358 Failed to load resource: net::ERR_INVALID_URL</p>