Closed ShawnPavel closed 5 years ago
Seems to be a bug when saveToGallery
is false
. The image asset is created from picturePath
into which the image data was never written.
@bradmartin In this case may be saving the file to temp folder and return that path might help?
From this line of code : https://github.com/nstudio/nativescript-camera-plus/blob/04e55c81271fd7ba17aff990cd811a796f1014bc/src/camera-plus.android.ts#L1479
Seems the saveToGallery === true
is too much in the condition and do not allow to save image data in the file when we use saveToGallery = false
option
@NathanWalker Actually, I would use the line 1597 (after the block mentioned by @AntoineBouquet) and add: this._saveImageToDisk(nativeFile, data);
I'm testing in an angular project (see npm versions below). And when executing the takePicture method with
saveToGallery
set to false like so:this.cameraPlus.takePicture({ saveToGallery: false, confirm: true });
a few things happen that are a bit wonky.First, the confirm dialog isn't shown. Second, the resultant
photoCapturedEvent
is invalid.Here's the debug log: (Note: the console dump is of the
e.data
in the photo capture event)