Wednesday, August 20, 2014

Setting up mobile development

How to configure Ionic on Windows

1. Download and install nodejs
This install an utility called 'npm'. 'npm' is Nodejs Package Manager. Make sure 'npm' directory is in available in PATH
2. Install Apache Cordova. Run "npm install -g cordova"
Apache Cordova is open source version of Adobe PhoneGap. 
3. Install Ionic. Run "npm install -g ionic"
Make sure both Cordova and Ionic package directories are available in PATH. In my case, 'npm' install this in 'C:\Users\<<User>>\AppData\Roaming\npm' directory

To create a sample Ionic Application (called 'todo'), execute following commands:
ionic start todo blank
cd todo
ionic platform android
ionic emulate android

The last command should start an Android emulator. However, there are sometimes teething issues that need to be handled. Emulator is chronically slow and appears to be not working without the execution of steps below.

1. Intel's virtualization technology should be enabled in BIOS
2. Make sure "Intel x86 Emulator Accelerator (HAXM Emulator)" is installed through Android SDK manager. The package setup needs to be executed separately as installing it through SDK manager doesn't install it.
3. While creating AVD through AVD manager, enable "Use Host GPU".

In next blog, we will hook an Ionic app to Google Cloud based app.

No comments:

Post a Comment