Native Android Packaging For Sencha Touch 2 Application

Requirements:

  • Sencha Touch 2 SDK
  • Sencha Tools
  • Sencha Architect 2
  • Tomcat Server
  • Android SDK

Installation Procedure :

  • Install Apache Tomcat(install outside C:\Program Files)
  • Install Sencha Tools
  • In Environment Variables, Set jdk path in JAVA_HOMEi.e Variable Name: JAVA_HOME

    Variable Value: C:\Program Files\Java\jdk1.6.0_18

  • In Environment Variable(System Variable), set Apache Tomcat Pathi.e Variable Name: CATALINA_HOME

    Variable Value: C:\apache-tomcat-5.5.28

  • In Environment Variable(System Variable), Set Classpathi.e Variable Name: CLASSPATH

    Variable Value: C:\Program Files\Java\jre6\lib

  • In Environment Variable(System Variable), Set SenchaSdk Tools Pathi.e Variable Name: Path

    add in Variable Value: C:\Program Files\SenchaSDKTools-2.0.0-beta3;

  • Copy Sencha Touch 2 SDK folder inside the Apache Tomcat Webapps Folder
  • Install Sencha Architect 2 Editor

How to package and run :

  1. Create one project inside webapps of Apache Tomcat
  2. In Sencha Architect, select Nexus S 480 * 800
  3. Add basic components using Drag & Drop features of Sencha Architect
  4. Press Deploy button in Architect which will open one window
  5. Press Package button
  6. Add your variables like application name, application id etc
  7. Copy one icon.png file from any android app and keep inside the project and in packeger.json, give icon name as icon.png
  8. in input path field, give the project path
  9. Create a folder which will contains the generated apks. In output path, give this folder path
  10. Using keytool, generate your keystore file. i.e debug. Keystore
  11. In packager.json file, give the cerficate path as this debug.keystore file path
  12. in Sdk path, give your Android SDK path and select android SDK level
  13. Press package button
  14. Start Tomcat server
  15. Start Android Simulator.
  16. Open command prompt. Go to your SDK path which is kept in Apache Tomcat and in webapps.Then run the command: sencha package run path of the json file::

    The command should looks like below:

    C:\apache-tomcat-5.5.28\webapps\sencha-touch-2.0.0-commercial>sencha package run ..\Listview\packager.json

    Now it will run on simulator..



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s