similar concept, for desktop applications:
android list targets android update project -p . -t $target_id android avd # starts an emulator ant debug install
adb kill-server
adb start-server
adb devices # you should see a list of connected devices
npm install -g cordova ios-sim cordova create dirname com.namespace.appname NameSpace cordova platform add ios cordova platform add android cordova build ios cordova emulate ios cordova build android cordova emulate android
plugins:
cordova plugin add org.apache.cordova.console cordova plugin add org.apache.cordova.dialogs cordova plugin add org.apache.cordova.device cordova plugin add org.apache.cordova.console cordova plugin add org.apache.cordova.file cordova plugin add org.apache.cordova.dialogs cordova plugin add org.apache.cordova.file-transfer #cordova plugin add org.apache.cordova.vibration #cordova plugin add org.apache.cordova.statusbar #cordova plugin add plugin.http.request
git clone https://github.com/ccoenraets/cordova-tutorial
log filtering show only CordovaLog items "D" indicates Debug level or above "*:S" indicates to filter out all others adb will show the output from JavaScript console.log
adb logcat -s CordovaLog:D
accedere alla lista delle webview collegate, da chrome:
chrome://inspect/#devices
iOS attaching the Web Inspector from your Safari browser to the Web View in your iOS App (you will need at least iOS 6).
ispezionare i files di un emulatore:
~/Library/Developer/CoreSimulator/Devices
<script src="cordova.js"></script> document.addEventListener('deviceready', function () { if (navigator.notification) { // Override default HTML alert with native dialog window.alert = function (message) { navigator.notification.alert( message, // message null, // callback "Workshop", // title 'OK' // buttonName ); }; } }, false);
fastclick bug: 300ms click lag
<script src="lib/fastclick.js"></script> FastClick.attach(document.body);
scroll
overflow-y: scroll; /* has to be scroll, not auto */ -webkit-overflow-scrolling: touch;
Google material UI
use platform-independent UX
minimal web css frameworks
V:
testing javascript/view:
ionic start myApp
ionic platform add android
ionic platform add ios
ionic serve
ionic build android
ionic emulate android
ionic run android