-
13 Jan 2013 12:01 PM #1
Unanswered: sencha touch 2.1.0 (Cmd v3.0.0.250) phonegap not working
Unanswered: sencha touch 2.1.0 (Cmd v3.0.0.250) phonegap not working
Hello all,
I'm reading many posts about sencha touch 2.1 and phonegap (Ext.Device)
I'm trying to compile sencha touch 2 app with phonegap without success:
apparently the lib is not loaded at all
I need phonegap for picture upload and I would keep touch 2.1.0 cause it seems
more responsive (for example with maps)
I'm then including file cordova-1.8.1.js (tried also with cordova-2.1.0.js) in the archive
calling it in app.json file
and then a simpleCode:"js": [ { "path": "cordova-1.8.1.js" }, { "path": "touch/sencha-touch.js" }, { "path": "app.js", "bundle": true, /* Indicates that all class dependencies are concatenated into this file when build */ "update": "delta" }, { "path": "sjcl.js" // http://crypto.stanford.edu/sjcl/ },
Code:navigator.notification.alert("Hello");
inside button reports
TypeError: Cannot call method 'alert' of undefined
I have tried to run the app inside Eclipse and android emulator again with no success
could someone help me please with this?
thank you in advance
Alex
-
13 Jan 2013 7:11 PM #2
Hi Alex,
I recently start developing with ST2 and phonegap and, as you, I faced some trouble to get things running, until I start using Brice's tool sencha-cordova-builder (https://github.com/bricemason/sencha-cordova-builder). It's set of bash and ant scripts that aid in the process of creating phonegap projects and later on compiling them.
I recommend looking into it and his videos at Vimeo (http://vimeo.com/bricemason).
Cheers,
Eric
-
22 Jan 2013 1:54 PM #3
thank you, I will have a look and I will let you know
hope it will work!
-
24 Jan 2013 1:25 PM #4
The simple solution is to include the cordova.js in your index.html file. Note, that the way you're trying above it tries to compile the cordova.js with the other files. If you include it in the index.html, it won't compile it, so you will have to ensure you include the cordova.js file in your www directory for your native app.


Reply With Quote