I have a hybrid application developed using Apache Cordova, within that application I am using " inappbrowser ". Now the requirement is to open Camera or Gallery from the inappbrowser, I am not able to figure out how to achieve this.
For developing this application I am using backbone.js, JQuery, bootstrap.js.
Here is the code snippet of Backbone's View :
var mainScreenView = Backbone.View.extend({
el: $('.panel'),
templateMainScreen: _.template($('#templateOne').html()),
events: {
"click #inputBtnSubmit": "openWebView",
"click #clickSettings": "openSettings"
},
initialize: function(){
this.render();
},
render: function () {
alert($(this.el).find('.panel-body'));
var bindElement = $(this.el).find('.panel-body');
bindElement.html(this.templateMainScreen());
return this;
},
openWebView: function () {
var textValue = $('#inputValue').val();
cordova.InAppBrowser.open('**Link to an external webpage which asks for Camera or Gallery control** ', '_blank', 'location=no');
// After inappbrowser is called to load a external webpage (On a button click Camera Intent or Gallery should open)
}
});
var appView = new mainScreenView;
Thanks in advance.