-
20 Nov 2012 10:59 PM #1
Native Camera : User has canceled operation
Native Camera : User has canceled operation
Hello,
Im testing out the camera functionality using Ext-device-Camera running on an Android device.
In the app you click a button which launches the camera. Upon success the image should be displayed, however the image is not displayed. The success function is being called though. So I send out the URL to an alert box and the message is "User has cancelled operation".
I am not cancelling the operation. After taking the picture I click on the checkmark which returns me to the app. Any idea what could be causing this? The app is packaged using sencha cmd 3.0xx
Here is the code that launches the camera
Code:onMybuttonTap: function(button, e, options) { Ext.device.Camera.capture({ source: 'camera', destination: 'file', success: function(url) { //show the newly captured image in a full screen Ext.Img component: Ext.Msg.alert('Success', url); Ext.create('Ext.Img', { src: url, fullscreen: true }); } });
-
23 Nov 2012 7:06 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
I have not tried canceling myself, will have to check that out.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Nov 2012 2:18 AM #3
Hi Mitchell,
Thank you for the reply. I would just like to clarify that I am not cancelling the operation. The actual sequence is as follows:
1 - Click button to launch the camera
2 - Take picture
3 - Click the check mark to complete the operation (on Android the checkmark is the Ok/Done button in this context).
4 - Returns to the app
5 - Display alert box containing the URL of the image returned by the camera function (for debugging).
6 - The URL for the image is "User has canceled operation"
7 - Obviously the image is not displayed since there is no proper URL returned.
I am using the basic camera code from the documentation. Let me know if you need any further information.
Thank you


Reply With Quote