Open Scoottykun opened 6 years ago
Your code looks okay so not really sure why the event doesn't fire for you 😕 - as for the saveToGallery false
and still saving. Can you provide OS, Android/iOS version and so on to try and reproduce it? Thanks
Hi!
You should register the photoCapturedEvent like this:
`public camLoaded(e: any): void { this.cam = this.camera.nativeElement; this.cam.saveToGallery = false; this.cam.on(CameraPlus.photoCapturedEvent, (event) => { this.photoCapturedEvent(event); });
public photoCapturedEvent(e: any): void { if (isAndroid) { console.log(e.data.android); // the path of the captured file, eg. "/storage/emulated/0/Android/data/COM.YOURAPP.NAME/files/IMG_1535045496885.jpg" } else { console.log(e.data.ios); } }`
Hi, @Scoottykun, were you able to fix this ? If yes, can you show me the code ? Thanks.
Same issue heare, any update??
Solved!, try to change:
const CameraPlus = require('@nstudio/nativescript-camera-plus'); by const CameraPlus = require('@nstudio/nativescript-camera-plus').CameraPlus;
Hey there ! Firstly, thanks for your plugin, it's pretty useful in my project :)
I have an issue though, i can't manage to trigger the photoCapturedEvent event. Here is my code :
main-page.xml
main-page.js
Seems like photoCapturedEvent is never triggered in my case. Could you tell me what i'm doing wrong ?
Plus, All the photos i'm taking are stored in the gallery of my phone, even if i set the property "saveToGallery" to false in my view or in the "takePicture" method... any idea why ?