Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
logiciels:cordova:accueil [2015/03/06 17:34] resonance |
logiciels:cordova:accueil [2016/02/01 00:09] (Version actuelle) resonance |
||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
**Ressources utiles ** : | **Ressources utiles ** : | ||
* Tutoriel : http:// | * Tutoriel : http:// | ||
- | * Configurer son téléphone : http:// | ||
===== Ubuntu | ===== Ubuntu | ||
Ligne 23: | Ligne 22: | ||
- Installer Nodejs | - Installer Nodejs | ||
- Installer Apache Cordova : **npm install -g cordova** (ou avec sudo ?) | - Installer Apache Cordova : **npm install -g cordova** (ou avec sudo ?) | ||
- | - Installer Ant : **sudo apt-get -u install ant** (obligatoire ?) | + | - Installer |
==== Configurer son téléphone ==== | ==== Configurer son téléphone ==== | ||
+ | * Configurer son téléphone : http:// | ||
+ | * Pour Ubuntu : https:// | ||
+ | Il est possible de tester son application directement sur son téléphone connecté en USB. L' | ||
- | android list targets | + | Sur votre téléphone |
- | + | - Paramètres > Outils pour développeur. Cocher | |
- | + | ||
- | + | ||
- | + | ||
- | https:// | + | |
- | nstall | + | |
- | + | ||
- | 1.Open the console to copy the file "51-android.rules" | + | |
- | + | ||
- | sudo curl --create-dirs -L -o / | + | |
- | + | ||
- | 2.To give it appropriate permissions next execute the command: | + | |
- | + | ||
- | sudo chmod a+r / | + | |
- | + | ||
- | 3.Then execute: | + | |
- | + | ||
- | sudo service udev restart | + | |
- | + | ||
- | sudo reboot | + | |
- | + | ||
- | 4.When plugged in over USB, can verify that your device is connected by executing adb devices from your SDK platform-tools/ | + | |
- | + | ||
- | cd / | + | |
- | adb devices | + | |
- | + | ||
- | List of devices attached | + | |
- | 7LCAKJZDIBIJ4DHI device | + | |
- | + | ||
- | + | ||
- | http:// | + | |
- | + | ||
- | + | ||
- | On Your Phone | + | |
- | + | ||
- | It is easy to run the app on your own Android phone. | + | |
+ | Pour Ubuntu, il faut : | ||
+ | - créer un fichier " | ||
+ | - donner les perimissions : **sudo chmod a+r / | ||
+ | - redémarrer : **sudo service udev restart; sudo reboot** | ||
+ | - au redémarrage, | ||
+ | List of devices attached | ||
+ | xxxxxxxxxxxxxx device | ||
==== Créer un projet ==== | ==== Créer un projet ==== | ||
Ligne 74: | Ligne 47: | ||
- **cd workshop** | - **cd workshop** | ||
- Ajouter la plateforme Android : **cordova platform add android** | - Ajouter la plateforme Android : **cordova platform add android** | ||
- | | + | - Ajouter des plugins basiques : |
- | | + | |
- | android create avd -n hello -t 1 | + | |
- | Run the cordova | + | - Lancer l' |
- | cordova emulate android | + | |
- | Build your web app and place it in the www folder, making sure to include config.xml and cordova.js | + | |
- | + | ||
- | + | ||
- | + | ||
- | android sdk | + | |
- | tools/ | + | |
- | path avec .bashrc | + | |
- | tools/ | + | |
- | + | ||
- | create avd -n hello -t 1 --abi android-wear/ | + | |
- | cordova | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | cordova run android | + | ==== Dossier Cordova ==== |
+ | * The www folder is where you will code your HTML / JavaScript application. Open the index.html file in a browser to see the default application created by the Cordova CLI. | ||
+ | * The platforms folder is where Cordova will build your application for different platforms (iOS, Android, etc). The contents of this folder will be automatically generated by the Cordova CLI, and you should never edit code in that directory. | ||
+ | * Plugins are installed in the plugins directory. | ||
+ | * Application parameters (name, author, etc) are stored in config.xml. | ||
+ | ==== Géolocalisation ==== | ||
+ | cordova plugin add org.apache.cordova.geolocation \\ | ||
+ | https:// | ||
+ | http:// | ||
+ | http:// | ||
- | GEOLOCALISATION | ||
- | cordova plugin add org.apache.cordova.geolocation | ||
- | https:// | ||
- | http:// | ||
- | http:// | ||
- | PYTHON ANDROID BUILDOZER | ||
- | https:// | ||
- | QT5 FOR ANDROID | ||
- | http:// |