Modes in which application runs

For what I’ve been reading, there are 3 running modes.

Foreground: when you are using the application.
Background: when you have the application minimized but not closed and you can restore it where you left it before minimizing.
Back-background: when you have closed your application but there are a service generated by the application that is listening some specific events (i.e. waiting push notifications).


solve conflict between push and local notification of cordova

Step 1: in platforms/android/




Step 2 : delete android-support-v4.jar from  platforms/android/libs


Step 3 : If you are getting android version problem

# Project target.

This should be done in two files:


Also the manifest should be updated:

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />


npm install g cordova
ordova create hello com.example.hello HelloWorld
cd helloworld
cordova platform add android

cordova platforms ls
cordova build
cordova emulate android
cordova run android
cordova plugin add org.apache.cordova.device
  • cordova plugin add
    $ cordova plugin add org.apache.cordova.battery-status
  • Accelerometer, Compass, and Geolocation:
    $ cordova plugin add org.apache.cordova.device-motion
    $ cordova plugin add org.apache.cordova.device-orientation
    $ cordova plugin add org.apache.cordova.geolocation
  • Camera, Media playback and Capture:
    $ cordova plugin add
    $ cordova plugin add
    $ cordova plugin add
  • Access files on device or network (File API):
    $ cordova plugin add org.apache.cordova.file
    $ cordova plugin add org.apache.cordova.file-transfer
  • Notification via dialog box or vibration:
    $ cordova plugin add org.apache.cordova.dialogs
    $ cordova plugin add org.apache.cordova.vibration
  • Contacts:
    $ cordova plugin add org.apache.cordova.contacts
  • Globalization:
    $ cordova plugin add org.apache.cordova.globalization
  • Splashscreen:
    $ cordova plugin add org.apache.cordova.splashscreen
  • Open new browser windows (InAppBrowser):
    $ cordova plugin add org.apache.cordova.inappbrowser
  • Debug console:
    $ cordova plugin add org.apache.cordova.console
cordova plugin ls


To remove a plugin, refer to it by the same identifier that appears in the listing. For example, here is how you would remove support for a debug console from a release version:

    $ cordova plugin rm org.apache.cordova.console
    $ cordova plugin remove org.apache.cordova.console    # same

You can batch-remove or add plugins by specifying more than one argument for each command:

    $ cordova plugin add org.apache.cordova.console org.apache.cordova.device