Catégories
Liens
Ceci est une ancienne révision du document !
<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>
Ressources :
Download the Android SDK from developer.android.com
Unzip the Android SDK and place the contents of the 'sdk' folder in ~/Development/adt-bundle/sdk
Add the SDK to your path
PATH=$PATH:~/Development/adt-bundle/sdk/platform-tools:~/Development/adt-bundle/sdk/tools
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 -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:
cordova run android
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