[SOLVED] Camera plugin restart App on Android

Two new things interesting:

  1. It’s easy to reproduce/simulate the problem. To do so, you have to set “always destroy activities” to true in the developer settings of your Android phone. Doing so, each time you gonna take a photo, your app in the background gonna be killed and recreated (as cordova does when an Android phone is running on low memory)

  2. I was wrong, the RESUME event is trigged. See following post to see how to catch it document.addEventListener event resume provider undefined

  3. UPDATE but that isn’t enough if you are using the cordova-plugin-facebook4 plugin. In such a case, the resumed event gonna be null. To handle correctly the resumed event value you have to modify/tweek a line of code in \platforms\android\CordovaLib\src\org\apache\cordova\CordovaInterfaceImpl.java see the amazing discovery of @peterPP1 on stackoverflow https://stackoverflow.com/a/46883936/5404186