Search code examples
androidcordovaandroid-cameracordova-plugins

Android Cordova 5.0+ Camera crash


We are using Cordova 5.0.0 and its cordova-camera-plugin

When we are testing it on Android, the app crashes when the user takes a photo. Looking at the links below, it seems that our app is being killed while the camera app it on front.

PhoneGap camera restarts the application

https://github.com/shaithana/cordova-plugin-wezka-nativecamera

While there are some answers but it seems to be outdated: The foreground camera plugin is not suitable to newer devices or Cordova and other solutions didn't work for us

Does anyone have an up-to-date solution?


Solution

  • Try to use this forked cordova-android and cordova-plugin-camera.

    The docs, sample and discussion on the approach used can be found in the cordova-android PR.

    BTW, the PRs are going to be merged soon.