ionFoodDelivery - Single Restaurant

  1. Home
  2. Docs
  3. ionFoodDelivery – Single Restaurant
  4. Driver App

Driver App

Step 1: Updating Firebase Configurations

– Navigate to driver/src/environments/
– update your firebase configurations

Step 2: Run Driver App

cd driver
npm install
ionic serve

**Note:** If Ionic serve is not working, you can also execute following command (update ports as your wish)

ionic serve --dev-logger-port 53704 --livereload-port 35730 --port 8200

To generate apk

ionic cordova platform add [email protected]
ionic cordova build android

Execute ionic cordova resources before you build, if you faced any issue with icons or image not found

Common mistakes

  • Update Google API Key with Driver App
  • Add Geolocation plugin & whitelist plugin (if it didn’t added automatically)
ionic cordova plugin add cordova-plugin-geolocation
ionic cordova plugin add cordova-plugin-whitelist

Facing issue with generating build?

If you’re facing any issue with generating apk, please follow these steps

Step 1: Remove Platform & Plugin

ionic cordova platform rm android
ionic cordova plugin rm cordova-plugin-background-geolocation

Step 2: Update config.xml

2.1 Update MinSdk = 21

<preference name="android-minSdkVersion" value="21" />

2.2 Add these before </widget>

<plugin name="cordova-plugin-background-geolocation" spec="@mauron85/[email protected]~3.1.0">
    <variable name="GOOGLE_PLAY_SERVICES_VERSION" value="11+" />
    <variable name="ANDROID_SUPPORT_LIBRARY_VERSION" value="26+" />
    <variable name="ICON" value="@mipmap/icon" />
    <variable name="SMALL_ICON" value="@mipmap/icon" />
    <variable name="ALWAYS_USAGE_DESCRIPTION" value="App requires background tracking " />
    <variable name="MOTION_USAGE_DESCRIPTION" value="App requires motion detection" />

Step 3: Adding platform & plugin

ionic cordova plugin add @mauron85/cordova-plugin-background-geolocation
ionic cordova platform add android
ionic cordova plugins <= Make sure you can see cordova-background-location plugin
ionic cordova build android