Checks the connectivity of the mobile device
The latest version of the softwares below is recommended.
- node.js and npm
- Ionic CLI and Cordova
- Angular CLI
- Android Studio
- Code Editor
node.js
andnpm
are essential and should be installed.
- If you don't have it, follow this link https://nodejs.org/en/download/ and download the stable version of node.js which will install both node and npm.
- Create a new folder and cd into that folder. This will be your project folder.
- Open the folder in cmd (Windows) or terminal (Mac or Linux) and install ionic and cordova:
npm install -g ionic cordova
- Install the latest angular CLI:
npm install -g @angular/cli
All set to create a new App!
- Run
ionic start <name_of_the_app> blank
. Chooseangular
framework since we're working with Angular. cd
into the app folder.- When using Ionic Framework in an Angular project, install the latest @ionic/angular package from npm. This comes with all of the Ionic Framework components and Angular specific services and features.
npm install @ionic/angular@latest --save
- Install the network-information plugin from the link below:
- Replace the
src
folder in your project folder with thesrc
folder from this repo.
Time to build!
- To target the Android platform, some additional environment setup is required. Android apps can be created on Windows, macOS, and Linux. Follow the instructions to setup.
- After the above setup, you are ready to test the app either in an emulator or on an actual device.
- Add the android platform:
ionic cordova platform add android
- In the project folder, open cmd or terminal and run:
ionic cordova build android
After build successfully finishes, hit the following command to run the app:
ionic cordova run android