In the first lesson we installed Node.js and Ionic framework. And now let’s create a simple Android application using Ionic.
In order to use Ionic for Android you need to follow this pre-requirements:
- install Android SDK (you can see instructions here)
- plug the Android device to your computer or run the emulator.
Creating Ionic Android app
The creation process consists of such steps:
- create an app from a temp
- add the Android platform support for your app
- build and run it
- To create a stub Android project using Ionic just run next command in the terminal
ionic start simpleApp tabs
“simpleApp” is a name for your new project;
“tabs” is one of 3 template types
2. Now let’s set the target platform for our project
cd simpleApp ionic platform add android
3.Build and run an Android app
ionic run android
When the project is built an run on the plugged device, you would see this screen:
This is a sample Ionic application created from a “tabs” template. Click through the tabs and check out that it’s truly working.
But this is only a stub. In the next lesson we will learn how to customize the app and make it interactive.