Skip to content
Permalink
Browse files
CB-13667 : Remove deprecated platforms
  • Loading branch information
maverickmishra committed Dec 12, 2017
1 parent f215efc commit 85dffffca46d2fad281ed9a5da4fce14af331b27
Showing 9 changed files with 10 additions and 539 deletions.
@@ -60,26 +60,14 @@ Fires when the battery charge percentage changes by at least 1 percent, or when

### Supported Platforms

- Amazon Fire OS
- iOS
- Android
- BlackBerry 10
- Windows Phone 7 and 8
- Windows (Windows Phone 8.1 and Windows 10)
- Firefox OS
- Windows
- Browser (Chrome, Firefox, Opera)

### Quirks: Android & Amazon Fire OS
### Quirks: Android

**Warning**: the Android and Fire OS implementations are greedy and prolonged use will drain the device's battery.

### Quirks: Windows Phone 7 & Windows Phone 8

The `level` property is _not_ supported on Windows Phone 7 because the OS does not provide native APIs to determine battery level. The `isPlugged` parameter _is_ supported.

### Quirks: Windows Phone 8.1

The `isPlugged` parameter is _not_ supported on Windows Phone 8.1. The `level` parameter _is_ supported.
**Warning**: the Android implementation is greedy and prolonged use will drain the device's battery.

## batterylow event

@@ -95,18 +83,11 @@ Fires when the battery charge percentage reaches the low charge threshold. This

### Supported Platforms

- Amazon Fire OS
- iOS
- Android
- BlackBerry 10
- Firefox OS
- Windows (Windows Phone 8.1 and Windows 10)
- Windows
- Browser (Chrome, Firefox, Opera)

### Quirks: Windows Phone 8.1

The `batterylow` event fires on Windows Phone 8.1 irrespective of whether the device is plugged in or not. This happens because the OS does not provide an API to detect whether the device is plugged in.

## batterycritical event

Fires when the battery charge percentage reaches the critical charge threshold. This threshold value is device-specific. Returns an [object][status_object] containing battery status.
@@ -121,17 +102,11 @@ Fires when the battery charge percentage reaches the critical charge threshold.

### Supported Platforms

- Amazon Fire OS
- iOS
- Android
- BlackBerry 10
- Firefox OS
- Windows (Windows Phone 8.1 and Windows 10)
- Windows
- Browser (Chrome, Firefox, Opera)

### Quirks: Windows Phone 8.1

The `batterycritical` event fires on Windows Phone 8.1 irrespective of whether the device is plugged in or not. This happens because the OS does not provide an API to detect whether the device is plugged in.

[w3c_spec]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
[status_object]: #status-object
@@ -1,20 +1,15 @@
{
"name": "cordova-plugin-battery-status",
"version": "1.2.6-dev",
"version": "2.0.0-dev",
"description": "Cordova Battery Plugin",
"types": "./types/index.d.ts",
"cordova": {
"id": "cordova-plugin-battery-status",
"platforms": [
"android",
"amazon-fireos",
"ubuntu",
"ios",
"blackberry10",
"wp7",
"wp8",
"tizen",
"firefoxos"
"browser",
"windows"
]
},
"repository": {
@@ -29,14 +24,7 @@
"battery",
"ecosystem:cordova",
"cordova-android",
"cordova-amazon-fireos",
"cordova-ubuntu",
"cordova-ios",
"cordova-blackberry10",
"cordova-wp7",
"cordova-wp8",
"cordova-tizen",
"cordova-firefoxos"
"cordova-ios"
],
"scripts": {
"test": "npm run eslint",
@@ -20,7 +20,7 @@

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-battery-status"
version="1.2.6-dev">
version="2.0.0-dev">
<name>Battery</name>
<description>Cordova Battery Plugin</description>
<license>Apache 2.0</license>
@@ -43,23 +43,6 @@
<source-file src="src/android/BatteryListener.java" target-dir="src/org/apache/cordova/batterystatus" />
</platform>

<!-- amazon-fireos -->
<platform name="amazon-fireos">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="Battery" >
<param name="android-package" value="org.apache.cordova.batterystatus.BatteryListener"/>
</feature>
</config-file>

<source-file src="src/android/BatteryListener.java" target-dir="src/org/apache/cordova/batterystatus" />
</platform>

<!-- ubuntu -->
<platform name="ubuntu">
<header-file src="src/ubuntu/battery.h" />
<source-file src="src/ubuntu/battery.cpp" />
</platform>

<!-- ios -->
<platform name="ios">
<config-file target="config.xml" parent="/*">
@@ -71,36 +54,6 @@
<source-file src="src/ios/CDVBattery.m" />
</platform>

<!-- blackberry10 -->
<platform name="blackberry10">
<source-file src="src/blackberry10/index.js" target-dir="Battery" />
<config-file target="www/config.xml" parent="/widget">
<feature name="Battery" value="Battery"/>
</config-file>
</platform>

<!-- wp7 -->
<platform name="wp7">
<config-file target="config.xml" parent="/*">
<feature name="Battery">
<param name="wp-package" value="Battery"/>
</feature>
</config-file>

<source-file src="src/wp/Battery.cs" />
</platform>

<!-- wp8 -->
<platform name="wp8">
<config-file target="config.xml" parent="/*">
<feature name="Battery">
<param name="wp-package" value="Battery"/>
</feature>
</config-file>

<source-file src="src/wp/Battery.cs" />
</platform>

<!-- windows -->
<platform name="windows">
<js-module src="src/windows/BatteryProxy.js" name="Battery">
@@ -110,20 +63,6 @@
<framework src="src/windows/BatteryStatus.winmd" custom="true" target="phone"/>
</platform>

<!-- tizen -->
<platform name="tizen">
<js-module src="src/tizen/BatteryStatusProxy.js" name="BatteryStatusProxy">
<runs/>
</js-module>
</platform>

<!-- firefoxos -->
<platform name="firefoxos">
<js-module src="src/firefoxos/BatteryProxy.js" name="Battery">
<runs />
</js-module>
</platform>

<!-- browser -->
<platform name="browser">
<js-module src="src/browser/BatteryProxy.js" name="Battery">

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 85dffff

Please sign in to comment.