cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jcesarmobile (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-11785) camera.getPicture fails with "Camera cancelled"
Date Wed, 31 Aug 2016 12:55:20 GMT

    [ https://issues.apache.org/jira/browse/CB-11785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15452161#comment-15452161
] 

jcesarmobile edited comment on CB-11785 at 8/31/16 12:54 PM:
-------------------------------------------------------------

Not sure if it's a bug on Android, but singleInstance didn't allow to launch Intents in old
android versions, maybe they changed their mind in Android 6.

EDIT: Didn't saw Vladimir already answered.


was (Author: jcesarmobile):
Not sure if it's a bug on Android, but singleInstance didn't allow to launch Intents in old
android versions, maybe they changed their mind in Android 6.

> 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: 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
>              Labels: triaged
>
> 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.mycompany.myapp D/CordovaInterfaceImpl: Sending activity
result to plugin
> 08-30 18:14:13.851 1527-1582/com.mycompany.myapp W/CordovaPlugin: Attempted to send a
second callback for ID: Camera1644792948
>                                                                          Result was:
"No result"
> 08-30 18:14:13.851 1527-1582/com.mycompany.myapp 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.mycompany.myapp 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


Mime
View raw message