Repository: cordova-plugin-battery-status Updated Branches: refs/heads/master 362c457e2 -> ca143ac2e
Lisa testing pulling in plugins for plugin: cordova-plugin-battery-status Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/commit/ca143ac2 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/tree/ca143ac2 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/diff/ca143ac2 Branch: refs/heads/master Commit: ca143ac2eeb08e8907a6611de94b940efb587a1b Parents: 5558e84 Author: ldeluca <[email protected]> Authored: Thu Feb 27 11:14:18 2014 -0500 Committer: Andrew Grieve <[email protected]> Committed: Mon Apr 28 23:05:21 2014 -0400 ---------------------------------------------------------------------- doc/fr/index.md | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-battery-status/blob/ca143ac2/doc/fr/index.md ---------------------------------------------------------------------- diff --git a/doc/fr/index.md b/doc/fr/index.md new file mode 100644 index 0000000..c19e8c7 --- /dev/null +++ b/doc/fr/index.md @@ -0,0 +1,129 @@ +<!--- + 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 org.apache.cordova.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 une fois le `deviceready` événement incendies. par exemple : + +### Plates-formes prises en charge + +* Amazon Fire OS +* iOS +* Android +* BlackBerry 10 +* Windows Phone 7 et 8 +* Paciarelli + +### 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 + +### 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 + +### Exemple + + window.addEventListener("batterylow", onBatteryLow, false); + + function onBatteryLow(info) { + // Handle the battery low event + alert("Battery Level Low " + info.level + "%"); + } \ No newline at end of file
