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

Prochaine révision
Révision précédente
logiciels:cordova:accueil [2015/03/06 17:10]
resonance créée
logiciels:cordova:accueil [2016/02/01 00:09] (Version actuelle)
resonance
Ligne 1: Ligne 1:
 ====== Apache Cordova ====== ====== Apache Cordova ======
  
-<blockquote>Apache Cordova ou plus anciennement Apache Callback ou PhoneGap1, est un framework open-source développé par la Fondation Apache. Il permet de créer des applications mobiles pour différentes plates-formes (Android, iOS, Windows 8...) en HTML, CSS et JavaScript. Les applications qui en résultent sont hybrides, ce qui signifie qu'elles ne sont ni vraiment natives, ni purement basées sur les langages HTML, CSS et JavaScript.</blockquote>+<blockquote>Apache Cordova ou plus anciennement Apache Callback ou PhoneGap, est un framework open-source développé par la Fondation Apache. Il permet de créer des applications mobiles pour différentes plates-formes (Android, iOS, Windows 8...) en HTML, CSS et JavaScript. Les applications qui en résultent sont hybrides, ce qui signifie qu'elles ne sont ni vraiment natives, ni purement basées sur les langages HTML, CSS et JavaScript.</blockquote>
  
 +**Ressources utiles ** :
 +  * Tutoriel : http://ccoenraets.github.io/cordova-tutorial/
  
-**Ressources** : +===== Ubuntu  ===== 
-  * http://ccoenraets.github.io/cordova-tutorial/ +Version de test Ubuntu 14.04 LTS.
-  * http://www.web-tuto.fr/video/4229/tutoriel-apache-cordova-compiler-sur-android +
-  * http://developer.android.com/tools/device.html+
  
-===== Ubuntu =====+==== Installation ====
   * http://chrislarson.me/blog/how-use-cordova-ubuntu-build-android-apps.html   * http://chrislarson.me/blog/how-use-cordova-ubuntu-build-android-apps.html
 +  * http://www.web-tuto.fr/video/4229/tutoriel-apache-cordova-compiler-sur-android
  
 +  - Télécharger le Android SDK sur developer.android.com
 +  - Décompresser et placer le dans votre dossier personnel par exemple : ~/Android
 +  - Ajouter le chemin vers les SDK dans le fichier :
 +    - **nano ~/.bashrc**
 +    - Placer au début du fichier **PATH=$PATH ~/Android/Sdk/platform-tools: ~/Android/Sdk/tools**. Ctl-O (écrire), Ctl-q (quitter).
 +    - Puis redémarrer pour être sûr (ou faire **source ~/.bashrc**
 +  - Télécharger les mises à jour ou ajouts : **android update sdk --no-ui**
 +  - Installer Nodejs
 +  - Installer Apache Cordova : **npm install -g cordova** (ou avec sudo ?)
 +  - Installer Apache Ant (obligatoire ?) : **sudo apt-get -u install ant** 
  
  
-     Download the Android SDK from developer.android.com +==== Configurer son téléphone ==== 
-    Unzip the Android SDK and place the contents of the 'sdk' folder in ~/Development/adt-bundle/sdk +  * Configurer son téléphone http://developer.android.com/tools/device.html 
-        Add the SDK to your path +  * Pour Ubuntu : https://github.com/snowdream/51-android 
-        PATH=$PATH:~/Development/adt-bundle/sdk/platform-tools:~/Development/adt-bundle/sdk/tools +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 ordinateurmais cela semble plus lent.
-        To permanently add the Android SDK to your Ubuntu path follow this Ubuntu.com article +
-    install Apache Cordova with npm npm install -g cordova (Install nodejs if you don't have it.+
-        cd to your Documents directory and create a helloWorld folder, then cd into that folder +
-        cd ~/Documents +
-        mkdir helloWorld +
-        cd helloWorld +
-        Create a Cordova app and cd to the new folder +
-        cordova create hello com.example.hello "Hello World" +
-        cd hello/ +
-        Add Android as a cordova platform +
-        cordova platform add android +
-        Create an Andorid emulator +
-        android create avd -n hello -t 1 +
-        Run the cordova app on the emulator +
-        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 +
-android list targets +
-create avd -n hello -t 1 --abi android-wear/armeabi-v7a +
-cordova emulate android +
- +
- +
- +
- +
-make sure you have ant installed and added to your PATH. +
-sudo apt-get -u install ant +
- +
- +
- +
-https://github.com/snowdream/51-android +
-nstall +
- +
-1.Open the console to copy the file "51-android.rules" to "/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 --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 USBcan verify that your device is connected by executing adb devices from your SDK platform-tools/ directoryIf 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+
  
 +Sur votre téléphone : 
 +  - Paramètres > Outils pour développeur. Cocher "Deboguer USB"
  
-http://intown.biz/2014/03/07/android-cordova-emulators/+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
  
-On Your Phone+==== Créer un projet ==== 
 +  - Créer un dossier pour votre projet  : **cd ~/Projects; mkdir helloWorld, cd helloWorld** 
 +  - Créer une application Cordova : **ordova create workshop com.yourname.workshop Workshop** 
 +  - **cd workshop** 
 +  - Ajouter la plateforme Android : **cordova platform add android** 
 +  - Ajouter des plugins basiques :  
 +     - **cordova plugin add org.apache.cordova.device** 
 +     - **cordova plugin add org.apache.cordova.console** 
 +  - Lancer l'application sur votre téléphone : **cordova run android**
  
-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: 
  
-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.1425658248.txt.gz · Dernière modification: 2015/03/06 17:10 de resonance