10 Oct 2013 11:23 PM #11
sencha app build native
2. To create a packaged build use:
sencha app build package
(copy these files into the www of the cordova/phonegap project)
I have managed to get both methods to work to create an android package for a fairly complex app.
For 2., I followed the cordova (3) documentation by the book & it worked:
Above is a sequence of screen grabs of the project setup.
1. Generated Cordova project
2. Sencha packaged project pasted into the top level www folder of the generated Cordova project
3. The platform-specific output (android apk) after running my .bat file, which is simply:
# Build sencha package ...
# >sencha app build package
# Copy ../build/App/package/* ./www
# Building cordova android package ...
cordova build android
11 Oct 2013 12:05 AM #12
The guide that you posted the link for tells you everything that need to do. I would suggest rereading it. Is there a particular point you are stuck at?
1. Generate your app
sencha -sdk ../builds/touch-2.3.0 generate app MyTestApp mytestapp
2. cd to your apps base directory
3. Create config.xml file in your app root directory. You can find base config.xml here: https://github.com/phonegap/phonegap...www/config.xml
4. Enable support for Cordova (run command)
sencha cordova init com.example.MyTestApp MyTestApp
5. edit cordova.local.properties cordova.platforms=android
6. Package your app. (run command)
sencha app build native
6. apk will be generated to:
mytestapp/cordova/platforms/android/bin/Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: email@example.com
Get more personalized support via a support subscription.
Want to learn Sencha Touch 2? Check out
Sencha Touch in Action
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
When posting code, please use BBCode's CODE tags.
Need to include a test case use:
The official Sencha Fiddle
12 Oct 2013 2:41 AM #13
yes, I followed all steps. but I only found mytestapp-debug.apk in mytestapp/cordova/platforms/android/bin/ folder.
Coz it don't need me providing certification parameters,I guess the apk generated is only for debug,not for production which need signed with a cert.
Last edited by zhazhengyin; 12 Oct 2013 at 3:09 AM. Reason: mistyped
12 Oct 2013 3:07 AM #14
your post is very clear. thanks.
My problem is how to package a production apk. In the picture you posted, only App-debug.apk exists.
According to http://docs.sencha.com/cmd/4.0.0/?pr...tive_packaging, packaging touch app for android need three steps:
- step1 - provisioning , for android, obtain a certificate to sign app
- step2 - create a packing configuration file. (like packager.json which is auto-created by sencha phonegap init command? In this file, I can find some parameters).
- step3 - run packager to create : sencha app package run <configFile.json>
If only Sencha touch application, it's OK. but if I use cordova or phonegap, does these steps need change? there is a note in the guide:
Important Touch 2.3 and later provides support for creating Cordova and PhoneGap apps. If you use Cordova or PhoneGap, refer to Cordova and PhoneGap Apps for information on packaging and emulating.
Maybe I misunderstood the guide coz my poor english.
13 Oct 2013 11:58 PM #15
I have not yet packaged a production version of my own app yet, so what I can say is only theoretical.
Anyone with more accurate experience, please correct where I am wrong.
As I see it, for a Sencha production package, only 2 things need to change:
1. Your packager.json file, change the key-value of 'configurationebug' to 'configuration:Release'
2. Your certificate needs to change to a proper formal certificate (the value for "certificatePath")
For phonegap / cordova I would guess that you also need to change a configuration value in one of the configuration files. I tried to find documentation to build for a release version & there was no obvious configuration file updates that I could find. I found these 2 links from Android:
They can give you an idea of what is required for an Android app. A Sencha phonegap/cordova app is a small sub-section (Android web-view) of an Android app, so some of these items might not be relevant or might already be covered in the Sencha packaging step.
What I would do is create a production version as a test & run it in beta mode while getting a better understanding of what is involved in packaging an Android app before releasing the formal / final Android package.
29 Oct 2013 6:53 AM #16