Initial commit

This commit is contained in:
2018-09-22 10:44:38 +08:00
commit eacb95c18a
723 changed files with 100993 additions and 0 deletions
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
Dieses Plugin stellt eine Implementierung einer alten Version der [Batterie-Status-API](http://www.w3.org/TR/2011/WD-battery-status-20110915/) dar..
Es fügt die folgenden drei `window` Events hinzu:
* batterystatus
* batterycritical
* batterylow
## Installation
cordova plugin add cordova-plugin-battery-status
## batterystatus
Dieses Ereignis wird ausgelöst, wenn sich der Prozentsatz der Akkuladung um mindestens 1 Prozent ändert, oder wenn das Gerät aufgeladen oder vom Netz getrennt wird.
Dem Batterie-Status-Event-Handler wird ein Objekt übergeben, das zwei Eigenschaften enthält:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 und 8
* Windows (nur Windows Phone 8.1)
* Tizen
* Firefox OS
### Android und Amazon Fire OS Macken
* Warnung: die Android + Fire OS Implementierungen sind gierig und längerem Gebrauch lässt den Benutzer Batterie.
### Windows Phone 7 und 8 Eigenarten
Windows Phone 7 bietet keine systemeigenen APIs um das Batterie-Niveau zu bestimmen, so dass die `level` -Eigenschaft ist nicht verfügbar. Der `isPlugged` -Parameter wird unterstützt.
### Windows-Eigenheiten
Windows Phone 8.1 unterstützt keine `IsPlugged` Parameter. `Der Parameter <em>wird</em> unterstützt.`
### Beispiel
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
Das Ereignis wird ausgelöst, wenn der Prozentsatz der Batterieladung den kritischen Akku-Schwellenwert erreicht hat. Der Wert ist gerätespezifisch.
Der `batterycritical` Handler übergibt ein Objekt mit zwei Eigenschaften:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (nur Windows Phone 8.1)
### Windows-Eigenheiten
Windows Phone 8.1 wird `batterycritical` Ereignis unabhängig angeschlossen Zustand ausgelöst, da es nicht unterstützt wird.
### Beispiel
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
Das Ereignis wird ausgelöst, wenn der Prozentsatz der Batterieladung den kritischen Akku-Schwellenwert erreicht hat. Der Wert ist gerätespezifisch.
Der `batterylow` Handler übergibt ein Objekt mit zwei Eigenschaften:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (nur Windows Phone 8.1)
### Windows-Eigenheiten
Windows Phone 8.1 wird `batterylow` Ereignis unabhängig angeschlossen Zustand ausgelöst, da es nicht unterstützt wird.
### Beispiel
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# org.Apache.Cordova.Battery-status
Dieses Plugin stellt eine Implementierung einer alten Version der [Batterie-Status-API][1] dar..
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
Es fügt die folgenden drei `window` Events hinzu:
* batterystatus
* batterycritical
* batterylow
## Installation
cordova plugin add cordova-plugin-battery-status
## batterystatus
Dieses Ereignis wird ausgelöst, wenn sich der Prozentsatz der Akkuladung um mindestens 1 Prozent ändert, oder wenn das Gerät aufgeladen oder vom Netz getrennt wird.
Dem Batterie-Status-Event-Handler wird ein Objekt übergeben, das zwei Eigenschaften enthält:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 und 8
* Tizen
* Firefox OS
### Windows Phone 7 und 8 Eigenarten
Windows Phone 7 bietet keine systemeigenen APIs um das Batterie-Niveau zu bestimmen, so dass die `level` -Eigenschaft ist nicht verfügbar. Der `isPlugged` -Parameter wird unterstützt.
### Beispiel
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
Das Ereignis wird ausgelöst, wenn der Prozentsatz der Batterieladung den kritischen Akku-Schwellenwert erreicht hat. Der Wert ist gerätespezifisch.
Der `batterycritical` Handler übergibt ein Objekt mit zwei Eigenschaften:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Beispiel
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
Das Ereignis wird ausgelöst, wenn der Prozentsatz der Batterieladung den kritischen Akku-Schwellenwert erreicht hat. Der Wert ist gerätespezifisch.
Der `batterylow` Handler übergibt ein Objekt mit zwei Eigenschaften:
* **Ebene**: der Prozentsatz der Batterieladung (0-100). *(Anzahl)*
* **IsPlugged**: ein boolescher Wert, der angibt, ob das Gerät eingesteckt ist *(boolesch)*
Anwendungen sollten in der Regel `window.addEventListener` verwenden, um einen Event-Listener hinzuzufügen, nachdem das `deviceready` -Event ausgelöst wurde.
### Unterstützte Plattformen
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Beispiel
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
Este plugin proporciona una implementación de una versión antigua de la [Batería estado eventos API](http://www.w3.org/TR/2011/WD-battery-status-20110915/).
Agrega los siguientes tres `window` eventos:
* batterystatus
* batterycritical
* batterylow
## Instalación
cordova plugin add cordova-plugin-battery-status
## batterystatus
Este evento se desencadena cuando cambia el porcentaje de carga de la batería en menos de 1 por ciento, o si el aparato está enchufado o desenchufado.
El controlador del estado de batería se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos después de la `deviceready` evento incendios.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 y 8
* Windows (sólo Windows Phone 8.1)
* Tizen
* Firefox OS
### Android y Amazon fuego OS caprichos
* ADVERTENCIA: el Android + fuego OS implementaciones son codiciosas y uso prolongado agotará la batería del usuario.
### Windows Phone 7 y 8 rarezas
Windows Phone 7 no proporciona una API nativa para determinar el nivel de batería, lo que `level` no está disponible. El `isPlugged` parámetro *es* apoyado.
### Windows rarezas
8.1 de Windows Phone no permite `isPlugged` parámetro. El parámetro `level` *es* apoyado.
### Ejemplo
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
El evento se desencadena cuando el porcentaje de carga de la batería ha alcanzado el umbral crítico de batería. El valor es específica del dispositivo.
El controlador `batterycritical` se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos una vez que se desencadene el evento `deviceready`.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (sólo Windows Phone 8.1)
### Windows rarezas
8.1 de Windows Phone se disparará `batterycritical` evento independientemente del estado tapado porque no es compatible.
### Ejemplo
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
El evento se desencadena cuando el porcentaje de carga de la batería ha alcanzado el umbral de batería baja, el valor específico del dispositivo.
El controlador de `batterylow` se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos una vez que se desencadene el evento `deviceready`.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (sólo Windows Phone 8.1)
### Windows rarezas
8.1 de Windows Phone se disparará `batterylow` evento independientemente del estado tapado porque no es compatible.
### Ejemplo
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# cordova-plugin-battery-status
Este plugin proporciona una implementación de una versión antigua de la [Batería estado eventos API][1].
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
Agrega los siguientes tres `window` eventos:
* batterystatus
* batterycritical
* batterylow
## Instalación
cordova plugin add cordova-plugin-battery-status
## batterystatus
Este evento se desencadena cuando cambia el porcentaje de carga de la batería en menos de 1 por ciento, o si el aparato está enchufado o desenchufado.
El controlador del estado de batería se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos después de la `deviceready` evento incendios.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 y 8
* Tizen
* Firefox OS
### Windows Phone 7 y 8 rarezas
Windows Phone 7 no proporciona una API nativa para determinar el nivel de batería, lo que `level` no está disponible. El `isPlugged` parámetro *es* apoyado.
### Ejemplo
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
El evento se desencadena cuando el porcentaje de carga de la batería ha alcanzado el umbral crítico de batería. El valor es específica del dispositivo.
El controlador `batterycritical` se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos una vez que se desencadene el evento `deviceready`.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Ejemplo
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
El evento se desencadena cuando el porcentaje de carga de la batería ha alcanzado el umbral de batería baja, el valor específico del dispositivo.
El controlador de `batterylow` se pasa un objeto que contiene dos propiedades:
* **level**: el porcentaje de carga de la batería (0-100). *(Número)*
* **isPlugged**: un valor booleano que indica si el dispositivo está conectado pulg *(Boolean)*
Las aplicaciones normalmente deben utilizar `window.addEventListener` para conectar un detector de eventos una vez que se desencadene el evento `deviceready`.
### Plataformas soportadas
* Amazon fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Ejemplo
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# Cordova-plugin-batterie-statut
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
Ce plugin fournit une implémentation d'une ancienne version de [Batterie Status événements API](http://www.w3.org/TR/2011/WD-battery-status-20110915/).
Il ajoute les trois `window` des événements :
* batterystatus
* batterycritical
* batterylow
## Installation
cordova plugin add cordova-plugin-battery-status
## batterystatus
L'évènement se déclenche lorsque le taux de charge de la batterie gagne ou perd au moins un pourcent, ou quand l'appareil est branché ou débranché.
Le gestionnaire est appelé avec un objet contenant deux propriétés :
* **level** : le taux de charge de la batterie (0-100). *(Number)*
* **isPlugged** : un booléen indiquant si l'appareil est en cours de chargement ou non. *(Boolean)*
Les applications doivent généralement utiliser `window.addEventListener` pour attacher un écouteur d'événements après le `deviceready` événement se déclenche.
### Plates-formes supportées
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 et 8
* Windows (Windows Phone 8.1 uniquement)
* Paciarelli
* Firefox OS
### Android et Amazon Fire OS bizarreries
* AVERTISSEMENT : l'Android + feu OS implémentations sont avides et utilisation prolongée s'évacuera pile de l'utilisateur.
### Notes au sujet de Windows Phone 7 et 8
Windows Phone 7 ne fournit pas d'API native pour déterminer le niveau de la batterie, de ce fait la propriété `level` n'est pas disponible. La propriété `isPlugged` *est* quant à elle prise en charge.
### Bizarreries de Windows
8.1 de Windows Phone ne prend pas de paramètre `isPlugged` . Le `level` paramètre *is* pris en charge.
### Exemple
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
L'évènement se déclenche lorsque le pourcentage de charge de la batterie a atteint un seuil critique. Cette valeur est spécifique à l'appareil.
Le gestionnaire `batterycritical` est appelé avec un objet contenant deux propriétés :
* **level** : le taux de charge de la batterie (0-100). *(Number)*
* **isPlugged** : un booléen indiquant si l'appareil est en cours de chargement ou non. *(Boolean)*
Les applications devraient en général utiliser `window.addEventListener` pour attacher un écouteur d'évènements, une fois l'évènement `deviceready` déclenché.
### Plates-formes supportées
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Paciarelli
* Firefox OS
* Windows (Windows Phone 8.1 uniquement)
### Bizarreries de Windows
Windows Phone 8.1 tirera `batterycritical` épreuve que l'État branché car il n'est pas supportée.
### Exemple
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
L'évènement se déclenche lorsque le pourcentage de charge de la batterie a atteint un niveau faible, cette valeur est spécifique à l'appareil.
Le gestionnaire `batterylow` est appelé avec un objet contenant deux propriétés :
* **level** : le taux de charge de la batterie (0-100). *(Number)*
* **isPlugged** : un booléen indiquant si l'appareil est en cours de chargement ou non. *(Boolean)*
Les applications devraient en général utiliser `window.addEventListener` pour attacher un écouteur d'évènements, une fois l'évènement `deviceready` déclenché.
### Plates-formes supportées
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Paciarelli
* Firefox OS
* Windows (Windows Phone 8.1 uniquement)
### Bizarreries de Windows
Windows Phone 8.1 tirera `batterylow` épreuve que l'État branché car il n'est pas supportée.
### Exemple
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# org.Apache.Cordova.Battery inscrits
Ce plugin fournit une implémentation d'une ancienne version de [Batterie Status événements API][1].
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
Il ajoute les trois `window` des événements :
* batterystatus
* batterycritical
* batterylow
## Installation
cordova plugin add cordova-plugin-battery-status
## batterystatus
L'évènement se déclenche lorsque le taux de charge de la batterie gagne ou perd au moins un pourcent, ou quand l'appareil est branché ou débranché.
Le gestionnaire est appelé avec un objet contenant deux propriétés :
* **level** : le taux de charge de la batterie (0-100). *(Number)*
* **isPlugged** : un booléen indiquant si l'appareil est en cours de chargement ou non. *(Boolean)*
Les applications doivent généralement utiliser `window.addEventListener` pour attacher un écouteur d'événements après le `deviceready` événement se déclenche.
### Plates-formes prises en charge
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 et 8
* Paciarelli
* Firefox OS
### Notes au sujet de Windows Phone 7 et 8
Windows Phone 7 ne fournit pas d'API native pour déterminer le niveau de la batterie, de ce fait la propriété `level` n'est pas disponible. La propriété `isPlugged` *est* quant à elle prise en charge.
### Exemple
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
L'évènement se déclenche lorsque le pourcentage de charge de la batterie a atteint un seuil critique. Cette valeur est spécifique à l'appareil.
Le gestionnaire `batterycritical` est appelé avec un objet contenant deux propriétés :
* **niveau**: le pourcentage de charge de la batterie (0-100). *(Nombre)*
* **isPlugged**: valeur booléenne qui indique si l'appareil n'est branché *(Boolean)*
Les applications devraient en général utiliser `window.addEventListener` pour attacher un écouteur d'évènements, une fois l'évènement `deviceready` déclenché.
### Plates-formes prises en charge
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Paciarelli
* Firefox OS
### Exemple
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
L'évènement se déclenche lorsque le pourcentage de charge de la batterie a atteint un niveau faible, cette valeur est spécifique à l'appareil.
Le gestionnaire `batterylow` est appelé avec un objet contenant deux propriétés :
* **niveau**: le pourcentage de charge de la batterie (0-100). *(Nombre)*
* **isPlugged**: valeur booléenne qui indique si l'appareil n'est branché *(Boolean)*
Les applications devraient en général utiliser `window.addEventListener` pour attacher un écouteur d'évènements, une fois l'évènement `deviceready` déclenché.
### Plates-formes prises en charge
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Paciarelli
* Firefox OS
### Exemple
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
Questo plugin fornisce un'implementazione di una vecchia versione dell' [API di eventi lo stato della batteria](http://www.w3.org/TR/2011/WD-battery-status-20110915/).
Aggiunge i seguenti tre `window` eventi:
* batterystatus
* batterycritical
* batterylow
## Installazione
cordova plugin add cordova-plugin-battery-status
## batterystatus
Questo evento viene generato quando la percentuale di carica della batteria cambia almeno l'1 per cento, o se il dispositivo è collegato o scollegato.
Il gestore di stato della batteria viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi dopo il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 e 8
* Windows (solo Windows Phone 8.1)
* Tizen
* Firefox OS
### Android e Amazon fuoco OS stranezze
* Avviso: il Android + fuoco OS implementazioni sono avide e uso prolungato si scaricherà la batteria dell'utente.
### Windows Phone 7 e 8 stranezze
Windows Phone 7 non fornisce le API native per determinare il livello della batteria, così la `level` proprietà non è disponibile. Il `isPlugged` parametro *è* supportato.
### Stranezze di Windows
8.1 di Windows Phone non supporta il parametro `isPlugged` . Il `level` parametro *is* supportata.
### Esempio
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
L'evento viene generato quando la percentuale di carica della batteria ha raggiunto la soglia critica di batteria. Il valore è specifico del dispositivo.
Il `batterycritical` gestore viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi una volta il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (solo Windows Phone 8.1)
### Stranezze di Windows
Windows Phone 8.1 vengano attivati `batterycritical` evento indipendentemente dallo stato tappato, come non è supportato.
### Esempio
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
L'evento viene generato quando la percentuale di carica della batteria ha raggiunto la soglia di batteria scarica, il valore specifico del dispositivo.
Il `batterylow` gestore viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi una volta il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (solo Windows Phone 8.1)
### Stranezze di Windows
Windows Phone 8.1 vengano attivati `batterylow` evento indipendentemente dallo stato tappato, come non è supportato.
### Esempio
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# org.apache.Cordova.Battery-status
Questo plugin fornisce un'implementazione di una vecchia versione dell' [API di eventi lo stato della batteria][1].
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
Aggiunge i seguenti tre `window` eventi:
* batterystatus
* batterycritical
* batterylow
## Installazione
cordova plugin add cordova-plugin-battery-status
## batterystatus
Questo evento viene generato quando la percentuale di carica della batteria cambia almeno l'1 per cento, o se il dispositivo è collegato o scollegato.
Il gestore di stato della batteria viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi dopo il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 e 8
* Tizen
* Firefox OS
### Windows Phone 7 e 8 stranezze
Windows Phone 7 non fornisce le API native per determinare il livello della batteria, così la `level` proprietà non è disponibile. Il `isPlugged` parametro *è* supportato.
### Esempio
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
L'evento viene generato quando la percentuale di carica della batteria ha raggiunto la soglia critica di batteria. Il valore è specifico del dispositivo.
Il `batterycritical` gestore viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi una volta il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Esempio
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
L'evento viene generato quando la percentuale di carica della batteria ha raggiunto la soglia di batteria scarica, il valore specifico del dispositivo.
Il `batterylow` gestore viene passato un oggetto che contiene due proprietà:
* **livello**: la percentuale di carica della batteria (0-100). *(Numero)*
* **isPlugged**: un valore booleano che indica se il dispositivo è collegato poll *(Boolean)*
Applicazioni in genere è necessario utilizzare `window.addEventListener` per fissare un listener di eventi una volta il `deviceready` evento incendi.
### Piattaforme supportate
* Amazon fuoco OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Esempio
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
このプラグインは、[バッテリ ステータス イベント API](http://www.w3.org/TR/2011/WD-battery-status-20110915/)の旧バージョンの実装を提供します.
次の 3 つを追加します `window` イベント。
* batterystatus
* batterycritical
* batterylow
## インストール
cordova plugin add cordova-plugin-battery-status
## batterystatus
バッテリーの充電の割合 1% 以上によって変更されたとき、またはデバイス接続している場合に発生します。
バッテリ状態ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 後のイベント リスナーをアタッチする、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Windows Phone 7 と 8
* Windows (Windows Phone 8.1 のみ)
* Tizen
* Firefox の OS
### アンドロイドとアマゾン火 OS 癖
* 警告: Android + 火 OS 実装は欲張りな長期使用ユーザーのバッテリーを排出するでしょう。
### Windows Phone 7 と 8 癖
Windows Phone 7 は、バッテリーのレベルを決定するネイティブ Api を提供しませんので、 `level` プロパティは使用できません。`isPlugged`パラメーター*が*サポートされています。
### Windows の癖
Windows Phone 8.1`isPlugged`パラメーターをサポートしていません。 `level`のパラメーター*is*サポートされています。
### 例
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
バッテリーの充電の割合がバッテリ切れのしきい値に達したときに発生します。値は、デバイス固有です。
`batterycritical`ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 一度のイベント リスナーをアタッチし、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Tizen
* Firefox の OS
* Windows (Windows Phone 8.1 のみ)
### Windows の癖
それはサポートされていないために、Windows Phone 8.1 は接続状態に関係なく`batterycritical`イベントを発生します。
### 例
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
バッテリーの充電の割合がバッテリ低下しきい値、デバイス固有の値に達したときに発生します。
`batterylow`ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 一度のイベント リスナーをアタッチし、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Tizen
* Firefox の OS
* Windows (Windows Phone 8.1 のみ)
### Windows の癖
それはサポートされていないために、Windows Phone 8.1 は接続状態に関係なく`batterylow`イベントを発生します。
### 例
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# cordova-plugin-battery ステータス
このプラグインは、[バッテリ ステータス イベント API][1]の旧バージョンの実装を提供します.
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
次の 3 つを追加します `window` イベント。
* batterystatus
* batterycritical
* batterylow
## インストール
cordova plugin add cordova-plugin-battery-status
## batterystatus
バッテリーの充電の割合 1% 以上によって変更されたとき、またはデバイス接続している場合に発生します。
バッテリ状態ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 後のイベント リスナーをアタッチする、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Windows Phone 7 と 8
* Tizen
* Firefox の OS
### Windows Phone 7 と 8 癖
Windows Phone 7 は、バッテリーのレベルを決定するネイティブ Api を提供しませんので、 `level` プロパティは使用できません。`isPlugged`パラメーター*が*サポートされています。
### 例
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
バッテリーの充電の割合がバッテリ切れのしきい値に達したときに発生します。値は、デバイス固有です。
`batterycritical`ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 一度のイベント リスナーをアタッチし、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Tizen
* Firefox の OS
### 例
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
バッテリーの充電の割合がバッテリ低下しきい値、デバイス固有の値に達したときに発生します。
`batterylow`ハンドラーは 2 つのプロパティを格納しているオブジェクトに渡されます。
* **レベル**: バッテリーの充電量 (0-100) の割合。*(数)*
* **起こしたり**: デバイスが接続されてインチ*(ブール値)*かどうかを示すブール値
通常アプリケーションに使用する必要があります `window.addEventListener` 一度のイベント リスナーをアタッチし、 `deviceready` イベントが発生します。
### サポートされているプラットフォーム
* アマゾン火 OS
* iOS
* アンドロイド
* ブラックベリー 10
* Tizen
* Firefox の OS
### 例
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
이 플러그인에서는 [배터리 상태 이벤트 API](http://www.w3.org/TR/2011/WD-battery-status-20110915/) 의 이전 버전의 구현을.
그것은 다음과 같은 세 가지 추가 `window` 이벤트:
* batterystatus
* batterycritical
* batterylow
## 설치
cordova plugin add cordova-plugin-battery-status
## batterystatus
이 이벤트는 배터리 충전 비율 1% 이상에 의해 변경 될 때 또는 장치를 연결 하거나 분리 하는 경우 발생 합니다.
배터리 상태 처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다.
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 후 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Windows Phone 7과 8
* 윈도 (Windows Phone 8.1만)
* Tizen
* Firefox 운영 체제
### 안 드 로이드와 아마존 화재 OS 단점이
* 경고: 안 드 로이드 + 화재 OS 구현 욕심이 있으며 장기간된 사용 사용자의 배터리를 배출 합니다.
### Windows Phone 7, 8 특수
Windows Phone 7 배터리 수준을 확인 하려면 네이티브 Api를 제공 하지 않습니다 때문에 `level` 속성은 사용할 수 없습니다. `isPlugged`매개 변수는 *는* 지원.
### 윈도우 특수
Windows Phone 8.1 `isPlugged` 매개 변수를 지원 하지 않습니다. `level` 매개 변수는 *는* 지원.
### 예를 들어
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
이벤트 발생 때 배터리 충전 비율 배터리 위험 임계값에 도달 했습니다. 값은 장치 마다 다릅니다.
`batterycritical`처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다:
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 한번 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Tizen
* Firefox 운영 체제
* 윈도 (Windows Phone 8.1만)
### 윈도우 특수
으로 지원 되지 않습니다 Windows Phone 8.1 연결된 상태 `batterycritical` 이벤트를 발생 합니다.
### 예를 들어
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
이벤트 발생 때 배터리 충전 비율 낮은 배터리 임계값, 특정 값에 도달 했습니다.
`batterylow`처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다:
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 한번 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Tizen
* Firefox 운영 체제
* 윈도 (Windows Phone 8.1만)
### 윈도우 특수
으로 지원 되지 않습니다 Windows Phone 8.1 연결된 상태 `batterylow` 이벤트를 발생 합니다.
### 예를 들어
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# cordova-plugin-battery 상태
이 플러그인에서는 [배터리 상태 이벤트 API][1] 의 이전 버전의 구현을.
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
그것은 다음과 같은 세 가지 추가 `window` 이벤트:
* batterystatus
* batterycritical
* batterylow
## 설치
cordova plugin add cordova-plugin-battery-status
## batterystatus
이 이벤트는 배터리 충전 비율 1% 이상에 의해 변경 될 때 또는 장치를 연결 하거나 분리 하는 경우 발생 합니다.
배터리 상태 처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다.
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 후 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Windows Phone 7과 8
* Tizen
* Firefox 운영 체제
### Windows Phone 7, 8 특수
Windows Phone 7 배터리 수준을 확인 하려면 네이티브 Api를 제공 하지 않습니다 때문에 `level` 속성은 사용할 수 없습니다. `isPlugged`매개 변수는 *는* 지원.
### 예를 들어
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
이벤트 발생 때 배터리 충전 비율 배터리 위험 임계값에 도달 했습니다. 값은 장치 마다 다릅니다.
`batterycritical`처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다:
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 한번 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Tizen
* Firefox 운영 체제
### 예를 들어
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
이벤트 발생 때 배터리 충전 비율 낮은 배터리 임계값, 특정 값에 도달 했습니다.
`batterylow`처리기는 두 개의 속성이 포함 된 개체에 전달 됩니다:
* **수준**: 배터리 충전 (0-100)의 비율. *(수)*
* **isPlugged**: 장치 연결된 인치 *(부울)* 인지 여부를 나타내는 부울 값
일반적으로 응용 프로그램을 사용 해야 합니다 `window.addEventListener` 한번 이벤트 리스너를 연결 하는 `deviceready` 이벤트가 발생 합니다.
### 지원 되는 플랫폼
* 아마존 화재 운영 체제
* iOS
* 안 드 로이드
* 블랙베리 10
* Tizen
* Firefox 운영 체제
### 예를 들어
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
Wtyczka stanowi implementację starą wersję [API zdarzeń stanu baterii](http://www.w3.org/TR/2011/WD-battery-status-20110915/).
To dodaje następujące trzy `window` zdarzenia:
* batterystatus
* batterycritical
* batterylow
## Instalacja
cordova plugin add cordova-plugin-battery-status
## batterystatus
To zdarzenie fires po zmianie procent naładowania baterii, przez co najmniej 1 procent, lub jeśli urządzenie jest podłączone lub odłączony.
Obsługi stan baterii jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(Boolean)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza po `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 i 8
* Windows (tylko Windows Phone 8.1)
* Tizen
* Firefox OS
### Android i Amazon ogień OS dziwactwa
* Ostrzeżenie: Android + ogień OS implementacje są chciwi i długotrwałe stosowanie drenażu użytkownika baterii.
### Windows Phone 7 i 8 dziwactwa
Windows Phone 7 nie zapewniają native API do określenia poziomu baterii, więc `level` Właściwość jest niedostępny. `isPlugged`Parametr *jest* obsługiwany.
### Windows dziwactwa
Windows Phone 8.1 obsługuje parametr `isPlugged` . `Parametr <em>jest</em> obsługiwany.`
### Przykład
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
Zdarzenie odpala gdy procent naładowania baterii osiągnie próg rozładowanej baterii. Wartość jest specyficzne dla urządzenia.
`batterycritical`Obsługi jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(Boolean)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza raz `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (tylko Windows Phone 8.1)
### Windows dziwactwa
Windows Phone 8.1 będzie ogień `batterycritical` imprezy niezależnie od stanu podłączony, jak nie jest obsługiwany.
### Przykład
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
Zdarzenie odpala gdy procent naładowania baterii osiągnie próg niskiego poziomu baterii, wartości specyficzne dla urządzenia.
`batterylow`Obsługi jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(Boolean)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza raz `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
* Windows (tylko Windows Phone 8.1)
### Windows dziwactwa
Windows Phone 8.1 będzie ogień `batterylow` imprezy niezależnie od stanu podłączony, jak nie jest obsługiwany.
### Przykład
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# org.Apache.Cordova.Battery stan
Wtyczka stanowi implementację starą wersję [API zdarzeń stanu baterii][1].
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
To dodaje następujące trzy `window` zdarzenia:
* batterystatus
* batterycritical
* batterylow
## Instalacja
cordova plugin add cordova-plugin-battery-status
## batterystatus
To zdarzenie fires po zmianie procent naładowania baterii, przez co najmniej 1 procent, lub jeśli urządzenie jest podłączone lub odłączony.
Obsługi stan baterii jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(Boolean)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza po `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 i 8
* Tizen
* Firefox OS
### Windows Phone 7 i 8 dziwactwa
Windows Phone 7 nie zapewniają native API do określenia poziomu baterii, więc `level` Właściwość jest niedostępny. `isPlugged`Parametr *jest* obsługiwany.
### Przykład
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
Zdarzenie odpala gdy procent naładowania baterii osiągnie próg rozładowanej baterii. Wartość jest specyficzne dla urządzenia.
`batterycritical`Obsługi jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(logiczna)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza raz `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Przykład
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
Zdarzenie odpala gdy procent naładowania baterii osiągnie próg niskiego poziomu baterii, wartości specyficzne dla urządzenia.
`batterylow`Obsługi jest przekazywany obiekt, który zawiera dwie właściwości:
* **poziom**: procent naładowania baterii (0-100). *(Liczba)*
* **isPlugged**: boolean, która wskazuje, czy urządzenie jest podłączony *(logiczna)*
Aplikacje zwykle należy użyć `window.addEventListener` Aby dołączyć słuchacza raz `deviceready` pożary zdarzenia.
### Obsługiwane platformy
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Przykład
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# cordova-plugin-battery-status
Этот плагин предоставляет реализацию старой версии [API Событий Статуса Батареи][1].
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
API добавляет следующие три события для объекта `window`:
* batterystatus
* batterycritical
* batterylow
## Установка
cordova plugin add cordova-plugin-battery-status
## batterystatus
Это событие возникает при изменении процент заряда батареи по крайней мере на 1%, или если устройство подключается или отключается от заряжающего устройства.
Обработчику события batterystatus передается объект, содержащий два свойства:
* **level**: процент заряда батареи (0-100). *(Число)*
* **isPlugged**: логическое значение, указывающее, подключено ли устройство к заряжающему устройству *(Boolean)*
Приложения обычно должны использовать `window.addEventListener` прикрепить прослушиватель событий после `deviceready` пожаров события.
### Поддерживаемые платформы
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Windows Phone 7 и 8
* Tizen
* Firefox OS
### Особенности Windows Phone 7 и 8
Windows Phone 7 не обеспечивает API, чтобы определить уровень заряда батареи, так что свойство `level` недоступно. Параметр `isPlugged` *поддерживается*.
### Пример
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
Событие возникает, когда процент заряда батареи почти достиг порога полной разрядки батареи. Значение этого порога зависит от конкретного устройства.
Обработчику события `batterycritical` передается объект, содержащий два свойства:
* **level**: процент заряда батареи (0-100). *(Число)*
* **isPlugged**: логическое значение, указывающее, подключено ли устройство к заряжающему устройству *(Boolean)*
Приложения обычно должны использовать `window.addEventListener` чтобы добавить обработчик события после того как произойдет событие `deviceready`.
### Поддерживаемые платформы
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Пример
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
Событие возникает, когда процент заряда батареи достигает порога низкого заряда батареи, это значение зависит от конкретного устройства.
Обработчику события `batterylow` передается объект, содержащий два свойства:
* **level**: процент заряда батареи (0-100). *(Число)*
* **isPlugged**: логическое значение, указывающее, подключено ли устройство к заряжающему устройству *(Boolean)*
Приложения обычно должны использовать `window.addEventListener` чтобы добавить обработчик события после того как произойдет событие `deviceready`.
### Поддерживаемые платформы
* Amazon Fire OS
* iOS
* Android
* BlackBerry 10
* Tizen
* Firefox OS
### Пример
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,151 @@
<!--
# license: Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-->
# cordova-plugin-battery-status
[![Build Status](https://travis-ci.org/apache/cordova-plugin-battery-status.svg)](https://travis-ci.org/apache/cordova-plugin-battery-status)
這個外掛程式提供的舊版本的[電池狀態事件 API](http://www.w3.org/TR/2011/WD-battery-status-20110915/)實現的.
它將添加以下三 `window` 事件:
* batterystatus
* batterycritical
* batterylow
## 安裝
cordova plugin add cordova-plugin-battery-status
## batterystatus
當電池計量的百分比改變了至少 1%,或如果在插入或拔出該設備會觸發此事件。
電池狀態處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將附加一個事件攔截器後的 `deviceready` 事件觸發。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Windows Phone 7 和 8
* Windows (僅限於 Windows Phone 8.1)
* Tizen
* 火狐瀏覽器作業系統
### 安卓和亞馬遜火 OS 怪癖
* 警告: Android + 火 OS 實現都是貪婪和長時間的使用會流失使用者的電池。
### Windows Phone 7 和 8 怪癖
Windows Phone 7 並不提供本機 Api 來確定電池計量水準,所以 `level` 是不可用的屬性。`isPlugged`參數**支援的。
### Windows 的怪癖
Windows Phone 8.1 不支援`isPlugged`參數。 `水準`參數**支援。
### 示例
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
當電池計量的百分比已達到關鍵電池閾值時,將觸發該事件。值是特定于設備。
`batterycritical`處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將一個事件攔截器附加一次 `deviceready` 事件火災。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Tizen
* 火狐瀏覽器作業系統
* Windows (僅限於 Windows Phone 8.1)
### Windows 的怪癖
Windows Phone 8.1 會觸發`batterycritical`事件任何堵塞狀態,因為它不支援。
### 示例
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
當電池計量的百分比已達到電池計量低門檻,設備特定值時,將觸發該事件。
`batterylow`處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將一個事件攔截器附加一次 `deviceready` 事件火災。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Tizen
* 火狐瀏覽器作業系統
* Windows (僅限於 Windows Phone 8.1)
### Windows 的怪癖
Windows Phone 8.1 會觸發`batterylow`事件任何堵塞狀態,因為它不支援。
### 示例
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}
@@ -0,0 +1,132 @@
<!---
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
# cordova-plugin-battery-地位
這個外掛程式提供的舊版本的[電池狀態事件 API][1]實現的.
[1]: http://www.w3.org/TR/2011/WD-battery-status-20110915/
它將添加以下三 `window` 事件:
* batterystatus
* batterycritical
* batterylow
## 安裝
cordova plugin add cordova-plugin-battery-status
## batterystatus
當電池計量的百分比改變了至少 1%,或如果在插入或拔出該設備會觸發此事件。
電池狀態處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將附加一個事件攔截器後的 `deviceready` 事件觸發。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Windows Phone 7 和 8
* Tizen
* 火狐瀏覽器作業系統
### Windows Phone 7 和 8 怪癖
Windows Phone 7 並不提供本機 Api 來確定電池計量水準,所以 `level` 是不可用的屬性。`isPlugged`參數**支援的。
### 示例
window.addEventListener("batterystatus", onBatteryStatus, false);
function onBatteryStatus(info) {
// Handle the online event
console.log("Level: " + info.level + " isPlugged: " + info.isPlugged);
}
## batterycritical
當電池計量的百分比已達到關鍵電池閾值時,將觸發該事件。值是特定于設備。
`batterycritical`處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將一個事件攔截器附加一次 `deviceready` 事件火災。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Tizen
* 火狐瀏覽器作業系統
### 示例
window.addEventListener("batterycritical", onBatteryCritical, false);
function onBatteryCritical(info) {
// Handle the battery critical event
alert("Battery Level Critical " + info.level + "%\nRecharge Soon!");
}
## batterylow
當電池計量的百分比已達到電池計量低門檻,設備特定值時,將觸發該事件。
`batterylow`處理常式傳遞一個物件,包含兩個屬性:
* **級別**: 電池充電 (0-100) 的百分比。*(人數)*
* **isPlugged**: 一個布林值,該值指示設備是否插*(布林值)*
應用程式通常應使用 `window.addEventListener` 將一個事件攔截器附加一次 `deviceready` 事件火災。
### 支援的平臺
* 亞馬遜火 OS
* iOS
* Android 系統
* 黑莓 10
* Tizen
* 火狐瀏覽器作業系統
### 示例
window.addEventListener("batterylow", onBatteryLow, false);
function onBatteryLow(info) {
// Handle the battery low event
alert("Battery Level Low " + info.level + "%");
}