1

Im using childbrowser plugin for phone gap in my android application to view my external site. Is there a way to activate camera on a button tap on that external site ? I tried adding code bellow to my on button tap function but it doesnt work.

    pictureSource=navigator.camera.PictureSourceType;
    destinationType=navigator.camera.DestinationType;
    navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
    destinationType: destinationType.DATA_URL });
    function onFail(message) {
        alert('Failed because: ' + message);
    }
    function onSuccess(message) {
        alert('Success because: ' + message);
    }

And to run childbrowser(which works fine) I use:

window.plugins.childBrowser.showWebPage(_url, { showLocationBar: false }); 
dinodsaurus
  • 4,937
  • 4
  • 19
  • 24

1 Answers1

0

The ChildBrowser is not supposed to expose the native functionality.

Is there a reason why you don't load directly the content from your remote site into the PhoneGap view?

Vlad Stirbu
  • 1,732
  • 2
  • 16
  • 27
  • Im using googles js OAuth to login into my application, and on success it redirets me to my online application. – dinodsaurus Feb 20 '13 at 14:00
  • if your app in online why don't you load it directly the remote url using `super.loadUrl(remoteURL)` and include the cordova.js there. it will have access to the native functionality. – Vlad Stirbu Feb 20 '13 at 14:33