nstudio / nativescript-camera-plus

MIT License
79 stars 50 forks source link

Unable to take new photos when app has been put in background (iOS) #101

Open Lelelo1 opened 4 years ago

Lelelo1 commented 4 years ago

When first running the app with the plugin it works to take pictures that is saved to gallery - and I am notified each time through photoCapturedEvent. However when the app has been put in background and revisited - no photos can be taked.

I get the following log though:

CONSOLE LOG file:///node_modules/@nstudio/nativescript-camera-plus/camera-> plus.common.js:17:0 NativeScript-CameraPlus --- CameraPlus takePic options:,

each time I attempt taking photo. But photoCapturedEvent is not fired and no photo is saved to gallery.

Lelelo1 commented 4 years ago

A workaround I found was to via application lifecycle create a new instance of CameraPlus for each new application resume event

Bezlepkin commented 3 years ago

A workaround I found was to via application lifecycle create a new instance of CameraPlus for each new application resume event

Can I have an example? After all, the instance is created in onCameraLoaded