Integrating Phonegap in Sencha App | Techbirds

Hi readers,

In this blog we will be looking at the possibilities that are provided by Sencha in building your Mobile Applications.

If you use Sencha to build native mobile applications you have two options: 1. Android 2. ios. For Windows, Blackberry you need to provide phonegap support.

Building native application using sencha

I expect you have read tutorial on sencha to build your application. Now to build for native environment you have to edit packager.json as shown in the sencha app structure.

use command

sencha app build -run native

sencha app build -run native

(assuming you are in sencha app folder)

Build using phonegap.

To add phonegap support to your sencha app

use command

sencha phonegap init

This command will have following affect on your sencha app folder

1. phonegap.local.properties file will be created.

2. folder name phonegap (with complete structure of phonegap app)will be created.

3. an entry in .sencha/app/build.xxx for phonegap folder.

Now, first things first

1. edit your phonegap.local.properties file

a. supply the platform to build for

b. supply if you want remote build or local build by making true/false

phonegap.build.remote=false

phonegap.build.remote=false

if you make it false be sure to have appropriate sdk installed

2. use command

sencha ant phonegap-sencha-build

sencha ant phonegap-sencha-build

if you want your changes in sencha app to reflect

or  use command

sencha ant phonegap-build

sencha ant phonegap-build

if you don’t have any of the changes to reflect.

 for list of available commands in phonegap go here #sencha command section

To add phongap plugin

use command from /phonegap directory

phonegap local plugin add

phonegap local plugin add

to see how to work further. It gives example for blackberry. similarly you can go for other platforms.

Hope you find something useful for you in this article. Thanks for reading.

2,071 total views, 1 views today

Share this Onfacebook-1309349twitter-9451952linkedin-3901100google-8815066 Tags: Blackberry Apps, native app, Phonegap, phonegap plugin, sencha, sencha cmd, sencha phonegap, windows app