Unable to open the camera through Cordova
<p>I'm new to Cordova and trying to develop on app for android in which I need to open the Camera. But I'm unable to do. Below is the approach I followed:</p>

<pre><code>var app = {
   initialize: function() {
    this.bindEvents();
},

bindEvents: function() {
    document.addEventListener('deviceready', this.onDeviceReady, false);
},

onDeviceReady: function() {
    app.receivedEvent('deviceready');
    document.getElementById('camera').addEventListener('click',function(e){
        navigator.camera.getPicture(onSuccess, onFail,{
            quality: 50,
    destinationType: Camera.DestinationType.DATA_URL});})
    },
function onSuccess(imageData){
    var image=document.getElementById('myImage');
    image.src="data:img/jpeg;base64,"+imageData;
}
function onFail(message){
    alert('Failed because: '+message);
}
receivedEvent: function(id) {
        console.log(id)
}
};
app.initialize();
</code></pre>

<p>After building and opening with Android emulator Camera is not getting opened. Kindly help me out. Thanks in advance</p>