Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 91C8710E20 for ; Mon, 24 Feb 2014 18:38:38 +0000 (UTC) Received: (qmail 22385 invoked by uid 500); 24 Feb 2014 18:37:44 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 21538 invoked by uid 500); 24 Feb 2014 18:37:28 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 21354 invoked by uid 99); 24 Feb 2014 18:37:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 18:37:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 208EA903981; Mon, 24 Feb 2014 18:37:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: steven@apache.org To: commits@cordova.apache.org Date: Mon, 24 Feb 2014 18:37:43 -0000 Message-Id: <82e32002d8754d36aca17884b41fa6eb@git.apache.org> In-Reply-To: <84f3eb0d5f184550ab1fd059865831ea@git.apache.org> References: <84f3eb0d5f184550ab1fd059865831ea@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [23/51] [partial] added 3.4.0 for other languages http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/accelerometer/accelerometer.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/accelerometer/accelerometer.md b/docs/fr/3.4.0/cordova/accelerometer/accelerometer.md new file mode 100644 index 0000000..89df159 --- /dev/null +++ b/docs/fr/3.4.0/cordova/accelerometer/accelerometer.md @@ -0,0 +1,86 @@ +--- + +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. +--- + +# Accéléromètre + +> Capture le mouvement d'un appareil sur les axes *x*, *y* et *z* . + +## Méthodes + +* accelerometer.getCurrentAcceleration +* accelerometer.watchAcceleration +* accelerometer.clearWatch + +## Arguments + +* accelerometerSuccess +* accelerometerError +* accelerometerOptions + +## Objets (lecture seule) + +* Acceleration + +## Accéder à la fonctionnalité + +Depuis la version 3.0, Cordova implémente les API liées à l'appareil en tant que *plugins*. Utiliser la commande `plugin` de l'Interface en Ligne de Commande, décrite dans la section intitulée L'Interface en Ligne de Commande, afin d'ajouter ou retirer cette fonctionnalité à un projet : + + $ cordova plugin add org.apache.cordova.device-motion + $ cordova plugin ls + [ 'org.apache.cordova.device-motion' ] + $ cordova plugin rm org.apache.cordova.device-motion + + +Ces commandes s'appliquent à toutes les plates-formes ciblées mais modifient les paramètres de configuration spécifiques aux différentes plates-formes tel que décrit ci-dessous : + +* Android (dans`app/res/xml/config.xml`) + + + + + + +* BlackBerry WebWorks + + (in www/plugins.xml) + + + + + (in www/config.xml) + + + + +* iOS (dans`config.xml`) + + + + + + +* Windows Phone (dans`Properties/WPAppManifest.xml`) + + + + + + + Référence : [Manifeste d'Application pour Windows Phone][1] + + [1]: http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx + +Certaines plates-formes peuvent prendre en charge cette fonctionnalité sans nécessiter aucune configuration spéciale. Voir *Support de plate-forme* dans la section vue d'ensemble. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/accelerometer/accelerometer.watchAcceleration.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/accelerometer/accelerometer.watchAcceleration.md b/docs/fr/3.4.0/cordova/accelerometer/accelerometer.watchAcceleration.md new file mode 100644 index 0000000..d6a1425 --- /dev/null +++ b/docs/fr/3.4.0/cordova/accelerometer/accelerometer.watchAcceleration.md @@ -0,0 +1,129 @@ +--- + +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. +--- + +# accelerometer.watchAcceleration + +À intervalle régulier, obtenez l'accélération suivant l'axe *x*, *y*et *z* . + + var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess, + accelerometerError, + [accelerometerOptions]); + + +## Description + +L'accéléromètre est un capteur de mouvement qui détecte la modification (delta) en mouvement par rapport à la position actuelle. L'accéléromètre permet de détecter un mouvement 3D le long des axes *x*, *y*et *z*. + +La méthode `accelerometer.watchAcceleration` récupère `Acceleration` de l'appareil à intervalle régulier, exécutant la fonction de callback `accelerometerSuccess` à chaque fois. Spécifiez l'intervalle, en millisecondes, via le paramètre `frequency` de l'objet `acceleratorOptions`. + +L'ID de surveillance référence les intervalles de surveillance de l'accéléromètre et peut être utilisé avec `accelerometer.clearWatch` pour arrêter de surveiller l'accéléromètre. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Tizen +* Windows Phone 7 et 8 +* Windows 8 + +## Exemple rapide + + function onSuccess(acceleration) { + alert('Acceleration X: ' + acceleration.x + '\n' + + 'Acceleration Y: ' + acceleration.y + '\n' + + 'Acceleration Z: ' + acceleration.z + '\n' + + 'Timestamp: ' + acceleration.timestamp + '\n'); + }; + + function onError() { + alert('onError!'); + }; + + var options = { frequency: 3000 }; // Update every 3 seconds + + var watchID = navigator.accelerometer.watchAcceleration(onSuccess, onError, options); + + +## Exemple complet + + + + + Acceleration Example + + + + + +
Waiting for accelerometer...
+ + + + +## Caprices d'iOS + +L'API appelle la fonction de callback de succès à l'intervalle demandé mais restreint l'éventail des demandes à l'appareil entre 40ms et 1000ms. Par exemple, si vous demandez un intervalle de 3 secondes, (3000ms), l'API demande des données de l'appareil toutes les 1 seconde, mais exécute seulement le callback de succès toutes les 3 secondes. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerError.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerError.md b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerError.md new file mode 100644 index 0000000..45a4aec --- /dev/null +++ b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerError.md @@ -0,0 +1,23 @@ +--- + +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. +--- + +# accelerometerError + +Fonction callback onError pour les méthodes d'accélération. + + function() { + // Handle the error + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerOptions.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerOptions.md b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerOptions.md new file mode 100644 index 0000000..e17ae83 --- /dev/null +++ b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerOptions.md @@ -0,0 +1,23 @@ +--- + +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. +--- + +# accelerometerOptions + +Paramètre optionnel permettant la personnalisation de la récupération des valeurs de l'accéléromètre. + +## Options + +* **frequency**: Fréquence de récupération de l'`Acceleration` en millisecondes. *(Number)* (Défaut : 10000) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerSuccess.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerSuccess.md b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerSuccess.md new file mode 100644 index 0000000..bf1b6e4 --- /dev/null +++ b/docs/fr/3.4.0/cordova/accelerometer/parameters/accelerometerSuccess.md @@ -0,0 +1,37 @@ +--- + +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. +--- + +# accelerometerSuccess + +Function callback onSuccess qui fournit les informations d'`Acceleration`. + + function(acceleration) { + // Do something + } + + +## Paramètres + +* **acceleration**: L'accélération pour un instant donné. (Acceleration) + +## Exemple + + function onSuccess(acceleration) { + alert('Acceleration X: ' + acceleration.x + '\n' + + 'Acceleration Y: ' + acceleration.y + '\n' + + 'Acceleration Z: ' + acceleration.z + '\n' + + 'Timestamp: ' + acceleration.timestamp + '\n'); + }; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/camera.cleanup.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/camera.cleanup.md b/docs/fr/3.4.0/cordova/camera/camera.cleanup.md new file mode 100644 index 0000000..342a9c9 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/camera.cleanup.md @@ -0,0 +1,42 @@ +--- + +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. +--- + +# camera.cleanup + +Supprime les photos intermédiaires prises par la caméra sur le support de stockage temporaire. + + navigator.camera.cleanup( cameraSuccess, cameraError ); + + +## Description + +Supprime les fichiers d'image intermédiaire qui sont conservés dans le support de stockage temporaire après l'appel à `camera.getPicture`. S'applique uniquement lorsque la valeur de `Camera.sourceType` est égale à `Camera.PictureSourceType.CAMERA` et `Camera.destinationType` est égale à `Camera.DestinationType.FILE_URI`. + +## Plates-formes prises en charge + +* iOS + +## Exemple + + navigator.camera.cleanup(onSuccess, onFail); + + function onSuccess() { + console.log("Camera cleanup success.") + } + + function onFail(message) { + alert('Failed because: ' + message); + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/camera.getPicture.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/camera.getPicture.md b/docs/fr/3.4.0/cordova/camera/camera.getPicture.md new file mode 100644 index 0000000..ee0bc18 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/camera.getPicture.md @@ -0,0 +1,214 @@ +--- + +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. +--- + +# camera.getPicture + +Prend une photo à l'aide de la caméra, ou récupère une photo de la Galerie d'images de l'appareil. L'image est passée au callback "succès" comme une `String` encodée en base64 ou l'URI du fichier de l'image. La méthode elle-même renvoie un objet `CameraPopoverHandle` qui permet de repositionner la boite de dialogue de selection d'image. + + navigator.camera.getPicture( cameraSuccess, cameraError, [ cameraOptions ] ); + + +## Description + +La fonction `camera.getPicture` ouvre l'application par défaut de l'appareil qui permet aux utilisateurs de prendre des photos. Ce comportement se produit par défaut, lorsque `Camera.sourceType` est égal à `Camera.PictureSourceType.CAMERA`. Une fois que l'utilisateur a pris la photo, l'application "camera" se ferme et l'application est restaurée. + +Si `Camera.sourceType` est `Camera.PictureSourceType.PHOTOLIBRARY` ou `Camera.PictureSourceType.SAVEDPHOTOALBUM`, alors une boîte de dialogue s'affiche pour permettre aux utilisateurs de sélectionner une image existante. La fonction `camera.getPicture` retourne un objet `CameraPopoverHandle` qui permet de repositionner le dialogue de sélection d'image, par exemple, lorsque l'orientation de l'appareil change. + +La valeur de retour est envoyée à la fonction callback `cameraSuccess`, dans l'un des formats suivants, selon spécifié par `cameraOptions` : + +* A `String` contenant l'image photo codée en base64. + +* A `String` qui représente l'emplacement du fichier image sur le stockage local (par défaut). + +Vous pouvez faire ce que vous voulez avec l'image encodée ou l'URI, par exemple : + +* Afficher l'image dans un `` tag, comme dans l'exemple ci-dessous + +* Enregistrer les données localement ( `LocalStorage` , [poids][1], etc..) + +* Publier les données sur un serveur distant + + [1]: http://brianleroux.github.com/lawnchair/ + +**REMARQUE :**La résolution des photos sur les nouveaux appareils est assez bonne. Les photos sélectionnées de la Galerie de l'appareil ne sont pas réduites avec une baisse de la qualité, même si un paramètre de `qualité` est spécifié. Pour éviter les problèmes de mémoire, définissez `Camera.destinationType` à `FILE_URI` plutôt que `DATA_URL`. + +## Plates-formes prises en charge + +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* iOS +* Tizen +* Windows Phone 7 et 8 +* Windows 8 + +## Bizarreries Android + +Android utilise des objets de type Intends pour lancer l'activité de l'appareil photo sur le périphérique pour capturer des images. Sur les téléphones avec peu de mémoire, l'activité de Cordova peut être tuée. Dans ce scénario, l'image peut ne pas apparaître lorsque l'activité de cordova est restaurée. + +## Bizarreries iOS + +L'inclusion d'un `alert()` JavaScript dans une des fonctions callback peut causer des problèmes. Encapsuler l'alerte dans un `setTimeout()` pour permettre au sélecteur d'images iOS de se fermer entièrement avant que l'alerte s'affiche : + + setTimeout(function() {/ / votre code ici!}, 0) ; + + +## Bizarreries Windows Phone 7 + +L'invocation de l'application native "caméra" alors que votre appareil est connecté via Zune ne fonctionne pas et déclenche une erreur. + +## Bizarreries de Tizen + +Tizen prend uniquement en charge un `destinationType` de `Camera.DestinationType.FILE_URI` et un `sourceType` de `Camera.PictureSourceType.PHOTOLIBRARY`. + +## Petit exemple + +Prendre une photo, puis l'extraire comme une image codée en base64 : + + navigator.camera.getPicture(onSuccess, onFail, { quality: 50, + destinationType: Camera.DestinationType.DATA_URL + }); + + function onSuccess(imageData) { + var image = document.getElementById('myImage'); + image.src = "data:image/jpeg;base64," + imageData; + } + + function onFail(message) { + alert('Failed because: ' + message); + } + + +Prendre une photo et récupérer l'emplacement du fichier de l'image : + + navigator.camera.getPicture(onSuccess, onFail, { quality: 50, + destinationType: Camera.DestinationType.FILE_URI }); + + function onSuccess(imageURI) { + var image = document.getElementById('myImage'); + image.src = imageURI; + } + + function onFail(message) { + alert('Failed because: ' + message); + } + + +## Exemple complet + + + + + Capture Photo + + + + + +
+
+
+
+ + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/camera.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/camera.md b/docs/fr/3.4.0/cordova/camera/camera.md new file mode 100644 index 0000000..b029324 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/camera.md @@ -0,0 +1,94 @@ +--- + +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. +--- + +# Appareil photo + +> L'objet `camera` donne accès à l'application de caméra par défaut de l'appareil. + +**Remarque importante sur la vie privée :** La collecte et l'utilisation des images de la caméra d'un appareil de mesure soulève des questions importantes concernant la vie privée. La politique de confidentialité de votre application doit examiner comment l'application utilise l'appareil photo et si les images enregistrées sont partagées avec d'autres parties. En outre, si l'utilisation de l'application de la caméra n'est pas apparente dans l'interface utilisateur, vous devez fournir un avis juste-à-temps avant que votre application n'accède à la caméra (si le système d'exploitation de périphérique ne le fait pas déjà). Cet avis doit fournir les mêmes renseignements mentionnés précédemment, ainsi que d'obtenir l'autorisation de l'utilisateur (par exemple, en présentant des choix **OK** et **Non merci**). Pour plus d'informations, consultez le Guide de la vie privée. + +## Méthodes + +* camera.getPicture +* Camera.Cleanup + +## Accéder à la fonctionnalité + +Depuis la version 3.0, Cordova implémente des APIs au niveau du périphérique en tant que *plugins*. Utilisez le `plugin` de l'interface en ligne de commande, décrite dans l'Interface de ligne de commande, pour ajouter ou supprimer cette fonction pour un projet : + + $ cordova plugin add org.apache.cordova.camera + $ cordova plugin ls + [ 'org.apache.cordova.camera' ] + $ cordova plugin rm org.apache.cordova.camera + + +Ces commandes s'appliquent à toutes les plates-formes ciblées, mais modifient les paramètres de configuration spécifiques à la plateforme décrites ci-dessous : + +* Android + + (in app/res/xml/config.xml) + + + + + (in app/AndroidManifest) + + + +* BlackBerry WebWorks + + (in www/plugins.xml) + + + + + (in www/config.xml) + + + + use_camera + + + +* iOS (en`config.xml`) + + + + + + +* Windows Phone (en`Properties/WPAppManifest.xml`) + + + + + + + + Référence : [manifeste d'Application pour Windows Phone][1] + +* Paciarelli (dans`config.xml`) + + + + + + Référence : [Manifeste d'Application pour Applications Web Paciarelli][2] + + [1]: http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx + [2]: https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures + +Certaines plates-formes peuvent prendre en charge cette fonctionnalité sans nécessiter aucune configuration spéciale. Voir *Support de plate-forme* dans la section vue d'ensemble. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverHandle.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverHandle.md b/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverHandle.md new file mode 100644 index 0000000..1d9e640 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverHandle.md @@ -0,0 +1,61 @@ +--- + +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. +--- + +# CameraPopoverHandle + +Agit sur la boîte de dialogue créée par `camera.getPicture`. + +## Méthodes + +* **setPosition**: Définit la position de la boite de dialogue. + +## Plates-formes suportées + +* iOS + +## setPosition + +Définit la position de la boite de dialogue. + +**Paramètres :** + +* `cameraPopoverOptions`: l'objet `CameraPopoverOptions` spécifiant la nouvelle position + +## Exemple court + + var cameraPopoverOptions = new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY); + cameraPopoverHandle.setPosition(cameraPopoverOptions); + + +## Exemple complet + + function onSuccess(imageData) { + // Do stuff with the image! + } + + function onFail(message) { + alert('Failed to get the picture: ' + message); + } + + var cameraPopoverHandle = navigator.camera.getPicture(onSuccess, onFail, + { destinationType: Camera.DestinationType.FILE_URI, + sourceType: Camera.PictureSourceType.PHOTOLIBRARY }); + + // Reposition the popover if the orientation changes. + window.onorientationchange = function() { + var cameraPopoverOptions = new CameraPopoverOptions(0, 0, 100, 100, 0); + cameraPopoverHandle.setPosition(cameraPopoverOptions); + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverOptions.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverOptions.md b/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverOptions.md new file mode 100644 index 0000000..a4d692a --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/parameter/CameraPopoverOptions.md @@ -0,0 +1,66 @@ +--- + +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. +--- + +# CameraPopoverOptions + +Paramètres, uniquement supportés par iOS, spécifiant l'emplacement d'accroche et la direction de la flèche de la boite de dialogue liée à la sélection d'images dans la bibliothèque et les albums sur iPad. + + { x : 0, y : 32, width : 320, height : 480, arrowDir : Camera.PopoverArrowDirection.ARROW_ANY }; + + +## CameraPopoverOptions + +* **x**: coordonnée en x (pixels) de l'élément à l'écran sur lequel accrocher la boite de dialogue. *(Number)* + +* **y**: coordonnée en y (pixels) de l'élément à l'écran sur lequel accrocher la boite de dialogue. *(Number)* + +* **width**: largeur en pixels de l'élément à l'écran sur lequel accrocher la boite de dialogue. *(Number)* + +* **height**: hauteur en pixels de l'élément à l'écran sur lequel accrocher la boite de dialogue. *(Number)* + +* **arrowDir**: Direction vers laquelle la flèche de la boîte de dialogue doit pointer. Définie dans `Camera.PopoverArrowDirection` *(Number)* + + Camera.PopoverArrowDirection = { + ARROW_UP : 1, // correspondent aux constantes iOS UIPopoverArrowDirection + ARROW_DOWN : 2, + ARROW_LEFT : 4, + ARROW_RIGHT : 8, + ARROW_ANY : 15 + }; + + +Notez que la taille de la boite de dialogue peut varier afin de permettre l'ajustement de la direction de la flèche et de l'orientation de l'écran. Assurez-vous de tenir compte des changements d'orientation lors de la spécification de l'emplacement d'élément d'accroche. + +## Exemple court + + var popover = new CameraPopoverOptions(300, 300, 100, 100, Camera.PopoverArrowDirection.ARROW_ANY); + var options = { + quality : 50, + destinationType : Camera.DestinationType.DATA_URL, + sourceType : Camera.PictureSource.SAVEDPHOTOALBUM, + popoverOptions : popover + }; + + navigator.camera.getPicture(onSuccess, onFail, options); + + function onSuccess(imageData) { + var image = document.getElementById('myImage'); + image.src = "data:image/jpeg;base64," + imageData; + } + + function onFail(message) { + alert('Failed because: ' + message); + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/parameter/cameraError.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/parameter/cameraError.md b/docs/fr/3.4.0/cordova/camera/parameter/cameraError.md new file mode 100644 index 0000000..3503cd9 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/parameter/cameraError.md @@ -0,0 +1,28 @@ +--- + +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. +--- + +# cameraError + +Fonction callback onError qui fournit un message d'erreur. + + function(message) { + // Show a helpful message + } + + +## Paramètres + +* **message** : le message est fourni par du code natif de l'appareil. *(String)* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/parameter/cameraOptions.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/parameter/cameraOptions.md b/docs/fr/3.4.0/cordova/camera/parameter/cameraOptions.md new file mode 100644 index 0000000..668211b --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/parameter/cameraOptions.md @@ -0,0 +1,130 @@ +--- + +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. +--- + +# cameraOptions + +Paramètres optionnels de personnalisation des réglages de l'appareil photo. + + { quality : 75, + destinationType : Camera.DestinationType.DATA_URL, + sourceType : Camera.PictureSourceType.CAMERA, + allowEdit : true, + encodingType: Camera.EncodingType.JPEG, + targetWidth: 100, + targetHeight: 100, + popoverOptions: CameraPopoverOptions, + saveToPhotoAlbum: false }; + + +## Options + +* **quality** : Qualité de l'image enregistrée, comprise entre 0 et 100, où 100 correspond à la pleine résolution de l'appareil, sans perte liée à la compression. *(Number)* (Notez que les informations sur la résolution de l'appareil photo sont indisponibles.) + +* **destinationType**: Choose the format of the return value. Defined in `navigator.camera.DestinationType` *(Number)* + + Camera.DestinationType = { + DATA_URL : 0, // Retourne l'image sous la forme d'une chaîne encodée en base-64 + FILE_URI : 1, // Retourne l'URI du fichier image + NATIVE_URI : 2 // Retourne l'URI native de l'image (ex. assets-library:// sur iOS ou content:// pour Android) + }; + + +* **sourceType**: Set the source of the picture. Defined in `navigator.camera.PictureSourceType` *(Number)* + + Camera.PictureSourceType = { + PHOTOLIBRARY : 0, + CAMERA : 1, + SAVEDPHOTOALBUM : 2 + }; + + +* **allowEdit**: Autoriser une modification simple de l'image avant sa sélection. *(Boolean)* + +* **encodingType**: Choose the returned image file's encoding. Defined in `navigator.camera.EncodingType` *(Number)* + + Camera.EncodingType = { + JPEG : 0, // Renvoie l'image au format JPEG + PNG : 1 // Renvoie l'image au format PNG + }; + + +* **targetWidth**: largeur de sortie en pixels de l'image . Doit être utilisé avec **targetHeight**. Le ratio de l'aspect reste constant. *(Nombre)* + +* **targetHeight**: hauteur de sortie en pixels de l'image. Doit être utilisé avec **targetWidth**. Aspect ratio reste constant. *(Nombre)* + +* **mediaType**: définit le type de média à choisir. Ne fonctionne que quand `PictureSourceType` vaut `PHOTOLIBRARY` ou `SAVEDPHOTOALBUM` . Définie dans `nagivator.camera.MediaType` *(nombre)* + + Camera.MediaType = {photo: 0, / / permettre la sélection de photos seulement. PAR DÉFAUT. Retourne le format spécifié via DestinationType VIDEO: 1, / / autoriser la sélection de la vidéo seulement, RETOURNERA TOUJOURS FILE_URI ALLMEDIA: 2 // permet la sélection de tous les types de médias + + + }; + +* **correctOrientation**: faire pivoter l'image afin de corriger l'orientation de l'appareil lors de la capture. *(Booléen)* + +* **saveToPhotoAlbum**: enregistrer l'image sur l'album photo sur l'appareil après la capture. *(Booléen)* + +* **popoverOptions**: options pour iOS uniquement qui spécifient l'emplacement de la boîte de dialogue sur iPad. Définie dans`CameraPopoverOptions`. + +* **cameraDirection**: Choose the camera to use (front- or back-facing). Defined in `navigator.camera.Direction` *(Number)* + + Camera.Direction = {BACK: 0, // utiliser la caméra arrière FRONT: 1 // utiliser la caméra frontale} ; + + +## Spécificités Android + +* Tout `cameraDirection` résultats dans le back-face photo de valeur. + +* Ignore la `allowEdit` paramètre. + +* `Camera.PictureSourceType.PHOTOLIBRARY`et `Camera.PictureSourceType.SAVEDPHOTOALBUM` les deux affichent le même album photo. + +## Spécificités de BlackBerry + +* Ignore le paramètre `quality`. + +* Ignore le paramètre `sourceType`. + +* Ignore le paramètre `allowEdit`. + +* L'application doit disposer d'autorisations d'injection de clé pour fermer l'application native Camera après que l'utilisateur prenne une photo. + +* L'utilisation d'images de grandes tailles peut entraîner l'incapacité d'encodage sur d'anciens modèles d'appareils (par exemple, le Torch 9800) qui disposent d'un appareil photo haute résolution. + +* `Camera.MediaType` n'est pas pris en charge. + +* Ignore le paramètre `correctOrientation`. + +* Ignore le paramètre `cameraDirection`. + +## Spécificités OS + +* Choisir la valeur `quality` en dessous de 50 pour éviter les erreurs de mémoire sur certains appareils. + +* Lorsque vous utilisez `destinationType.FILE_URI` , les photos sont sauvegardées dans le répertoire temporaire de l'application. Vous pouvez supprimer le contenu de ce répertoire en utilisant l'API `navigator.fileMgr` si l'espace de stockage est un sujet de préoccupation. + +## Bizarreries de paciarelli + +* options non prises en charge + +* retourne toujours un URI de fichier + +## Windows Phone 7 et 8 Quirks + +* Ignore le paramètre `allowEdit`. + +* Ignore le paramètre `correctOrientation`. + +* Ignore le paramètre `cameraDirection`. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/camera/parameter/cameraSuccess.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/camera/parameter/cameraSuccess.md b/docs/fr/3.4.0/cordova/camera/parameter/cameraSuccess.md new file mode 100644 index 0000000..c8470d5 --- /dev/null +++ b/docs/fr/3.4.0/cordova/camera/parameter/cameraSuccess.md @@ -0,0 +1,37 @@ +--- + +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. +--- + +# cameraSuccess + +Fonction de callback onSuccess qui fournit les données de l'image. + + function(imageData) { + // Do something with the image + } + + +## Paramètres + +* **imageData**: codage Base64 de l'image, *ou* le fichier image URI, selon `cameraOptions` utilisé. *(String)* + +## Exemple + + // Show image + // + function cameraCallback(imageData) { + var image = document.getElementById('myImage'); + image.src = "data:image/jpeg;base64," + imageData; + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.clearWatch.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.clearWatch.md b/docs/fr/3.4.0/cordova/compass/compass.clearWatch.md new file mode 100644 index 0000000..f2607f7 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.clearWatch.md @@ -0,0 +1,106 @@ +--- + +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. +--- + +# compass.clearWatch + +Arrêter de regarder la boussole référencée par le paramètre ID de montre. + + navigator.compass.clearWatch(watchID); + + +* **watchID** : l'ID retourné par`compass.watchHeading`. + +## Plates-formes prises en charge + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 et 8 (s'il est disponible dans le matériel) +* Windows 8 + +## Petit exemple + + var watchID = navigator.compass.watchHeading(onSuccess, onError, options); + + // ... later on ... + + navigator.compass.clearWatch(watchID); + + +## Exemple complet + + + + + Compass Example + + + + + +
Waiting for heading...
+ + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.clearWatchFilter.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.clearWatchFilter.md b/docs/fr/3.4.0/cordova/compass/compass.clearWatchFilter.md new file mode 100644 index 0000000..87a6bd5 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.clearWatchFilter.md @@ -0,0 +1,19 @@ +--- + +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. +--- + +# compass.clearWatchFilter + +N'est plus supporté à partir de 1.6. Voir `compass.clearWatch`. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.getCurrentHeading.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.getCurrentHeading.md b/docs/fr/3.4.0/cordova/compass/compass.getCurrentHeading.md new file mode 100644 index 0000000..562f5fe --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.getCurrentHeading.md @@ -0,0 +1,90 @@ +--- + +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. +--- + +# compass.getCurrentHeading + +Téléchargez la direction courante de la boussole. + + navigator.compass.getCurrentHeading(compassSuccess, compassError, compassOptions); + + +## Description + +La boussole est un capteur qui détecte la direction ou la position vers laquelle l'appareil pointe, généralement depuis le haut de l'appareil. Il mesure la direction en degrés de 0 à 359.99, où 0 indique le Nord. + +Les informations de la boussole sont retournées via un objet `CompassHeading` utilisant la fonction de callback `compassSuccess`. + +## Plates-formes prises en charge + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 et 8 (s'il est disponible dans le matériel) +* Windows 8 + +## Petit exemple + + function onSuccess(heading) { + alert('Heading: ' + heading.magneticHeading); + }; + + function onError(error) { + alert('CompassError: ' + error.code); + }; + + navigator.compass.getCurrentHeading(onSuccess, onError); + + +## Exemple complet + + + + + Compass Example + + + + + +

