SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
OVERVIEW AND 
INTRODUCTION 
Gabriele Falasca - Università degli studi dell’Aquila
HELLO WORLD!!! 
I’M GABRIELE FALASCA, STUDENT AT UNIVERSITÀ DEGLI 
STUDI DELL’AQUILA, AND MOBILE APPLICATION 
DEVELOPER FREELANCE 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGIN 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
Gabriele Falasca - Università degli studi dell’Aquila
SUPPORTED PLATFORMS 
NOT ONLY ANDROID IOS AND WP8!! 
● WINDOWS 8 - 8.1 
● FIREFOX OS 
● BLACKBERRY 10 
● FIREOS 
● UBUNTU PHONE 
● TIZEN 
AND SO ON... 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGIN 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
HOW TO INSTALL 
FIRST, INSTALL NPM, THEN OPEN YOUR COMMAND-LINE AND 
TYPE 
$ sudo npm install -g cordova 
THEN TYPE YOUR SUDO PASSWORD AND PRESS ENTER 
MORE INFORMATION ABOUT NPM HERE: https://www.npmjs.org/ 
Gabriele Falasca - Università degli studi dell’Aquila
HOW TO INSTALL 
THEN, YOU HAVE TO ADD ANDROID SDK PATH ON ENVIRONMENT VARIABLES 
$ export ANDROID_HOME = /yourAndroidSDKdirectory/sdk 
$ export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools 
DOWNLOAD ANDROID SDK FROM: https://developer.android.com/sdk/ 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGIN 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
CORDOVA CLI 
CREATE OUR FIRST APPLICATION 
$ cordova create test com.gabrycaos.test Test 
FIRST ARGUMENT “test” IS THE PROJECT DIRECTORY NAME 
SECOND ARGUMENT “com.gabrycaos.test” IS THE APPLICATION PACKAGE NAME 
THIRD ARGUMENT “Test” IS THE NAME OF THE APPLICATION 
Gabriele Falasca - Università degli studi dell’Aquila
PROJECT STRUCTURE 
DIRECTORIES: 
hooks/ : it may contains the scripts used to customize cordova commands 
platforms/ : it contains the projects directories of a specific platform 
plugins/ : it contains the packages of the plugin 
www/ : it contains the source code of the web applications 
config.xml : is a global configuration file 
Gabriele Falasca - Università degli studi dell’Aquila
CONFIG.XML 
IS A GLOBAL CONFIGURATION FILE 
<?xml version='1.0' encoding='utf-8'?> 
<widget id="com.pippo.test" version="0.0.1" xmlns="http://www.w3. 
org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> 
<name>Test</name> 
<description> 
Simple test app created for the Apache Cordova talk 
</description> 
<author email="gabrycaos@yahoo.it" href="http://gabrielefalasca.com"> 
Gabriele Falasca 
</author> 
<content src="index.html" /> 
<access origin="*" /> 
Gabriele Falasca - Università degli studi dell’Aquila 
</widget>
CONFIG.XML 
OTHER CONFIGURATIONS 
<preference name=”FullScreen” value=”true”> 
<platform name=”android”> 
<preference name=”Orientation” value=”landscape”> 
Gabriele Falasca - Università degli studi dell’Aquila 
</platform>
ADD AND REMOVE PLATFORMS 
$ cordova platform add android 
$ cordova platform remove android 
Gabriele Falasca - Università degli studi dell’Aquila
BUILD AND RUN THE APP 
$ cordova build android 
$ cordova run android 
FIRST COMMAND “cordova build” COMPILES THE SOURCE CODE 
SECOND COMMAND “cordova run” COMPILES THE CODE AND RUN IT ON 
EMULATOR OR DEVICE 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGINS 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
EVENTS 
CORDOVA PROVIDES A RICH COLLECTION OF EVENTS FOR BETTER ACCESS TO 
DEVICE CAPABILITIES 
Gabriele Falasca - Università degli studi dell’Aquila
EVENTS 
deviceready 
pause 
resume 
backbutton 
menubutton 
searchbutton 
startcallbutton 
endcallbutton 
volumedownbutton 
volumeupbutton 
EVENTS CAN BE LISTENED AND CAPTURED TROUGH W3C SPEC 
document.addEventListener(eventName, callBack) 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGINS 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
APIs 
CORDOVA PROVIDES A LARGE SET OF APIs FOR ACCESSING DEVICE FEATURES 
Gabriele Falasca - Università degli studi dell’Aquila
API: CAMERA 
Gabriele Falasca - Università degli studi dell’Aquila
CAMERA 
$ navigator.camera.getPicture(success, error, [options]) 
success: IS A CALLBACK WITH A imageURI PARAMETER OR imageData 
PARAMETER (base64 encoding of image data); 
error: IS A CALLBACK FIRED ON ERROR EVENT, IT PROVIDES AN ERROR 
Gabriele Falasca - Università degli studi dell’Aquila 
MESSAGE 
options: OPTIONAL PARAMETERS TO CUSTOMIZE CAMERA SETTINGS 
(ex. quality, destinationType, targetWidth, targetHeight, ecc…)
CAMERA 
AN EXAMPLE 
var options = {quality: 50, 
destinationType: destinationType.FILE_URI, 
sourceType: pictureSource.PHOTOLIBRARY 
}); 
navigator.camera.getPicture(success, error, options); 
function success(imageURI) { 
var element = $(“#block”); 
element.src(imageURI); 
} 
function error(message) { 
console.log(message); 
} 
Gabriele Falasca - Università degli studi dell’Aquila
API: CONTACTS 
Gabriele Falasca - Università degli studi dell’Aquila
CREATE CONTACT 
navigator.contacts.create(properties) 
properties: IS A MAP OF PROPERTIES OF THE CONTACT OBJECT, PROPERTIES 
CAN BE: 
● id: UNIQUE IDENTIFIER OF THE CONTACT 
● displayName: NAME OF THE CONTACT 
● name: AN OBJECT THAT CONTAINS INFORMATION OF THE 
PERSON 
● phoneNumbers: AN ARRAY WITH ALL PHONE NUMBERS OF 
THE CONTACT 
● and so on... 
Gabriele Falasca - Università degli studi dell’Aquila
CREATE CONTACT 
AN EXAMPLE 
var contact = navigator.contacts.create({ 
"displayName": “Pablo“ 
}); 
var name = new ContactName(); 
name.firsName = “Gabriele“; 
name.lastName = “Falasca“; 
contact.name = name; 
contact.birthday = new Date(“19 May 1989"); 
contact.save(success,error); 
function success(contact) { 
alert(“Contact saved!”); 
}; 
function error(error) { 
console.log("Error = " + error.code); 
}; 
Gabriele Falasca - Università degli studi dell’Aquila
FIND CONTACT 
navigator.contacts.find(fields, success, error, options) 
● fields: ARE THE PARAMETERS OF THE CONTACT WILL BE RETURNED 
TO success FUNCTION 
● success: SUCCESS CALLBACK 
● error: ERROR CALLBACK 
● option: LIST OF SETTING FOR FILTER THE CONTACTS 
Gabriele Falasca - Università degli studi dell’Aquila
FIND CONTACT 
AN EXAMPLE 
function onSuccess(contacts) { 
alert('Found ' + contacts.length + ' contacts.'); 
}; 
function onError(contactError) { 
alert('Error!'); 
}; 
// find all contacts with 'Gabriele' in any name field 
var options = new ContactFindOptions(); 
options.filter="Gabriele"; 
options.multiple=true; 
var fields = ["displayName", "name"]; 
navigator.contacts.find(fields, onSuccess, onError, options); 
Gabriele Falasca - Università degli studi dell’Aquila
API: GEOLOCATION 
Gabriele Falasca - Università degli studi dell’Aquila
GET USER POSITION 
navigator.geolocation.getCurrentPosition(success, error, [options]) 
success: IS A CALLBACK WITH A Position OBJECT AS A PARAMETER 
error: IS A CALLBACK FIRED ON ERROR EVENT, IT PROVIDES A PositionError 
OBJECT AS A PARAMETER 
options: OPTIONAL PARAMETERS TO CUSTOMIZE SETTINGS 
Gabriele Falasca - Università degli studi dell’Aquila
GET USER POSITION 
AN EXAMPLE 
var onSuccess = function(position) { 
alert('Latitude: ' + position.coords.latitude + 'n' + 
'Longitude: ' + position.coords.longitude + 'n' + 
'Altitude: ' + position.coords.altitude + 'n' + 
'Accuracy: ' + position.coords.accuracy + 'n' + 
'Altitude Accuracy: ' + position.coords.altitudeAccuracy + 'n' + 
'Speed: ' + position.coords.speed + 'n' +); 
}; 
// onError Callback receives a PositionError object 
function onError(error) { 
alert('code: ' + error.code + 'n' + 
'message: ' + error.message + 'n'); 
} 
navigator.geolocation.getCurrentPosition(onSuccess, onError); 
Gabriele Falasca - Università degli studi dell’Aquila
WATCH USER POSITION 
SIMILARLY AT LAST EXAMPLE WE CAN WATCH THE USER POSITION WITH THE METHOD wathPosition OF 
THE navigator.geolocation OBJECT. IN THIS CASE WE HAVE TO PASS A timeOut ARGUMENT AT THE 
OPTIONS OBJECT. 
navigator.geolocation.watchPosition(success, error, [options]) 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGINS 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
PLUGINS 
Gabriele Falasca - Università degli studi dell’Aquila
PLUGINS 
THERE ARE TWO SIMPLE WAY TO ADD PLUGIN AT OUR CORDOVA APP: 
FOR CORDOVA BUILT-IN PLUGINS: 
cordova plugin add <plugin package name> 
FOR THIRD PARTIES PLUGINS: 
cordova plugin add <url of plugin repository> 
Gabriele Falasca - Università degli studi dell’Aquila
PLUGINS 
REMOVING PLUGINS: 
cordova plugin rm <plugin package name> 
FOR MORE INFORMATION ABOUT CORDOVA PLUGINS VISIT http://plugins.cordova.io/ 
Gabriele Falasca - Università degli studi dell’Aquila
PLUGINS 
EXAMPLES 
INSTALLING A CORDOVA BUILT-IN PLUGIN (InAppBrowser): 
cordova plugin add org.apache.cordova.inappbrowser 
FOR THIRD PARTIES PLUGINS (PushPlugin) * : 
cordova plugin add https://github.com/phonegap-build/PushPlugin.git 
* yes, Cordova supports Phonegap plugins 
Gabriele Falasca - Università degli studi dell’Aquila
ROADMAP 
INTRO 
HOW TO INSTALL 
CORDOVA CLI 
EVENTS 
APIs 
PLUGINS 
RIPPLE EMULATOR 
Gabriele Falasca - Università degli studi dell’Aquila
RIPPLE EMULATOR 
http://ripple.incubator.apache.org/ 
Gabriele Falasca - Università degli studi dell’Aquila
RIPPLE EMULATOR 
WHAT IS? 
RIPPLE IS A WEB-BASED MOBILE SIMULATOR, IDEAL FOR RAPID DEVELOPMENT 
OF MOBILE APPLICATION DEVELOPED WITH WEB BASED FRAMEWORK, SUCH 
APACHE CORDOVA 
Gabriele Falasca - Università degli studi dell’Aquila
HOW TO INSTALL 
OPEN YOUR COMMAND LINE AND TYPE 
$ sudo npm install -g ripple-emulator 
THEN TYPE YOUR PASSWORD AND PRESS ENTER 
Gabriele Falasca - Università degli studi dell’Aquila
HOW TO USE 
FROM COMMAND-LINE GO IN YOUR PROJECT DIRECTORY AND TYPE: 
$ ripple emulate --disable-web-security 
ARGUMENT --disable-web-security IS USED FOR START YOUR 
BROWSER WITH DISABLED CORS 
(IT WORKS IN CHROME, I’M NOT SURE IN FIREFOX AND OTHER BROWSERS) 
Gabriele Falasca - Università degli studi dell’Aquila
RIPPLE INTERFACE 
WE’LL SEE THIS ARGUMENT DIRECTLY WITH THE EMULATOR! :) 
Gabriele Falasca - Università degli studi dell’Aquila
MOST FAMOUS BRANDS USING 
CORDOVA 
Gabriele Falasca - Università degli studi dell’Aquila
QUESTIONS??? 
Gabriele Falasca - Università degli studi dell’Aquila
THANKS A LOT!!! 
facebook.com/gabrycaos 
plus.google.com/+GabrieleFalasca1989 
it.linkedin.com/in/falascagabriele 
(SOON) http://gabrielefalasca.com 
gabrycaos@yahoo.it 
Gabriele Falasca - Università degli studi dell’Aquila

Contenu connexe

Tendances

Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Hazem Saleh
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In ActionHazem Saleh
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginnersrajkamaltibacademy
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
Cordova Tutorial
Cordova TutorialCordova Tutorial
Cordova TutorialJacky Chen
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegapRakesh Jha
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegapRakesh Jha
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkTroy Miles
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - MozillaRobert Nyman
 
Turbocharge your API strategy with SDK
Turbocharge your API strategy with SDKTurbocharge your API strategy with SDK
Turbocharge your API strategy with SDKRamesh Elaiyavalli
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaChristian Heilmann
 
A I R Presentation Dev Camp Feb 08
A I R  Presentation  Dev Camp  Feb 08A I R  Presentation  Dev Camp  Feb 08
A I R Presentation Dev Camp Feb 08Abdul Qabiz
 
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...Xamarin
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introductionsnevesbarros
 
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferLeveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferJoseph Labrecque
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Sergii Shymko
 

Tendances (20)

Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
Developing Native Mobile Apps Using JavaScript, ApacheCon NA 2014
 
Apache Cordova In Action
Apache Cordova In ActionApache Cordova In Action
Apache Cordova In Action
 
Angularjs Tutorial for Beginners
Angularjs Tutorial for BeginnersAngularjs Tutorial for Beginners
Angularjs Tutorial for Beginners
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Cordova Tutorial
Cordova TutorialCordova Tutorial
Cordova Tutorial
 
Intro to PhoneGap
Intro to PhoneGapIntro to PhoneGap
Intro to PhoneGap
 
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...
 
Getting Your Hooks into Cordova
Getting Your Hooks into CordovaGetting Your Hooks into Cordova
Getting Your Hooks into Cordova
 
Introduction phonegap
Introduction phonegapIntroduction phonegap
Introduction phonegap
 
Advanced programing in phonegap
Advanced programing in phonegapAdvanced programing in phonegap
Advanced programing in phonegap
 
Cross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic FrameworkCross Platform Mobile Apps with the Ionic Framework
Cross Platform Mobile Apps with the Ionic Framework
 
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
Web APIs & Apps - Mozilla
Web APIs & Apps - MozillaWeb APIs & Apps - Mozilla
Web APIs & Apps - Mozilla
 
Turbocharge your API strategy with SDK
Turbocharge your API strategy with SDKTurbocharge your API strategy with SDK
Turbocharge your API strategy with SDK
 
Fixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World RomaniaFixing the mobile web - Internet World Romania
Fixing the mobile web - Internet World Romania
 
A I R Presentation Dev Camp Feb 08
A I R  Presentation  Dev Camp  Feb 08A I R  Presentation  Dev Camp  Feb 08
A I R Presentation Dev Camp Feb 08
 
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...
GitHub halp app - Minimizing platform-specific code with MVVM - Justin Spahr-...
 
Appium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation IntroductionAppium Meetup #2 - Mobile Web Automation Introduction
Appium Meetup #2 - Mobile Web Automation Introduction
 
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferLeveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
 
Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2Composer for Magento 1.x and Magento 2
Composer for Magento 1.x and Magento 2
 

En vedette

Node.js: perche' tutto questo hype?
Node.js: perche' tutto questo hype?Node.js: perche' tutto questo hype?
Node.js: perche' tutto questo hype?Giancarlo Valente
 
V. liqviat 2009
V. liqviat 2009V. liqviat 2009
V. liqviat 2009nera24mx
 
Corso base di Tecnologie WEB - Primi passi in javascript
Corso base di Tecnologie WEB - Primi passi in javascriptCorso base di Tecnologie WEB - Primi passi in javascript
Corso base di Tecnologie WEB - Primi passi in javascriptStudiabo
 
Introduzione a node: cenni storici ecc
Introduzione a node: cenni storici eccIntroduzione a node: cenni storici ecc
Introduzione a node: cenni storici eccLuciano Colosio
 
node.js e Postgresql
node.js e Postgresqlnode.js e Postgresql
node.js e PostgresqlLucio Grenzi
 
DotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScriptDotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScriptSinergia Totale
 
Introduzione a JavaScript
Introduzione a JavaScriptIntroduzione a JavaScript
Introduzione a JavaScriptGiovanni Buffa
 
Workshop AngularJs, Cordova, Ionic - Politecnico di Milano
Workshop AngularJs, Cordova, Ionic - Politecnico di MilanoWorkshop AngularJs, Cordova, Ionic - Politecnico di Milano
Workshop AngularJs, Cordova, Ionic - Politecnico di MilanoGabriele Gaggi
 
Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Eugenio Minardi
 
Web base-03-js-numeri stringearray
Web base-03-js-numeri stringearrayWeb base-03-js-numeri stringearray
Web base-03-js-numeri stringearrayStudiabo
 
Da JavaScript a TypeScript
Da JavaScript a TypeScriptDa JavaScript a TypeScript
Da JavaScript a TypeScriptRoberto Messora
 
Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?Flavius-Florin Harabor
 
Roma linuxday 2013 - nodejs
Roma linuxday 2013 - nodejsRoma linuxday 2013 - nodejs
Roma linuxday 2013 - nodejsClaudio Mignanti
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3John Bertucci
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907NodejsFoundation
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to BootstrapRon Reiter
 

En vedette (19)

Node.js: perche' tutto questo hype?
Node.js: perche' tutto questo hype?Node.js: perche' tutto questo hype?
Node.js: perche' tutto questo hype?
 
V. liqviat 2009
V. liqviat 2009V. liqviat 2009
V. liqviat 2009
 
node.js everywhere
node.js everywherenode.js everywhere
node.js everywhere
 
Aulas linux
Aulas linuxAulas linux
Aulas linux
 
Corso base di Tecnologie WEB - Primi passi in javascript
Corso base di Tecnologie WEB - Primi passi in javascriptCorso base di Tecnologie WEB - Primi passi in javascript
Corso base di Tecnologie WEB - Primi passi in javascript
 
Introduzione a node: cenni storici ecc
Introduzione a node: cenni storici eccIntroduzione a node: cenni storici ecc
Introduzione a node: cenni storici ecc
 
node.js e Postgresql
node.js e Postgresqlnode.js e Postgresql
node.js e Postgresql
 
DotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScriptDotNetToscana - Sessione TypeScript
DotNetToscana - Sessione TypeScript
 
Introduzione a jQuery
Introduzione a jQueryIntroduzione a jQuery
Introduzione a jQuery
 
Introduzione a JavaScript
Introduzione a JavaScriptIntroduzione a JavaScript
Introduzione a JavaScript
 
Workshop AngularJs, Cordova, Ionic - Politecnico di Milano
Workshop AngularJs, Cordova, Ionic - Politecnico di MilanoWorkshop AngularJs, Cordova, Ionic - Politecnico di Milano
Workshop AngularJs, Cordova, Ionic - Politecnico di Milano
 
Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS Il Web orientato al futuro: Express, Angular e nodeJS
Il Web orientato al futuro: Express, Angular e nodeJS
 
Web base-03-js-numeri stringearray
Web base-03-js-numeri stringearrayWeb base-03-js-numeri stringearray
Web base-03-js-numeri stringearray
 
Da JavaScript a TypeScript
Da JavaScript a TypeScriptDa JavaScript a TypeScript
Da JavaScript a TypeScript
 
Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?Node js: che cos'è e a che cosa serve?
Node js: che cos'è e a che cosa serve?
 
Roma linuxday 2013 - nodejs
Roma linuxday 2013 - nodejsRoma linuxday 2013 - nodejs
Roma linuxday 2013 - nodejs
 
Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3Design for Developers: Introduction to Bootstrap 3
Design for Developers: Introduction to Bootstrap 3
 
Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907Node Foundation Membership Overview 20160907
Node Foundation Membership Overview 20160907
 
Introduction to Bootstrap
Introduction to BootstrapIntroduction to Bootstrap
Introduction to Bootstrap
 

Similaire à Apache Cordova: Overview and Introduction

Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should knowISOCHK
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...Robert Nyman
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to javaciklum_ods
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5Darren Craig
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and FriendsYun Zhi Lin
 
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineCocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineChris Adamson
 
Native Javascript apps with Phonegap - De Keijzer
Native Javascript apps with Phonegap - De KeijzerNative Javascript apps with Phonegap - De Keijzer
Native Javascript apps with Phonegap - De KeijzerCodemotion
 
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeNative Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeMartin de Keijzer
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0Eugenio Romano
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonRobert Nyman
 
Cordova training : Cordova plugins
Cordova training : Cordova pluginsCordova training : Cordova plugins
Cordova training : Cordova pluginsBinu Paul
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalDrupalDay
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupalsparkfabrik
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016Codemotion
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressJeroen van Dijk
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]Nilhcem
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Davide Cerbo
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming Enguest9bcef2f
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Robin Fernandes
 

