0
votes

I am totally confused while developing Android application using Sencha touch and Cordova. I am developing application which needs to access camera feature in Android device. I checked all check points.

Check Points:

  • Sencha Touch Command Version - 5.0.1.231

  • cordova version - 4.3.0

  • Sencha Touch Version - 4.2.0

  • Add latest cordova camera plugin

org.apache.cordova.camera 0.3.4 "Camera"

  • In config.xml file,

  • In AndroidManifest.xml file,

  • In app.json file,

"builds": { "web": {"default": true}, "native": { "packager": "cordova", "cordova" : { "config": { // Uncomment the line below and add the platforms you wish to build for "platforms": "android", "id": "com.abc.xyz", "name": "xyz" } } } }, ... "js": [ { "path": "cordova.js", "remote": true },

....

"resources": [
    "config.xml",

....

  • In app.js

requires: [ 'Ext.MessageBox', 'Ext.device.Camera', 'Ext.Ajax', 'Ext.data.JsonP', 'Ext.device.Device', 'Ext.field.File', 'Ext.field.FileInput', 'Ext.device.Connection' ],

    Please help me to find out how to access camera permission in android using sencha touch and cordova.
1
did you added camera permission in config.xml?Amar1989
Ya i added camera plugin but no changePrince of Sweet heart
did you tried adding camera plugin using cmd?Amar1989
Yes i added camera plugin through CLI onlyPrince of Sweet heart

1 Answers

0
votes

Add permission to config.xml:

<feature name="Camera">
    <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
</feature>

If the problem persists, make sure you do all steps correctly