Example

+

getCurrentHeading

+ + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.md b/docs/fr/3.4.0/cordova/compass/compass.md new file mode 100644 index 0000000..86a86c9 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.md @@ -0,0 +1,73 @@ +--- + +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. +--- + +# Boussole + +> Obtient la direction dans laquelle pointe l'appareil. + +## Méthodes + +* compass.getCurrentHeading +* compass.watchHeading +* compass.clearWatch +* compass.watchHeadingFilter (obsolète) +* compass.clearWatchFilter (obsolète) + +## Arguments + +* compassSuccess +* compassError +* compassOptions +* compassHeading + +## Accéder à la fonctionnalité + +Depuis la version 3.0, Cordova implémente les APIs au niveau de l'appareil comme des *plugins*. Utilisez le `plugin` d'interface en ligne de commande, décrite dans l'Interface de ligne de commande, pour ajouter ou supprimer cette fonctionnalité pour un projet : + + $ cordova plugin add org.apache.cordova.device-orientation + $ cordova plugin ls + [ 'org.apache.cordova.device-orientation' ] + $ cordova plugin rm org.apache.cordova.device-orientation + + +Ces commandes s'appliquent à toutes les plates-formes ciblées, mais modifient les paramètres de configuration spécifiques aux plateformes décrites ci-dessous : + +* Android (dans`app/res/xml/config.xml`) + + + + + + +* iOS (en`config.xml`) + + + + + + +* Windows Phone (en`Properties/WPAppManifest.xml`) + + + + + + + Référence : [manifeste d'Application pour Windows Phone][1] + + [1]: http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx + +Certaines plates-formes peuvent prendre en charge cette fonctionnalité sans nécessiter aucune configuration spéciale. Voir *Support de plate-forme* dans la section vue d'ensemble. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.watchHeading.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.watchHeading.md b/docs/fr/3.4.0/cordova/compass/compass.watchHeading.md new file mode 100644 index 0000000..f2d9dac --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.watchHeading.md @@ -0,0 +1,128 @@ +--- + +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. +--- + +# compass.watchHeading + +À intervalle régulier, obtenez la direction de la boussole en degrés. + + var watchID = navigator.compass.watchHeading(compassSuccess, compassError, [compassOptions]); + + +## Description + +La boussole est un capteur qui détecte la direction ou la position vers laquelle l'appareil pointe. Il mesure la direction en degrés de 0 à 359.99. + +Le `compass.watchHeading` obtient la direction actuelle de l'appareil à intervalle régulier. Chaque fois que la direction est récupérée, la fonction de callback `headingSuccess` est exécutée. Spécifiez l'intervalle, en millisecondes, via le paramètre `frequency` dans l'objet `compassOptions`. + +L'ID de surveillance retourné référence l'intervalle de surveillance de la boussole. L'ID de surveillance peut être utilisé avec `compass.clearWatch` pour arrêter de surveiller la boussole. + +## Plates-formes prises en charge + +* Android +* BlackBerry 10 +* iOS +* Tizen +* Windows Phone 7 et 8 (s'il est disponible dans le matériel) +* Windows 8 + +## Petit exemple + + function onSuccess(heading) { + var element = document.getElementById('heading'); + element.innerHTML = 'Heading: ' + heading.magneticHeading; + }; + + function onError(compassError) { + alert('Compass error: ' + compassError.code); + }; + + var options = { + frequency: 3000 + }; // Update every 3 seconds + + var watchID = navigator.compass.watchHeading(onSuccess, onError, options); + + +## Exemple complet + + + + + Compass Example + + + + + +
Waiting for heading...
+ + + + + + +## Spécificités iOS + +Dans iOS `compass.watchHeading` peut également récupérer la direction actuelle de l'appareil lorsqu'elle change d'un certain nombre de degrés. Chaque fois que la direction change du nombre de degrés spécifiés ou plus, la fonction de callback `headingSuccess` s'exécute. Spécifier les degrés de changement via le paramètre `filter` dans l'objet `compassOptions`. Désactivez la boussole comme d'habitude en passant l'ID de surveillance retourné à `compass.clearWatch` . Cette fonctionnalité remplace les fonctionnalités précédentes, uniquement sur iOS, `watchHeadingFilter` et `clearWatchFilter`, qui ont été supprimées dans la version 1.6. + +Seulement un `watchHeading` peut être utilisé à un moment donné sur iOS. Si un `watchHeading` utilise un filtre, un appel à `getCurrentHeading` ou `watchHeading` utilise la valeur existante de filtre pour spécifier des changements de direction. Surveiller les changements de position avec un filtre est plus efficace qu'avec des intervalles de temps. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compass.watchHeadingFilter.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compass.watchHeadingFilter.md b/docs/fr/3.4.0/cordova/compass/compass.watchHeadingFilter.md new file mode 100644 index 0000000..99bdb1f --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compass.watchHeadingFilter.md @@ -0,0 +1,19 @@ +--- + +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. +--- + +# compass.watchHeadingFilter + +N'est plus supporté à partir de 1.6, voir `compass.watchHeading` pour une fonctionnalité équivalente. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/compassError/compassError.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/compassError/compassError.md b/docs/fr/3.4.0/cordova/compass/compassError/compassError.md new file mode 100644 index 0000000..01ae83e --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/compassError/compassError.md @@ -0,0 +1,32 @@ +--- + +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. +--- + +# CompassError + +Un objet `CompassError` est retourné à la fonction de callback `compassError` lorsqu'une erreur survient. + +## Propriétés + +* **code**: l'un des codes d'erreur prédéfinis énumérés ci-dessous. + +## Constantes + +* `CompassError.COMPASS_INTERNAL_ERR` +* `CompassError.COMPASS_NOT_SUPPORTED` + +## Description + +Lorsqu'une erreur se produit, l'objet `CompassError` est passé en paramètre de la fonction de callback `compassError`. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/parameters/compassError.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/parameters/compassError.md b/docs/fr/3.4.0/cordova/compass/parameters/compassError.md new file mode 100644 index 0000000..ed26253 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/parameters/compassError.md @@ -0,0 +1,25 @@ +--- + +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. +--- + +# compassError + +fonction de callback onError pour les fonctions de la boussole. + +## Exemple + + function(CompassError) { + // Handle the error + } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/parameters/compassHeading.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/parameters/compassHeading.md b/docs/fr/3.4.0/cordova/compass/parameters/compassHeading.md new file mode 100644 index 0000000..063d1d5 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/parameters/compassHeading.md @@ -0,0 +1,45 @@ +--- + +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. +--- + +# compassHeading + +Un objet `CompassHeading` est retourné à la fonction de callback `compassSuccess`. + +## Propriétés + +* **magneticHeading**: la position en degrés de 0-359,99 à un instant donné. *(Nombre)* + +* **trueHeading**: la position par rapport au pôle Nord géographique en degrés 0-359,99 à un instant donné. Une valeur négative indique que la véritable direction ne peut pas être déterminée. *(Nombre)* + +* **headingAccuracy**: la déviation en degrés entre la direction signalée et la véritable direction. *(Nombre)* + +* **horodatage**: l'heure à laquelle cette direction a été déterminée. *(millisecondes)* + +## Description + +L'objet `CompassHeading` est retourné à la fonction de callback `compassSuccess`. + +## Spécificités Android + +* `trueHeading`n'est pas pris en charge, mais retourne la même valeur que `magneticHeading` + +* `headingAccuracy` est toujours égal à 0 car il n'y a pas de différence entre `magneticHeading` et `trueHeading`. + +## Spécificités iOS + +* `trueHeading` is only returned when location services are enabled via `navigator.geolocation.watchLocation()` + +* Pour les appareils sous iOS 4 et suivants, les facteurs de direction de l'orientation actuelle de l'appareil, pas en référence à sa position absolue, pour les applications prenant en charge cette orientation. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/parameters/compassOptions.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/parameters/compassOptions.md b/docs/fr/3.4.0/cordova/compass/parameters/compassOptions.md new file mode 100644 index 0000000..2238fc2 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/parameters/compassOptions.md @@ -0,0 +1,39 @@ +--- + +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. +--- + +# compassOptions + +Un paramètre optionnel pour personnaliser la récupération de la boussole. + +## Options + +* **fréquence** : la fréquence de récupération de la boussole en millisecondes. *(Nombre)* (Par défaut : 100) + +* **filtre** : la variation en degrés nécessaire pour initier la fonction de callback de succès watchHeading. *(Nombre)* + +Spécificités Android + +--- + +* `filter` n'est pas pris en charge. + +## Spécificités Tizen + +* `filter` n'est pas pris en charge. + +## Spécificités Windows Phone 7 et 8 + +* `filter` n'est pas pris en charge. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/compass/parameters/compassSuccess.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/compass/parameters/compassSuccess.md b/docs/fr/3.4.0/cordova/compass/parameters/compassSuccess.md new file mode 100644 index 0000000..e5c4a41 --- /dev/null +++ b/docs/fr/3.4.0/cordova/compass/parameters/compassSuccess.md @@ -0,0 +1,34 @@ +--- + +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. +--- + +# compassSuccess + +fonction de callback onSuccess qui fournit les informations de la boussole via un objet `compassHeading`. + + function(heading) { + // Do something + } + + +## Paramètres + +* **rubrique** : les informations de direction. *(compassHeading)* + +## Exemple + + function onSuccess(heading) { + alert('Heading: ' + heading.magneticHeading); + }; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/connection/connection.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/connection/connection.md b/docs/fr/3.4.0/cordova/connection/connection.md new file mode 100644 index 0000000..78c85cc --- /dev/null +++ b/docs/fr/3.4.0/cordova/connection/connection.md @@ -0,0 +1,95 @@ +--- + +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. +--- + +# Connexion + +> L'objet `connection`, disponible via `navigator.connection`, fournit des informations sur la connection cellulaire/wifi de l'appareil. + +## Propriétés + +* connection.type + +## Constantes + +* Connection.UNKNOWN +* Connection.ETHERNET +* Connection.WIFI +* Connection.CELL_2G +* Connection.CELL_3G +* Connection.CELL_4G +* Connection.CELL +* Connection.NONE + +## Accéder à la fonctionnalité + +Depuis la version 3.0, Cordova implémente les API liées à l'appareil en tant que *plugins*. Utiliser la commande `plugin` de l'Interface en Ligne de Commande, décrite dans la section intitulée L'Interface en Ligne de Commande, afin d'ajouter ou retirer cette fonctionnalité à un projet : + + $ cordova plugin add org.apache.cordova.network-information + $ cordova plugin ls + [ 'org.apache.cordova.network-information' ] + $ cordova plugin rm org.apache.cordova.network-information + + +Ces commandes s'appliquent à toutes les plates-formes ciblées mais modifient les paramètres de configuration spécifiques aux différentes plates-formes tel que décrit ci-dessous : + +* Android + + (in app/res/xml/config.xml) + + + + + (in app/AndroidManifest.xml) + + + + + +* BlackBerry WebWorks + + (in www/plugins.xml) + + + + + +* iOS (en`config.xml`) + + + + + + +* Windows Phone (en`Properties/WPAppManifest.xml`) + + + + + + + Référence : [manifeste d'Application pour Windows Phone][1] + +* Paciarelli (dans`config.xml`) + + + + + Référence : [manifeste d'Application pour l'Application Web paciarelli][2] + + [1]: http://msdn.microsoft.com/en-us/library/ff769509%28v=vs.92%29.aspx + [2]: https://developer.tizen.org/help/topic/org.tizen.help.gs/Creating%20a%20Project.html?path=0_1_1_3#8814682_CreatingaProject-EditingconfigxmlFeatures + +Certaines plates-formes peuvent prendre en charge cette fonctionnalité sans nécessiter aucune configuration spéciale. Voir *Support de plate-forme* dans la section vue d'ensemble. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/2506e7b9/docs/fr/3.4.0/cordova/connection/connection.type.md ---------------------------------------------------------------------- diff --git a/docs/fr/3.4.0/cordova/connection/connection.type.md b/docs/fr/3.4.0/cordova/connection/connection.type.md new file mode 100644 index 0000000..18b8110 --- /dev/null +++ b/docs/fr/3.4.0/cordova/connection/connection.type.md @@ -0,0 +1,119 @@ +--- + +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. +--- + +# connection.type + +Vérifie la connexion réseau en cours d'activité. + +## Description + +Cette propriété offre un moyen rapide pour déterminer l'état et le type de la connexion réseau de l'appareil. + +## Plates-formes supportées + +* iOS +* Android +* BlackBerry WebWorks (OS 5.0 et plus) +* Paciarelli +* Windows Phone 7 et 8 +* Windows 8 + +## Exemple court + + function checkConnection() { + var networkState = navigator.connection.type; + + var states = {}; + states[Connection.UNKNOWN] = 'Unknown connection'; + states[Connection.ETHERNET] = 'Ethernet connection'; + states[Connection.WIFI] = 'WiFi connection'; + states[Connection.CELL_2G] = 'Cell 2G connection'; + states[Connection.CELL_3G] = 'Cell 3G connection'; + states[Connection.CELL_4G] = 'Cell 4G connection'; + states[Connection.CELL] = 'Cell generic connection'; + states[Connection.NONE] = 'No network connection'; + + alert('Connection type: ' + states[networkState]); + } + + checkConnection(); + + +## Exemple complet + + + + + navigator.connection.type Example + + + + + +

A dialog box will report the network state.

+ + + + +## Changement d'API + +Jusqu'à Cordova 2.3.0, l'objet `Connection` était accessible via `navigator.network.connection` ; ceci a été changé pour `navigator.connection` afin de concorder avec la spécification du W3C. L'accès est toujours possible à l'emplacement d'origine, mais est considéré comme obsolète et sera bientôt supprimé. + +## Notes au sujet d'iOS + +* iOS ne permet pas de détecter le type de connexion pour un réseau cellulaire. + * `navigator.connection.type` is set to `Connection.CELL` for all cellular data. + +## Notes au sujet de Windows Phone + +* When running in the emulator, always detects `navigator.connection.type` as `Connection.UNKNOWN`. + +* Windows Phone ne permet pas de détecter le type de connexion pour un réseau cellulaire. + + * `navigator.connection.type` is set to `Connection.CELL` for all cellular data. + +## Notes au sujet de Paciarelli + +* Paciarelli peut uniquement détecter une connexion cellulaire ou bien WiFi. + * `navigator.connection.type` is set to `Connection.CELL_2G` for all cellular data. \ No newline at end of file