Class: CordovaPlatform

CordovaPlatform


new CordovaPlatform()

Platform class for Cordova applications.

Platform class for Cordova applications. Derives from BrowserPlatform.
Source:

Methods


checkConnection()

Checks the current state of the device.

Checks the current state of the device. Platform implementations should call this function when the state changes. The state is inspected before background operations like synchronization are performed. Cordova Network Information Plugin MUST be installed for this function to operate.
Source:

getDeviceInformation()

Source:
Returns:
  • Returns an object of variables used to return device specific information like:
  • model: Nexus One returns "Passion", Motorola Droid returns "voles", etc.
  • manufacturer: Returns the manufacturer name: Samsung LG Motorola Micosoft Sony Apple
  • OS Name: Depending on the device, a few examples are: "Android" "BlackBerry 10" Browser: returns "MacIntel" on Mac returns "Win32" on Windows "iOS" "WinCE" "Tizen"
  • OS Version: Depending on the device, a few examples are: Android: Froyo OS would return "2.2" Eclair OS would return "2.1", "2.0.1", or "2.0" Version can also return update level "2.1-update1" BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600" Browser: Returns version number for the browser iPhone: iOS 3.2 returns "3.2" Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720 Tizen: returns "TIZEN_20120425_2"
  • OS Build: Get the version of Cordova running on the device. Overrides Platform.getDeviceInformation()

getGPSLocation()

Overrides Platform.getGPSLocation().

Source: