Creating a Android application using ionic framework.

Ionic is a framework which is an open source tool for developing hybrid mobile applications. Ionic framework is build on top of cordova. Hybrid mobile applications are nothing but mobile applications which are build using HTML, CSS, and JavaScript. Follow the simple steps to create a Android App and run it in your android device.

First, install Node.js  - from the link https://nodejs.org/en/

Open command prompt:

In RUN (Window+R in windows), enter the command cmd to open command prompt. Navigate to the folder location you want to build your application.

Enter the following commands in Command Prompt:

Installing Ionic via commandline...

npm install -g cordova ionic

1.PNG

2.PNG

Starting an ionic project:

Start a ionic project using the predefined app templates...

ionic start -a MyfirstApp -i com.MyfirstApp.App MyfirstAndroidApp tabs

3.PNG

4.PNG

If you need to start with a blank templete then,

ionic start -a MyfirstApp -i com.MyfirstApp.App MyfirstAndroidApp blank

In order to add platform to the created ionic project it navigate to the app folder using,

cd MyfirstAndroidApp

6.PNG

7.PNG

Add the platform into the ionic app using,

ionic platform add android

9.PNG

Build the project using,

ionic build android --device

12.PNG

Run the App in Andrid device:

    In order to emulate or run the app in device follow the steps,

  • Connect your mobile via data cable and enable USB Debugging in the settings.
  • Enable Developer options in mobile settings. If you didn’t find an option the you have to enable it by taping 7 time on your build number.

Screenshot_2016-10-09-15-01-01.png

Screenshot_2016-10-09-15-01-14.png

Screenshot_2016-10-09-15-01-23.png

     This run the app in the connected device

Output:

out.PNG

Category: