You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jacob Weber (JIRA)" <ji...@apache.org> on 2016/08/30 18:26:21 UTC
[jira] [Created] (CB-11785) camera.getPicture fails with "Camera
cancelled"
Jacob Weber created CB-11785:
--------------------------------
Summary: camera.getPicture fails with "Camera cancelled"
Key: CB-11785
URL: https://issues.apache.org/jira/browse/CB-11785
Project: Apache Cordova
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: Android, Plugin Camera
Affects Versions: 2.2.0, 2.1.1
Environment: Samsung Tab 3 with Android 4.4.2
Samsung Galaxy Nexus with Android 4.2.2
Reporter: Jacob Weber
When I call navigator.camera.getPicture on certain Android devices, it immediately calls the error handler with the message "Camera cancelled".
Internally it calls onActivityResult with requestCode=34 and resultCode=0.
This is similar to CB-10246, but I verified that I'm not calling getPicture twice, like in that issue.
It's happening on the devices listed under "Environment", but not on a Nexus 5 running Android 6.0.1 or any iOS device.
Here are the logs, from immediately after calling getPicture. Nothing is logged after I close the camera window.
{code}
(navigator.camera.getPicture called)
08-30 18:14:13.718 1527-1527/com.stifel.investorandroid D/CordovaInterfaceImpl: Sending activity result to plugin
08-30 18:14:13.851 1527-1582/com.stifel.investorandroid W/CordovaPlugin: Attempted to send a second callback for ID: Camera1644792948
Result was: "No result"
08-30 18:14:13.851 1527-1582/com.stifel.investorandroid W/PluginManager: THREAD WARNING: exec() call to Camera.takePicture blocked the main thread for 175ms. Plugin should use CordovaInterface.getThreadPool().
(error callback called with "Camera cancelled")
08-30 18:14:14.304 1527-1527/com.stifel.investorandroid W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
{code}
I'm passing the following options to getPicture:
{code}
sourceType: Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.FILE_URI,
correctOrientation: true,
allowEdit: false,
targetWidth: 1600,
targetHeight: 1600,
quality: 30,
encodingType: Camera.EncodingType.JPEG
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org