Reputation: 1977
I'm looking to STOP Phonegap from saving pictures to the camera roll on iOS.
I've discovered one possible solution, but I don't really like it. The solution requires forking the phonegap API by deleting this line of code.
UIImageWriteToSavedPhotosAlbum(img, self,
@selector(image:didFinishSavingWithError:contextInfo:), nil);
from the capture.m file in the phonegaplib folder (and then rebuilding the phonegaplib.xproj of course).
Anybody have a better solution?
Upvotes: 1
Views: 1528
Reputation: 467
Just use the camera API instead of the capture API. It allows you to specify whether or not you will be saving to the camera roll. http://docs.phonegap.com/en/1.3.0/phonegap_camera_camera.md.html#Camera
options = { limit: 1, "savePhotoToAlbum" : "false" };
Options is one of the parameters you can pass to the getPicture function. It takes an object like the above. The important parameter is the "savePhotoToAlbum". Setting that to false will prevent it from saving it.
Upvotes: 3