breautek commented on issue #514: THREAD WARNING: exec() call to Camera.takePicture blocked the main thread for 291ms. Plugin should use CordovaInterface.getThreadPool(). URL: https://github.com/apache/cordova-plugin-camera/issues/514#issuecomment-544656930 > W/PluginManager: THREAD WARNING: exec() call to Camera.takePicture blocked the main thread for 291ms. Plugin should use CordovaInterface.getThreadPool(). Has nothing to do with the camera taking a picture or not. All this states that that method is on the main thread and it blocked it for ~300ms, so it should probably be moved off of the main thread so the phone can still feel responsive. What's more interesting is: > D/CordovaActivity: Stopped the activity. I'm not 100% sure if this is the low memory android quirk as I never actually encountered this situation myself but... > 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 Let me know if this helps.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
