Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova camera plug in for ios #267

Open
kraom opened this issue Feb 11, 2016 · 1 comment
Open

Cordova camera plug in for ios #267

kraom opened this issue Feb 11, 2016 · 1 comment

Comments

@kraom
Copy link

kraom commented Feb 11, 2016

I am installing [email protected] in my mac and I have added the camera plugin also. But I don't know how to configure how To call camera plugin ios?

Note: Xcode version 7.2 Cordova version 6.0.0

Please help me!

@okonon
Copy link

okonon commented Feb 17, 2016

Please look at camera plugin docs:

navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
    destinationType: Camera.DestinationType.DATA_URL
});

function onSuccess(imageData) {
    var image = document.getElementById('myImage');
    image.src = "data:image/jpeg;base64," + imageData;
}

function onFail(message) {
    alert('Failed because: ' + message);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants