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).

phonegap-init

https://eclipse.org/downloads/

http://docs.phonegap.com/en/4.0.0/index.html

npm install g cordova
c
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 org.apache.cordova.network-information
    $ 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 org.apache.cordova.camera
    $ cordova plugin add org.apache.cordova.media-capture
    $ cordova plugin add org.apache.cordova.media
    
  • 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