Ionic mobile application connection with PHP server

Travel Data Post – Ionic App With PHP Backend :

Ionic 2.2.3 framework
Laravel 5.4 PHP framework backend
The mobile app stores the picture, GPS data, title, note in the local database
The app works offline mode. You can upload data when you have internet connection

Google Play store:


1. Install NodeJs with deafult setting.
Download from here:
You can choose the „Latest Features” or „Recommended Most Users” package.
Tutorial video:
Check npm version:
npm –v

2. Install Android Studio with default setting.…
Tutorial video:

3. Add device in Android Studio
Tutorial video:

4. Create folder: ionic
Unzip my traveldatapost package

5. Open Console window, step in the app folder (I changed the type of the docs to Courier):
Step in the app folder. In the main folder see config.xml, etc.
cd C:\ ionic\traveldatapost
Install Cordova and Ionic:
npm install -g cordova
This command deletes earlier version of the ionic. Run it.
npm uninstall -g ionic
This project uses ionic 2.2.3 The version number is important.
npm install -g ionic@2.2.3
List plugins:
cordova plugin list Remove all installed plugins:
ionic state clear — plugins
List plugins again:
cordova plugin list

6. Remove Android platform: cordova platform rm android

7. Clean cache: npm cache clean
Install Android again: cordova platform add android

8. Install Ionic plugins step by step:
DB and Camera plugin installation npm install pouchdb
ionic plugin add cordova-plugin-sqlite-2
ionic plugin add cordova-plugin-camera
npm install @ionic-native/camera

9. Install File transfer plugin
npm install @ionic-native/file @ionic-native/file-path @ionic-native/transfer
ionic plugin add cordova-plugin-file
ionic plugin add cordova-plugin-file-transfer
ionic plugin add cordova-plugin-filepath

10. Geolocation plugin
ionic plugin add cordova-plugin-geolocation
npm install @ionic-native/geolocation
ionic plugin add cordova-plugin-mauron85-background-geolocation
npm install @ionic-native/background-geolocation

11. Install browser plugin
cordova plugin add cordova-plugin-inappbrowser

12. Test application
ionic run android –l
Open Chrome browser:
Remote Target > inspect
You can check the running, internet connection, upload.
Advice: If you have got error: close console, open it, go to the app directory and run again this command:
ionic run android –l
The test app was built in this folder:

and then he would cut another little tiny one out of that

Nick Cave - 20,000th day on the planet Earth

(Visited 16 times, 1 visits today)
This entry was posted in Programming and tagged . Bookmark the permalink.