Building for native devices

So far, everything we have done in Ionic has been tested in emulators or remote services. Now that we have an app that uses real phone features, it is time we finally went all the way and built the ultimate end-product—a mobile app.

Building and deploying Ionic apps on physical devices is remarkably easy thanks to the Ionic CLI. We will demonstrate how to do so in the following section.


From the root of your project folder, run the following:

ionic platform add android

This will add all the files that are necessary to deploy your app on an Android device.

Next, we have two options for the running of our app—an actual Android emulator or a physical device.


To run the app in the emulator, first build the project ...

Get Learning Node.js for Mobile Application Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.