Saturday, July 28, 2012

Tutorial - Integrate Sencha Touch with PhoneGap for Android

Setup Android Project with PhoneGap
  1. create a folder named "android" in your sencha touch project
  2. use the official tutorial from cordova to create a new android project with eclipse in the newly created folder and add the phonegap configuration to the project -> Setup Android Project with PhoneGap 


Integrate PhoneGap with Sencha Touch 
  1. go to the sencha touch application directory
  2. open the app.json file and change "logger":"no" to "logger":false
  3. add phonegap script to the sencha touch application
    1. copy the cordova-a.b.c.js script to the root directory of your sencha application
    2. open the app.json file and add the script dependency to the "js" key


         "js": [  
           {  
             "path": "sdk/sencha-touch.js"  
           },  
           {  
             "path": "cordova-2.0.0.js"  
           },  
           {  
             "path": "app.js",  
             "bundle": true, 
             "update": "delta"  
           }  
         ],  
      


Run the Project as a Native Application
  1. go to the sencha application folder
  2. open a terminal and build the sencha application with the following command
  3.  sencha app build testing -d android/assets/www  
    
  4. open eclipse - refresh the project and launch it on an emulator or an real device
  5. your sencha touch application is now running as a native application and with all phonegap features available, good job !

3 comments:

  1. Testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing testing

    ReplyDelete
  2. Codeureka.com offers customized onsite Online Training Mobile Application Development for iOS application development for iPhone and iPad Using Objective-C.

    ReplyDelete