Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 66F6C200B80 for ; Tue, 30 Aug 2016 20:27:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 65888160ABA; Tue, 30 Aug 2016 18:27:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B124A160AC5 for ; Tue, 30 Aug 2016 20:27:21 +0200 (CEST) Received: (qmail 99030 invoked by uid 500); 30 Aug 2016 18:27:20 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 98925 invoked by uid 99); 30 Aug 2016 18:27:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2016 18:27:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 784F42C014E for ; Tue, 30 Aug 2016 18:27:20 +0000 (UTC) Date: Tue, 30 Aug 2016 18:27:20 +0000 (UTC) From: "Jacob Weber (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-11785) camera.getPicture fails with "Camera cancelled" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 30 Aug 2016 18:27:22 -0000 [ https://issues.apache.org/jira/browse/CB-11785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacob Weber updated CB-11785: ----------------------------- Description: 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.investorandroid D/CordovaInterfaceImpl: Sending activity result to plugin 08-30 18:14:13.851 1527-1582/com.mycompany.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.mycompany.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.mycompany.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} was: 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} > 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.mycompany.investorandroid D/CordovaInterfaceImpl: Sending activity result to plugin > 08-30 18:14:13.851 1527-1582/com.mycompany.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.mycompany.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.mycompany.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