Question

How can I start the default Photo-App of a device using phonegap and get back the fileneam, where the photo is saved? Or alternatively, give it a file name to save it to? For example, if the user taps "take picture", then his phones photo app will be started, he takes a picture, and saves it somewhere. Then the app gets the phots path and save it in a list. It should work on Android, IOS and WP.

Was it helpful?

Solution

Here is an example of how to get the path of the photo which has just been taken:

function get_photo_path(data) {
    var photo_path = data;
    return photo_path;
}

function take_photo() {
    navigator.camera.getPicture(get_photo_path, fail, {quality : 50});
}

Or refer to this: https://stackoverflow.com/a/22156185/3381794

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top