Wiki

Reso-nance numérique | Arts et cultures libres

Outils du site


logiciels:cordova:accueil

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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://ccoenraets.github.io/cordova-tutorial/   * Tutoriel : http://ccoenraets.github.io/cordova-tutorial/
-  * Configurer son téléphone : http://developer.android.com/tools/device.html 
  
 ===== 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 Apache Ant (obligatoire ?) : **sudo apt-get -u install ant** 
  
  
 ==== Configurer son téléphone ==== ==== Configurer son téléphone ====
 +  * Configurer son téléphone : http://developer.android.com/tools/device.html
 +  * Pour Ubuntu : https://github.com/snowdream/51-android
 +Il est possible de tester son application directement sur son téléphone connecté en USB. L'autre option est d'ouvrir un émulateur sur votre ordinateur, mais cela semble plus lent.
  
-android list targets +Sur votre téléphone :  
- +  Paramètres > Outils pour développeurCocher "Deboguer USB"
- +
- +
- +
-https://github.com/snowdream/51-android +
-nstall +
- +
-1.Open the console to copy the file "51-android.rulesto "/etc/udev/rules.d/51-android.rules" by executing the command below. To Achieve it,you should be sure that you have the root permission. +
- +
-sudo curl --create-dirs -L -o /etc/udev/rules.d/51-android.rules -O -L https://raw.githubusercontent.com/snowdream/51-android/master/51-android.rules +
- +
-2.To give it appropriate permissions next execute the command: +
- +
-sudo chmod a+r /etc/udev/rules.d/51-android.rules +
- +
-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/ directory. If connected, you'll see the device name listed as a "device." +
- +
-cd /media/data/Softs/Android/Sdk/platform-tools/ +
-adb devices +
- +
-List of devices attached  +
-7LCAKJZDIBIJ4DHI device +
- +
- +
-http://intown.biz/2014/03/07/android-cordova-emulators/ +
- +
- +
-On Your Phone +
- +
-It is easy to run the app on your own Android phone.  I’m listing this option first because it is reasonably quick, and quicker than the SDK emulator.   First go to Settings, turn on Developer Options and make sure USB Debugging is checked.    You can then connect to your development machine with a USB and execute: +
  
 +Pour Ubuntu, il faut :
 +  - créer un fichier "51-android.rules" : **sudo curl --create-dirs -L -o /etc/udev/rules.d/51-android.rules -O -L https://raw.githubusercontent.com/snowdream/51-android/master/51-android.rules**
 +  - donner les perimissions : **sudo chmod a+r /etc/udev/rules.d/51-android.rules**
 +  - redémarrer : **sudo service udev restart; sudo reboot**
 +  - au redémarrage, vous devriez voir votre téléphone connecté en USB : **adb devices**
  
 +  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 :  
-        Create an Andorid emulator +     **cordova plugin add org.apache.cordova.device** 
-        android create avd -n hello -t 1 +     **cordova plugin add org.apache.cordova.console** 
-        Run the cordova app on the emulator +  Lancer l'application sur votre téléphone : **cordova run android**
-        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/android update sdk --no-ui +
-path avec .bashrc +
-tools/android +
- +
-create avd -n hello -t 1 --abi android-wear/armeabi-v7a +
-cordova emulate android +
- +
- +
- +
- +
- +
- +
  
  
-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://github.com/apache/cordova-plugin-geolocation/blob/master/doc/index.md\\
 +http://stackoverflow.com/questions/19778828/phonegap-enable-gps-location-at-app-runtime\\
 +http://tol8.blogspot.fr/2014/03/how-to-get-reliable-geolocation-data-on.html\\
  
-GEOLOCALISATION 
-cordova plugin add org.apache.cordova.geolocation 
-https://github.com/apache/cordova-plugin-geolocation/blob/master/doc/index.md 
  
-http://stackoverflow.com/questions/19778828/phonegap-enable-gps-location-at-app-runtime 
  
-http://tol8.blogspot.fr/2014/03/how-to-get-reliable-geolocation-data-on.html 
  
-PYTHON ANDROID BUILDOZER 
-https://kivyspacegame.wordpress.com/2014/06/30/tutorial-how-to-build-python-for-android-with-ubuntu-and-buildozer/ 
  
-QT5 FOR ANDROID 
-http://qt-project.org/wiki/Qt5ForAndroid 
/home/resonancg/www/wiki/data/attic/logiciels/cordova/accueil.1425659643.txt.gz · Dernière modification: 2015/03/06 17:34 de resonance