Similaire à Apache Cordova: Overview and Introduction (20)

Phone gap 12 things you should know
Phone gap 12 things you should knowPhone gap 12 things you should know
Phone gap 12 things you should know
 
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W... 	Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
Bringing the open web and APIs to mobile devices with Firefox OS - Whisky W...
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 
Griffon Presentation
Griffon PresentationGriffon Presentation
Griffon Presentation
 
Dropwizard and Friends
Dropwizard and FriendsDropwizard and Friends
Dropwizard and Friends
 
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is FineCocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
CocoaConf Chicago 2017: Media Frameworks and Swift: This Is Fine
 
Native Javascript apps with Phonegap - De Keijzer
Native Javascript apps with Phonegap - De KeijzerNative Javascript apps with Phonegap - De Keijzer
Native Javascript apps with Phonegap - De Keijzer
 
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion RomeNative Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
 
Let's play with adf 3.0
Let's play with adf 3.0Let's play with adf 3.0
Let's play with adf 3.0
 
WebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla LondonWebAPIs & Apps - Mozilla London
WebAPIs & Apps - Mozilla London
 
Cordova training : Cordova plugins
Cordova training : Cordova pluginsCordova training : Cordova plugins
Cordova training : Cordova plugins
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
Behaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & DrupalBehaviour Driven Development con Behat & Drupal
Behaviour Driven Development con Behat & Drupal
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
 
The Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/PressThe Enterprise Wor/d/thy/Press
The Enterprise Wor/d/thy/Press
 
The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]The 2016 Android Developer Toolbox [MOBILIZATION]
The 2016 Android Developer Toolbox [MOBILIZATION]
 
Non Conventional Android Programming (English)
Non Conventional Android Programming (English)Non Conventional Android Programming (English)
Non Conventional Android Programming (English)
 
Non Conventional Android Programming En
Non Conventional Android Programming EnNon Conventional Android Programming En
Non Conventional Android Programming En
 
Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605Summit2011 satellites-robinf-20110605
Summit2011 satellites-robinf-20110605
 

Dernier

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Apache Cordova: Overview and Introduction

  • 1. OVERVIEW AND INTRODUCTION Gabriele Falasca - Università degli studi dell’Aquila
  • 2. HELLO WORLD!!! I’M GABRIELE FALASCA, STUDENT AT UNIVERSITÀ DEGLI STUDI DELL’AQUILA, AND MOBILE APPLICATION DEVELOPER FREELANCE Gabriele Falasca - Università degli studi dell’Aquila
  • 3. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGIN RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 4. Gabriele Falasca - Università degli studi dell’Aquila
  • 5. SUPPORTED PLATFORMS NOT ONLY ANDROID IOS AND WP8!! ● WINDOWS 8 - 8.1 ● FIREFOX OS ● BLACKBERRY 10 ● FIREOS ● UBUNTU PHONE ● TIZEN AND SO ON... Gabriele Falasca - Università degli studi dell’Aquila
  • 6. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGIN RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 7. HOW TO INSTALL FIRST, INSTALL NPM, THEN OPEN YOUR COMMAND-LINE AND TYPE $ sudo npm install -g cordova THEN TYPE YOUR SUDO PASSWORD AND PRESS ENTER MORE INFORMATION ABOUT NPM HERE: https://www.npmjs.org/ Gabriele Falasca - Università degli studi dell’Aquila
  • 8. HOW TO INSTALL THEN, YOU HAVE TO ADD ANDROID SDK PATH ON ENVIRONMENT VARIABLES $ export ANDROID_HOME = /yourAndroidSDKdirectory/sdk $ export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools DOWNLOAD ANDROID SDK FROM: https://developer.android.com/sdk/ Gabriele Falasca - Università degli studi dell’Aquila
  • 9. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGIN RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 10. CORDOVA CLI CREATE OUR FIRST APPLICATION $ cordova create test com.gabrycaos.test Test FIRST ARGUMENT “test” IS THE PROJECT DIRECTORY NAME SECOND ARGUMENT “com.gabrycaos.test” IS THE APPLICATION PACKAGE NAME THIRD ARGUMENT “Test” IS THE NAME OF THE APPLICATION Gabriele Falasca - Università degli studi dell’Aquila
  • 11. PROJECT STRUCTURE DIRECTORIES: hooks/ : it may contains the scripts used to customize cordova commands platforms/ : it contains the projects directories of a specific platform plugins/ : it contains the packages of the plugin www/ : it contains the source code of the web applications config.xml : is a global configuration file Gabriele Falasca - Università degli studi dell’Aquila
  • 12. CONFIG.XML IS A GLOBAL CONFIGURATION FILE <?xml version='1.0' encoding='utf-8'?> <widget id="com.pippo.test" version="0.0.1" xmlns="http://www.w3. org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Test</name> <description> Simple test app created for the Apache Cordova talk </description> <author email="gabrycaos@yahoo.it" href="http://gabrielefalasca.com"> Gabriele Falasca </author> <content src="index.html" /> <access origin="*" /> Gabriele Falasca - Università degli studi dell’Aquila </widget>
  • 13. CONFIG.XML OTHER CONFIGURATIONS <preference name=”FullScreen” value=”true”> <platform name=”android”> <preference name=”Orientation” value=”landscape”> Gabriele Falasca - Università degli studi dell’Aquila </platform>
  • 14. ADD AND REMOVE PLATFORMS $ cordova platform add android $ cordova platform remove android Gabriele Falasca - Università degli studi dell’Aquila
  • 15. BUILD AND RUN THE APP $ cordova build android $ cordova run android FIRST COMMAND “cordova build” COMPILES THE SOURCE CODE SECOND COMMAND “cordova run” COMPILES THE CODE AND RUN IT ON EMULATOR OR DEVICE Gabriele Falasca - Università degli studi dell’Aquila
  • 16. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGINS RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 17. EVENTS CORDOVA PROVIDES A RICH COLLECTION OF EVENTS FOR BETTER ACCESS TO DEVICE CAPABILITIES Gabriele Falasca - Università degli studi dell’Aquila
  • 18. EVENTS deviceready pause resume backbutton menubutton searchbutton startcallbutton endcallbutton volumedownbutton volumeupbutton EVENTS CAN BE LISTENED AND CAPTURED TROUGH W3C SPEC document.addEventListener(eventName, callBack) Gabriele Falasca - Università degli studi dell’Aquila
  • 19. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGINS RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 20. APIs CORDOVA PROVIDES A LARGE SET OF APIs FOR ACCESSING DEVICE FEATURES Gabriele Falasca - Università degli studi dell’Aquila
  • 21. API: CAMERA Gabriele Falasca - Università degli studi dell’Aquila
  • 22. CAMERA $ navigator.camera.getPicture(success, error, [options]) success: IS A CALLBACK WITH A imageURI PARAMETER OR imageData PARAMETER (base64 encoding of image data); error: IS A CALLBACK FIRED ON ERROR EVENT, IT PROVIDES AN ERROR Gabriele Falasca - Università degli studi dell’Aquila MESSAGE options: OPTIONAL PARAMETERS TO CUSTOMIZE CAMERA SETTINGS (ex. quality, destinationType, targetWidth, targetHeight, ecc…)
  • 23. CAMERA AN EXAMPLE var options = {quality: 50, destinationType: destinationType.FILE_URI, sourceType: pictureSource.PHOTOLIBRARY }); navigator.camera.getPicture(success, error, options); function success(imageURI) { var element = $(“#block”); element.src(imageURI); } function error(message) { console.log(message); } Gabriele Falasca - Università degli studi dell’Aquila
  • 24. API: CONTACTS Gabriele Falasca - Università degli studi dell’Aquila
  • 25. CREATE CONTACT navigator.contacts.create(properties) properties: IS A MAP OF PROPERTIES OF THE CONTACT OBJECT, PROPERTIES CAN BE: ● id: UNIQUE IDENTIFIER OF THE CONTACT ● displayName: NAME OF THE CONTACT ● name: AN OBJECT THAT CONTAINS INFORMATION OF THE PERSON ● phoneNumbers: AN ARRAY WITH ALL PHONE NUMBERS OF THE CONTACT ● and so on... Gabriele Falasca - Università degli studi dell’Aquila
  • 26. CREATE CONTACT AN EXAMPLE var contact = navigator.contacts.create({ "displayName": “Pablo“ }); var name = new ContactName(); name.firsName = “Gabriele“; name.lastName = “Falasca“; contact.name = name; contact.birthday = new Date(“19 May 1989"); contact.save(success,error); function success(contact) { alert(“Contact saved!”); }; function error(error) { console.log("Error = " + error.code); }; Gabriele Falasca - Università degli studi dell’Aquila
  • 27. FIND CONTACT navigator.contacts.find(fields, success, error, options) ● fields: ARE THE PARAMETERS OF THE CONTACT WILL BE RETURNED TO success FUNCTION ● success: SUCCESS CALLBACK ● error: ERROR CALLBACK ● option: LIST OF SETTING FOR FILTER THE CONTACTS Gabriele Falasca - Università degli studi dell’Aquila
  • 28. FIND CONTACT AN EXAMPLE function onSuccess(contacts) { alert('Found ' + contacts.length + ' contacts.'); }; function onError(contactError) { alert('Error!'); }; // find all contacts with 'Gabriele' in any name field var options = new ContactFindOptions(); options.filter="Gabriele"; options.multiple=true; var fields = ["displayName", "name"]; navigator.contacts.find(fields, onSuccess, onError, options); Gabriele Falasca - Università degli studi dell’Aquila
  • 29. API: GEOLOCATION Gabriele Falasca - Università degli studi dell’Aquila
  • 30. GET USER POSITION navigator.geolocation.getCurrentPosition(success, error, [options]) success: IS A CALLBACK WITH A Position OBJECT AS A PARAMETER error: IS A CALLBACK FIRED ON ERROR EVENT, IT PROVIDES A PositionError OBJECT AS A PARAMETER options: OPTIONAL PARAMETERS TO CUSTOMIZE SETTINGS Gabriele Falasca - Università degli studi dell’Aquila
  • 31. GET USER POSITION AN EXAMPLE var onSuccess = function(position) { alert('Latitude: ' + position.coords.latitude + 'n' + 'Longitude: ' + position.coords.longitude + 'n' + 'Altitude: ' + position.coords.altitude + 'n' + 'Accuracy: ' + position.coords.accuracy + 'n' + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + 'n' + 'Speed: ' + position.coords.speed + 'n' +); }; // onError Callback receives a PositionError object function onError(error) { alert('code: ' + error.code + 'n' + 'message: ' + error.message + 'n'); } navigator.geolocation.getCurrentPosition(onSuccess, onError); Gabriele Falasca - Università degli studi dell’Aquila
  • 32. WATCH USER POSITION SIMILARLY AT LAST EXAMPLE WE CAN WATCH THE USER POSITION WITH THE METHOD wathPosition OF THE navigator.geolocation OBJECT. IN THIS CASE WE HAVE TO PASS A timeOut ARGUMENT AT THE OPTIONS OBJECT. navigator.geolocation.watchPosition(success, error, [options]) Gabriele Falasca - Università degli studi dell’Aquila
  • 33. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGINS RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 34. PLUGINS Gabriele Falasca - Università degli studi dell’Aquila
  • 35. PLUGINS THERE ARE TWO SIMPLE WAY TO ADD PLUGIN AT OUR CORDOVA APP: FOR CORDOVA BUILT-IN PLUGINS: cordova plugin add <plugin package name> FOR THIRD PARTIES PLUGINS: cordova plugin add <url of plugin repository> Gabriele Falasca - Università degli studi dell’Aquila
  • 36. PLUGINS REMOVING PLUGINS: cordova plugin rm <plugin package name> FOR MORE INFORMATION ABOUT CORDOVA PLUGINS VISIT http://plugins.cordova.io/ Gabriele Falasca - Università degli studi dell’Aquila
  • 37. PLUGINS EXAMPLES INSTALLING A CORDOVA BUILT-IN PLUGIN (InAppBrowser): cordova plugin add org.apache.cordova.inappbrowser FOR THIRD PARTIES PLUGINS (PushPlugin) * : cordova plugin add https://github.com/phonegap-build/PushPlugin.git * yes, Cordova supports Phonegap plugins Gabriele Falasca - Università degli studi dell’Aquila
  • 38. ROADMAP INTRO HOW TO INSTALL CORDOVA CLI EVENTS APIs PLUGINS RIPPLE EMULATOR Gabriele Falasca - Università degli studi dell’Aquila
  • 39. RIPPLE EMULATOR http://ripple.incubator.apache.org/ Gabriele Falasca - Università degli studi dell’Aquila
  • 40. RIPPLE EMULATOR WHAT IS? RIPPLE IS A WEB-BASED MOBILE SIMULATOR, IDEAL FOR RAPID DEVELOPMENT OF MOBILE APPLICATION DEVELOPED WITH WEB BASED FRAMEWORK, SUCH APACHE CORDOVA Gabriele Falasca - Università degli studi dell’Aquila
  • 41. HOW TO INSTALL OPEN YOUR COMMAND LINE AND TYPE $ sudo npm install -g ripple-emulator THEN TYPE YOUR PASSWORD AND PRESS ENTER Gabriele Falasca - Università degli studi dell’Aquila
  • 42. HOW TO USE FROM COMMAND-LINE GO IN YOUR PROJECT DIRECTORY AND TYPE: $ ripple emulate --disable-web-security ARGUMENT --disable-web-security IS USED FOR START YOUR BROWSER WITH DISABLED CORS (IT WORKS IN CHROME, I’M NOT SURE IN FIREFOX AND OTHER BROWSERS) Gabriele Falasca - Università degli studi dell’Aquila
  • 43. RIPPLE INTERFACE WE’LL SEE THIS ARGUMENT DIRECTLY WITH THE EMULATOR! :) Gabriele Falasca - Università degli studi dell’Aquila
  • 44. MOST FAMOUS BRANDS USING CORDOVA Gabriele Falasca - Università degli studi dell’Aquila
  • 45. QUESTIONS??? Gabriele Falasca - Università degli studi dell’Aquila
  • 46. THANKS A LOT!!! facebook.com/gabrycaos plus.google.com/+GabrieleFalasca1989 it.linkedin.com/in/falascagabriele (SOON) http://gabrielefalasca.com gabrycaos@yahoo.it Gabriele Falasca - Università degli studi dell’Aquila