Reputation: 1788
Is it possible using the Cordova camera API to take a picture and then store it locally in the camera roll on iOS and Android? I know its possible, but does it involve native code somehow or can it be done in pure HTML? The documentation doesn't say anything about this.
Upvotes: 2
Views: 7941
Reputation: 151
Simply add saveToPhotoAlbum: true
in cameraOptions
param.
For example
navigator.camera.getPicture(onPhotoDataSuccess, onFail,
{
quality: 50,
destinationType: destinationType.FILE_URI,
saveToPhotoAlbum: true
});
saveToPhotoAlbum
is set to false
by default.
Upvotes: 15
Reputation: 1043
Do you mean the device's gallery?
If so, just use FILE_URI for Camera.DestinationType option.
Reference: http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html#cameraOptions
Upvotes: 1