You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/04/28 17:52:48 UTC

[GitHub] [cordova-plugin-camera] breautek commented on issue #722: the application closes after taking a photo

breautek commented on issue #722:
URL: https://github.com/apache/cordova-plugin-camera/issues/722#issuecomment-828656908


   This can be normal behaviour on Android. Please see the Android quirk below.
   
   > Android uses intents to launch the camera activity on the device to capture images, and on phones with low memory, the Cordova activity may be killed. In this scenario, the result from the plugin call will be delivered via the resume event. See the Android Lifecycle guide for more information. The pendingResult.result value will contain the value that would be passed to the callbacks (either the URI/URL or an error message). Check the pendingResult.pluginStatus to determine whether or not the call was successful.
   
   https://github.com/apache/cordova-plugin-camera#android-quirks
   
   Because the application goes into the background, the OS may kill the activity. When this happens, the Cordova application has to reload the webview. It's up to the developer to handle this scenario. Handling this is [explained here](https://cordova.apache.org/docs/en/dev/guide/platforms/android/index.html#retrieving-plugin-callback-results-cordova-android-510).
   
   You can forcefully test this scenario by enabling "Don't keep activites" in the Android developer settings.
   
   Closing as not a bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org