SlideShare a Scribd company logo
Cordova/PhoneGap	
Mobile	Applica5on	Development	
with	HTML/JS/CSS	
Gabriel	Huecas	
December	3,	2015
Layout	
•  Introduc5on	
•  Cordova	
– Hello	World	
– Plugins	
•  Advanced	examples	
•  Phonegap	
•  Adobe	build	
•  Other	SDKs:	Android	Studio,	Ionic,	Intel	XDk,…
INTRODUCTION
Resources	
•  hSp://cordova.apache.org/	
•  www.phonegap.com	
– FAQ:	hSp://phonegap.com/about/faq/	
•  hSps://build.phonegap.com/	
INTRODUCTION
Goal	
•  Build	cross	plaorm	mobile	apps	with	HTML5,	
JS	&	CSS3	
– Avoiding	each	mobile	plaorms’	na5ve	
development	language	
•  Even	the	SDK	through	Adobe	Phonegap	Build	
INTRODUCTION
Use	if	you	are:	
•  A	mobile	developer	
–  want	to	extend	an	applica5on	across	more	than	one	
plaorm,	without	having	to	re-implement	it	with	each	
plaorm's	language	and	tool	set.	
•  A	web	developer	
–  want	to	deploy	a	web	app	that's	packaged	for	distribu5on	
in	various	app	store	portals.	
•  A	mobile	developer	
–  interested	in	mixing	na5ve	applica5on	components	with	a	
WebView	(browser	window)	that	can	access	device-level	
APIs,	
–  or	if	you	want	to	develop	a	plugin	interface	between	
na5ve	and	WebView	components.	
INTRODUCTION
Framework	for	
•  Plaorm	for	building	na5ve	mobile	apps	using	
HTML,	JS	&	CSS	
•  Set	of	Device	APIs	
– Allows	mobile	app	developer	to	access	na5ve	
device	func5ons	from	JS	
•  Combined	with	UI	framework	
– Jquery	Mobile,	Dojo	Mobile,	Sencha	Touch	
INTRODUCTION
Supported	OS	
Amazon	FireOS	 Android	 Bada	 Blackberry10	
FirefoxOS	 iOS	 Symbian	 Tizen	
Ubuntu	 WebOS	 Windows	8	 Windows	Phone	7	
Windows	Phone	8	
INTRODUCTION	
hSp://cordova.apache.org/docs/en/latest/guide/support/index.html
Packaging	&	Distribu5on	
•  Na5ve-installed	applica5on	
– iOS	->	.ipa	(iPhone	Applica5on	Archive)	
– Android	->	.apk	(Android	Applica5on	Package)	
– Windows	Phone	->	.xap	(Microsoj	Window	Phone	
OS	applica5on	package)	
•  Distributed	through	corresponding	channels:	
•  iTunes,	Google	Play,	Amazon	Market,	BlackBerry	App	
World,	Windows	Phone	Marketplace,	etc.	
INTRODUCTION
Interface	
•  The	app	UI	created	with	
HTML,	CSS	&	JS	
–  100%	x	100%	
•  Just	one	display	 User	Interface	
Browser-based	
WebView	
100%	x	100%	
INTRODUCTION
Na5ve	Web	view	
•  Several	rendering	
engined 		
–  Result	may	differ	
•  Development	
•  Tes5ng	
•  UX	
S.O.	 Componente	
iOS	 UIWebView	
Android	 Android.webkit-
WebView	
Etc.	 Etc.	
INTRODUCTION
Client-Server	
•  Cordova	client	App	connects	with	server	app	
– Data	send/receive,	bussines	login,	Data	Base	
communica5on	
– Server:	any	
•  Apache,	IIS,	nginx,…	
•  Server	App:	Java,	PHP,	Ruby,	Node.js,	…	
•  Cordova	client	app	independant	of	backend	
technology	
– Standard	web	protocolos	
INTRODUCTION
Data	Bases	
•  Cordova	client	app	(usually)	do	not	interact	
directly	with	the	data	base	
– Through	the	server	
– Standard	HTTP	requests	
•  REST-ful,	XML,	JSON,	SOAP,	websockets	
–  Same	techniques	AJAX-based	apps	
INTRODUCTION
Frameworks	
•  Facilitate	our	app	behaves	like	na5ve	
– JQuery	Mobile,	Sencha	Touch,…	
INTRODUCTION
Device	APIs	
•  Accelerometer	
•  BaSery	Status	
•  Camera	
•  Capture	
•  Compass	
•  Connec5on	
•  Contacts	
•  Device	
•  Events	
•  File	
•  Geoloca5on	
•  Globaliza5on	
–  Locale,	language,	and	
5mezone	
•  InAppBrowser	
•  Media	
•  No5fica5on	
•  Splash	Screen	
•  Status	Bar	
•  Storage	
•  Vibra5on	
hSps://cordova.apache.org/plugins/		
INTRODUCTION
Running	the	app	
1.  Local	build:	runs	in	a	device	or	emulator	
2.  Through	a	local	server	
	PhoneGap	Desktop	App	&	
	PhoneGap	Mobile	App	
3.  Compiled	in	the	cloud	
	hSps://build.PhoneGap.com		
4.  From	SDKs/IDEs:	Android	Studio/Intel	XDK/
others…	
•  We’ll	see	them	all…	
INTRODUCTION
Summary	
•  Act	as	an	app	container	
–  Mobile	apps	HTML/JS/CSS,	packaged	as	na5ve	app	
•  Consistent	JS	API	across	supported	devices	
•  Major	device	plaorms	have	good	support	
•  Cordova	is	the	engine	of	PhoneGap	
•  Cordova	can	be	used	straight-up,	bypassing	the	
PhoneGap-branded	download	
•  Extensible	via	plugins	
•  Free	&	open	source	
INTRODUCTION
CORDOVA
Basic	requirements	
•  ANT	(Another	Neat	Tool)	J	
– hSp://ant.apache.org/	
•  Download	
•  Unpack	
•  ANT_HOME	path	to	ant	folder	
•  PATH	add	ANT_HOMEbin	to	PATH	env	var	
–  Depends	on	OS	
•  GIT	client	(hSps://git-scm.com/	)	
•  Node.js	(hSps://nodejs.org/	)	
– Be	sure	node	and	npm can	be	executed	
CORDOVA
Advanced	requirements	
•  Android	SDK	
•  iOS:	Xcode	
•  Windows:	Windows	Phone	SDK	
•  See	details	and	more	mobile	OSs:	
hSps://cordova.apache.org/docs/en/latest/
guide/plaorms/index.html
Configura5on	(OSX	Unix)	
ANDROID_HOME=/opt/google/android-sdk-linux
ANT_HOME=/opt/Apache/apache-ant-1.9.6
ANDROID_EMULATOR_FORCE_32BIT=true
export ANDROID_HOME
export ANT_HOME
export ANDROID_EMULATOR_FORCE_32BIT
PATH=${PATH}:${ANDROID_HOME}/tools:$
{ANT_HOME}/bin
export PATH
CORDOVA
Configuring	Linux	
•  Some	versions	of	Linux	come	with	‘node’	
command,	not	related	with	‘node.js’	
•  Solu5ons:	
– sudo	apt-get	install	nodejs-legacy	
– sudo	ln	–s	/usr/bin/node	/usr/bin/nodejs	
– Stackoverflow	and	
hSps://github.com/nodejs/node-v0.x-archive/
issues/3911	gives	you	more	informa5on
Configura5on	(Windows)	
WinXP/Vista
Start-> My PC (right
click)-> Properties
Advanced Options ->
Environment variables
Win 8/10
Start -> Computer (right
click)-> properties
Advanced system settings
-> Environment variables
(Note:	view	may	differ	upon	WinOS	version)	
CORDOVA
Add	environment	variables	
•  Edit	PATH	
•  Add	
ANDROID_HOME
ANT_HOME
•  If	running	on	a	32bit	
system:	
ANDROID_EMULATOR_
FORCE_32BIT=true
CORDOVA
Installing	Cordova	
•  Flavours	
OSX UNIX: $ sudo npm install –g
cordova
Windows : C:> npm install –g
cordova
•  Without	–g:	local	installa5on,	user	only	
CORDOVA
Simple	example	
$> cordova create hello com.example.hw
HelloWorld
$> cd hello
$ hello> cordova platform add android
$ hello> cordova build
$ hello> cordova emulate android
CORDOVA
Simple	example	explained	(I)	
cordova create hello com.example.hello
HelloWorld
•  Hello:	folder	
•  Com.example.hello:	package	
•  HelloWorld:	webapp	name	
CORDOVA
Simple	example	explained	(II)	
$>	cd	hello	
$	hello>	cordova	platform	
add	android	
$	hello>	cordova	build	
$	hello>	cordova	emulate	
android	
Go	to	hello	folder	
Add	plaorm	android	
Build	android	na5ve	app	
Emulate	app	
See	next	slide	to	configure	
emulator	
	
CORDOVA
Comnfiguring	android	emulator	
•  Install	android	SDK	
– android	command	must	be	available	
•  Create	an	AVD	(Android	Virtual	Device)	
–  cordova emulate android	will	use	the	first	AVD	
•  May	specify	a	specific	one:	
cordova emulate android --target “<AVD name>”	
CORDOVA
Installing	in	Android	emulator	
$>	cordova	emulate	android	
...	
BUILD	SUCCESSFUL	
	
Total	time:	34.789	secs	
Built	the	following	apk(s):	
				/Users/gabriel/Docencia/PhoneGap/Ejemplos/hello/
platforms/android/build/outputs/apk/android-debug.apk	
Installing	app	on	emulator...	
Using	apk:	/Users/gabriel/Docencia/PhoneGap/Ejemplos/
hello/platforms/android/build/outputs/apk/android-
debug.apk	
INSTALL	SUCCESS	
Unlocking	screen...	
Launching	application...	
LAUNCH	SUCCESS	
CORDOVA
CORDOVA	
Execu5ng	the	app
Commands	
Global	Commands	
	
				create	...................	Create	a	project	
				help	.....................	Get	help	for	a	command	
	
Project	Commands	
				info	.....................	Generate	project	information	
				requirements	..............	Checks	and	print	out	all	the	
requirements	for	platforms	specified	
	
				platform	..................	Manage	project	platforms	
				plugin	....................	Manage	project	plugins	
	
					
CORDOVA
Commands	
	
				prepare	...........	Copy	files	into	platform(s)	for	building	
				compile	...........	Build	platform(s)	
				clean	.............	Cleanup	project	from	build	artifacts	
	
				run	...............	Run	project	
																														(including	prepare	&&	compile)	
				serve	.............	Run	project	with	a	local	webserver	
																														(including	prepare)	
	
	
aliases:	
				build	->	cordova	prepare	&&	cordova	compile	
				emulate	->	cordova	run	--emulator	
CORDOVA
iOS	
•  Emulator	MUST	be	
installed	
•  XCode	
CORDOVA
iOS	
$>	sudo	npm	install	-g	ios-sim	
$>	cordova	platform	add	ios	
$>	cordova	emulate	ios	
Building	project		:	/Users/gabriel/Docencia/PhoneGap/Ejemplos/hello/
platforms/ios/HelloWorld.xcodeproj	
	Configuration	:	Debug	
	Platform						:	emulator	
...	
===	BUILD	TARGET	CordovaLib	OF	PROJECT	CordovaLib	WITH	CONFIGURATION	
Debug	===	
...	
**	BUILD	SUCCEEDED	**	
	
No	target	specified	for	emulator.	Deploying	to	iPhone-6	simulator	
es.upm.dit.iweb.hello:	9088	
**	RUN	SUCCEEDED	**	
CORDOVA
iOS	emulator	
$>	cordova	platform	add	ios	
$>	./platforms/ios/cordova/lib/list-emulator-images		
iPhone-4s,	9.1	
iPhone-5,	9.1	
...	
$>	cordova	emulate	ios	--target="iPhone-4s"	
$>	cordova	emulate	ios	--target="iPad-Air"	
$>	cordova	emulate	ios	--target="iPhone-6"	
$>	cordova	emulate	ios	--target="iPhone-6-Plus”	
	
$>	ios-sim	showdevicetypes	
iPhone-4s,	9.1	
iPhone-5,	9.1	
...	
	
CORDOVA
Browser	
•  Run	app	on	a	(chrome)	browser	
cordova	plaorm	add	browser	
cordova	run	browser	
CORDOVA
Installing	on	Android	device	
•  USB	connected	devices	
– adb	devices:	list	connected	devices	
– Be	sure	developer	op5ons	are	enabled	in	device	
•  hSp://developer.android.com/intl/es/tools/device.html	
o cordova	run	--device	android	
o adb	-s	<deviceId>	install	–r	plaorms/android/
build/outputs/apk/<choose-one>.apk	
•  May	distribute	the	apk	via	cloud	storage	
(drive,	drop-box,	one,…),	by	e-mail,	…	
CORDOVA
Installing	on	iOS	device	
•  Unfortunately,	I	do	not	know…	yet	
CORDOVA
Communica5ng	with	the	HW	
•  Plugins:	add-on	code	that	provides	an	interface	
to	na5ve	components	
	hSp://cordova.apache.org/plugins/	
•  Registered	in	registry.cordova.io	
–  Also	third-party	plugins	
•  Commands	and	op5ons:	
cordova	plugin	ls:	lista	los	plugins	instalados	
cordova	plugin	search	<word>:	busca	plugin	
cordova	plugin	add	<name>:	añade	el	plugin	<name>	
cordova	plugin	remove	<plugin>:	elimina	un	plugin	
instalado	
CORDOVA
Available	plugins	(I)	
•  Basic	device	informa5on	(Device	API):	
$	cordova	plugin	add	cordova-plugin-device	
•  Network	Connec5on	and	BaSery	Events:	
$	cordova	plugin	add	cordova-plugin-network-informa5on	
$	cordova	plugin	add	cordova-plugin-baSery-status	
•  Accelerometer,	Compass,	and	Geoloca5on:	
$	cordova	plugin	add	cordova-plugin-device-mo5on	
$	cordova	plugin	add	cordova-plugin-device-orienta5on	
$	cordova	plugin	add	cordova-plugin-geoloca5on	
CORDOVA
Available	plugins	(II)	
•  Camera,	Media	playback	and	Capture:	
$	cordova	plugin	add	cordova-plugin-camera	
$	cordova	plugin	add	cordova-plugin-media-capture	
$	cordova	plugin	add	cordova-plugin-media	
•  Access	files	on	device	or	network	(File	API):	
$	cordova	plugin	add	cordova-plugin-file	
$	cordova	plugin	add	cordova-plugin-file-transfer	
CORDOVA
Available	plugins	(III)	
•  No5fica5on	via	dialog	box	or	vibra5on:	
$	cordova	plugin	add	cordova-plugin-dialogs	
$	cordova	plugin	add	cordova-plugin-vibra5on	
•  Contacts:	
$	cordova	plugin	add	cordova-plugin-contacts	
•  Globaliza5on:	
$	corova	plugin	add	cordova-plugin-globaliza5on	
CORDOVA
Available	plugins	(IV)	
•  Splashscreen:	
$	cordova	plugin	add	cordova-plugin-splashscreen	
•  Open	new	browser	windows	(InAppBrowser):	
$	cordova	plugin	add	cordova-plugin-inappbrowser	
•  Debug	console:	
$	cordova	plugin	add	cordova-plugin-console	
CORDOVA
From	GIT	
•  If	not	registered	in	registry.cordova.io	
cordova	plugin	add	
hSps://github.com/apache/cordova-plugin-console.git	
•  And	all	git	op5ons:	tag,	branch,	in	parts,	…	
$	cordova	plugin	add	
hSps://github.com/apache/cordova-plugin-console.git#r0.2.0	
$	cordova	plugin	add	
hSps://github.com/apache/cordova-plugin-console.git#CB-8438cordova-
plugin-console	
	
$	cordova	plugin	add	hSps://github.com/apache/cordova-plugin-
console.git#f055daec45575bf08538f885e09c85a0eba363ff	
If	the	plugin	(and	its	plugin.xml	file)	is	in	a	subdirectory	within	the	git	
repo,	you	can	specify	it	with	a	:	character.	Note	that	the	#	character	is	
s5ll	needed:	
$	cordova	plugin	add	hSps://github.com/someone/aplugin.git#:/my/sub/
dir	
CORDOVA
Local	Plugin	
•  Specify	the	path	to	the	directory	where	the	
plugin.xml	is	located	
$ cordova plugin add ../my_plugin_dir
CORDOVA
plugman	
•  The	CLI	adds	plugin	code	as	appropriate	for	each	
plaorm.	
•  If	you	want	to	develop	with	lower-level	shell	tools	or	
plaorm	SDKs	
–  Use	plugman	u5lity	to	add	plugins	separately	for	each	
plaorm	
•  Instale	with:	
npm	install	–f	plugman	
hSps://cordova.apache.org/docs/en/latest/plugin_ref/
plugman.html	
CORDOVA
plugman	
•  Adding:	$	plugman	--plaorm	<ios|amazon-
fireos|android|blackberry10|wp8>	--project	
<directory>	--plugin	<name|url|path>	[--
plugins_dir	<directory>]	[--www	<directory>]	[--
variable	<name>=<value>	[--variable	
<name>=<value>	...]]	
•  Removing:	$	plugman	--uninstall	--plaorm	<ios|
amazon-fireos|android|blackberry10|wp8>	--
project	<directory>	--plugin	<id>	[--www	
<directory>]	[--plugins_dir	<directory>]	
•  And	much	more…	out	of	our	scope	J		
CORDOVA
Plaorm	Support	
•  hSp://phonegap.com/about/feature/	
CORDOVA
ADVANCES	EXAMPLES
Examples	
•  Camera	
– Takes	photos	and	displays	them	as	a	gallery	
•  Doc	
– API:	
hSps://github.com/apache/cordova-plugin-
camera	
– Examples	in	GIT:	
hSps://github.com/jesurod09/PFC.git	
– Several	examples,	let’s	use	camara(OK)	
ADVANCED	EXAMPLES
Examples	
ADVANCED	EXAMPLES	
•  Samples	in	GitHub,	by	J.	Rodríguez	&	G.	
Huecas	
– hSps://github.com/jesurod09/PFC.git	
– One	small	app	per	characteris5c	
•  Sensors,	geoloca5on,	connec5vity,	storage	and	file	
system,	chips	and	other	hw,	na5ve	sojware,…
Example:	take	a	picture	
$	/>	git	clone	https://github.com/jesurod09/PFC.git	
$	/>	cordova	create	camera	es.upm.dit.iweb.cam	CameraBasic	
$	/>	cp	-r	“./PFC/Camera(OK)/www/*”	./camera/www/	
$	/>	cd	camera	
$	camera/>	cordova	platform	add	android	ios	
$	camera/>	cordova	plugin	add	cordova-plugin-camera	
$	camera/>	cordova	build	android	
$	camera/>	cordova	emulate	android	
$	camera/>	cordova	build	ios	
$	camera/>	cordova	emulate	ios	
ADVANCED	EXAMPLES
Geolocali5on	
•  Objet	geoloca'on:	loca5on	informa5on	
– GPS	based	
– Also	IP	network,	RFID,	WiFi,	Bluetooth	MAC,	GSM/
CDMA	
•  Without	warranty	
•  Based	on	W3C	geoloca5on	specifica5on	
ADVANCED	EXAMPLES
Privacity	
•  The	browser	does	not	reveal	loca5on	to	the	
server	
•  Different	UX	for	each	browser	
•  ALL	OF	THEM	ask,	pasively	or	ac5vely,	for	user	
permission	
–  User	is	informed:	
•  Website	wants	to	access	
•  Which	website	ask	for	data	
•  User	chooses	to	share…	or	not	
–  Browser	may	remember	for	further	requests	
ADVANCED	EXAMPLES
Geolocaliza5on:	methods	(I)	
•  geoloca5on.getCurrentPosi5on	
– Returns	the	device	loca5on	in	a	Posi5on	object	
– Parameters:	
•  geoloca5onSuccess:	callback	if	geoloca5on	succeed,	
posi5on	is	passed	as	parameter	
•  geoloca5onError:	(Op5onal)	callback	in	case	of	error	
•  geoloca5onOp5ons:	(Op5onal)	loca5on	op5ons	
ADVANCED	EXAMPLES
Geolocaliza5on:	methods	(II)	
•  geoloca5on.watchPosi5on	
– Inmediately	returns	a	WatchID	(string)	
– Asynchronously	watches	changes	in	device	
posi5on	
– Parameters:	
•  geoloca5onSuccess:	callback	when	device	posi5on	
differs	significantly	from	previous	one	
–  Posi5on	as	a	parameter	
•  geoloca5onError:	(Op5onal)	callback	in	case	of	error	
•  geoloca5onOp5ons:	(Op5onal)	geoloca5on	op5ons	
ADVANCED	EXAMPLES
Geolocaliza5on:	methods	(III)	
•  geoloca5on.clearWatch	
– Stop	watching	process	
– Parameters	
•  WatchID:	iden5fier	of	previous	watch	process	
–  No	further	ac5on	if	invalid	ID	
ADVANCED	EXAMPLES
Geolocaliza5on:	objects	(I)	
•  Read-only	objects:	Position	and	
PositionOptions
•  Position	has	two	fields,	the	posi5on	
(coords)	and	the	5me	(5mestamp)	
– cords:	Coordinates	
– 5mestamp:	DOMTimeStamp	
ADVANCED	EXAMPLES
Geoloca5on:	objects	(II)	
•  Coordinates	
–  la5tude:	La5tude	in	decimal	degrees.	(Number)	
–  longitude:	Longitude	in	decimal	degrees.	(Number)	
–  al5tude:	Height	of	the	posi5on	in	meters	above	the	
ellipsoid.	(Number)	
–  accuracy:	Accuracy	level	of	the	la5tude	and	longitude	
coordinates	in	meters.	(Number)	
–  al5tudeAccuracy:	Accuracy	level	of	the	al5tude	coordinate	
in	meters.	(Number)	
–  heading:	Direc5on	of	travel,	specified	in	degrees	coun5ng	
clockwise	rela5ve	to	the	true	north.	(Number)	
–  speed:	Current	ground	speed	of	the	device,	specified	in	
meters	per	second.	(Number)	
ADVANCED	EXAMPLES
Geoloca5on:	objects	(III)	
•  Posi5onOp5ons:	
– enableHighAccuracy:	boolean	
– 5meout:	unsigned	long	
– maximunAge:	unsigned	long	
ADVANCED	EXAMPLES
PHONEGAP
What	is	PhoneGap	
•  hSps://build.phonegap.com/	
•  PhoneGap	wraps	cordova	with	some	differences	
cordova	build	->	local,	requires	proper	SDKs	
phonegap:	same	interface	(commands/op5ons)	than	
cordova,	BUT:	
phonegap	remote	[command]	->	execute	commands	
against	the	Phonegap	Build	Service	->	Adobe	cloud	
	No	local	installed	SDK	requirement!!	
phonegap	cordova	<command>:	enforces	specific	version	of	
cordova	command	
	
PHONEGAP
Descrip5on	
•  1	Phonegap	
– Desktop	App	
•  Visual	interface	
•  Drag	&	drop	
– CLI	(Command	Line	Interface)	
•  2	Phonegap	Developer	App	
– is	a	mobile	app	that	runs	on	devices	and	allows	
you	to	preview	and	test	the	PhoneGap	mobile	
apps	you	build	across	plaorms	without	
addi5onal	plaorm	SDK	setup	
PHONEGAP
Installing	PhoneGap	
•  Few	simple	requirements	
– 	node.js	&	git	
– Then:	npm	install	–g	phonegap	
•  Install	Mobile	App	
– Locate	PhoneGap	Developer	app	
and	install	
•  iTunes,	Google	Play,	Windows	Phone	
Store
Serving	an	App	
•  phonegap	serve	[op5ons]	
– Start	a	local	web	server	to	host	the	applicaiton	for	
the	PhoneGap	Developer	app	(or	any	browser)	to	
consume	
$ phonegap serve
$ phonegap serve --port 1337
$ phonegap serve --no-autoreload
$ phonegap serve --localtunnel
$ phonegap app
PHONEGAP
Simple	example	
$>	phonegap	create	helloPG	com.examples.hw	HelloWorldPG	
$>	cd	helloPG/	
$>	phonegap	platform	add	android	
$>	phonegap	platform	add	ios	
$>	phonegap	build	android	
[phonegap]	executing	'cordova	build	android'...	
[phonegap]	completed	'cordova	build	android'	
$>	phonegap	run	android	
[phonegap]	executing	'cordova	run	android'...	
[phonegap]	completed	'cordova	run	android’	
$>	phonegap	serve	
[phonegap]	starting	app	server...	
[phonegap]	listening	on	138.4.13.47:3000	
[phonegap]	listening	on	138.4.4.193:3000	
[phonegap]		
[phonegap]	ctrl-c	to	stop	the	server	
[phonegap]
Running	the	example
Installing	Desktop	App	
•  Mac	OS	X	o	Windows	
installer:	
hSp://docs.phonegap.com/
ge€ng-started/1-install-
phonegap/desktop/	
	
PHONEGAP
Using	PhoneGap	Desktop	App	(I)	
•  Click	here	to	create	a	
new	project	or	add	an	
exis5ng	one	
•  Click	here	to	change	
the	default	se€ngs	
– Server	port	
•  Default:	3000	
– Send	anonymous	
diagnos5c	&	usage	data
Using	PhoneGap	Desktop	App	(II)	
•  One	project	served	at	a	
5me	
•  Click	here	to	stop	
serving	a	project	
•  IP	and	port	data
Again,	run	the	example
ADOBE	BUILD
PhoneGap	Build	en	la	nube	
•  phonegap	remote	build	android	
– (cordova	plaorm	add	android;	cordova	build)	
– Requires	account	in	Phonegap	Build	
•  One	private	app	limit	
•  QR	code	generated,	can	be	scanned	by	a	
mobile	device	to	install	app	
ADOBE	BUILD
$	phonegap	remote	login	
$	phonegap	remote	build	ios	
$	phonegap	remote	install	android	
$	phonegap	remote	run	ios	
$	phonegap	remote	logout	
PhoneGap	remote	commands	
•  login:	login	to	PhoneGap	Build	
–  requires	an	account	and	your	creden5als	
•  logout:	logout	of	PhoneGap	Build	
•  build	<plaorm>:	build	a	specific	plaorm	
•  install	<plaorm>:	install	a	specific	plaorm	
–  returns	a	generated	QR	code	in	the	terminal	
•  run	<plaorm>:	build	and	install	a	specific	plaorm	
ADOBE	BUILD
ADOBE	BUILD	
hSps://build.phonegap.com
ADOBE	BUILD
Remote	build	
$>	phonegap	create	helloPG	com.examples.hw	HelloWorldPG	
$>	cd	helloPG/	
$>	phonegap	platform	add	android	
$>	phonegap	remote	build	android	
[phonegap]	compressing	the	app...	
[phonegap]	uploading	the	app...	
[phonegap]	building	the	app...	
[phonegap]	Android	build	complete	
$>
ADOBE	BUILD
SDKS
Ejecución	en	Android	Studio	
•  Once	android	plaorm	is	added,	project	can	
be	opened	within	Android	Studio	
cordova	build	android	
•  Launch	the	Android	Studio	applica5on	
SDKs:	ANDROID	STUDIO
Ejecución	en	Android	Studio	
•  Select	Import	Project	(Eclipse	ADT,	Gradle,	etc)	
SDKS:	ANDROID	STUDIO
Ejecución	en	Android	Studio	
•  Select	loca5on	of	the	android	
plaorm	
(project/platforms/
android)	
•  For	the	Gradle	Sync	ques5on	
you	can	simply	answer	Yes	
SDKS:	ANDROID	STUDIO
Intel	XDK	
•  SDK:	
hSps://sojware.intel.com/es-es/intel-xdk	
•  AppPreview:	para	iOS,	android,	Windows	
phone
ionic	
•  hSp://ionicframework.com
Thank	for	aSending!	
•  G.	Huecas	
•  TwiSer:		@ghuecas	
•  www.dit.upm.es/~gabriel

More Related Content

What's hot (20)

PDF
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 
PDF
Cordova: APIs and instruments
Ivano Malavolta
 
PDF
Introduction to PhoneGap
RameshNair6
 
PPTX
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak
 
PPTX
Hybrid App Development with PhoneGap
Dotitude
 
PPTX
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 
PDF
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Nick Landry
 
PPTX
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
PPTX
Hybrid Mobile Applications
Ruwan Ranganath
 
PDF
Hybrid Apps with Ionic Framework
Bramus Van Damme
 
PPTX
All About Phonegap
Sushan Sharma
 
PDF
Cordova and PhoneGap Insights
Monaca
 
PPTX
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
PDF
Hybrid app development with ionic
Wan Muzaffar Wan Hashim
 
ODP
Hybrid application development
Knoldus Inc.
 
PDF
Ionic framework one day training
Troy Miles
 
ODP
Introduction to PhoneGap
Quang Minh Dao
 
PDF
Building Native Mobile Applications with PhoneGap
Simon MacDonald
 
PDF
Your choices for building a mobile app in 2016
Jad Salhani
 
PPT
Cross platform mobile application development
webprogr.com
 
Apps with Apache Cordova and Phonegap
Christian Grobmeier
 
Cordova: APIs and instruments
Ivano Malavolta
 
Introduction to PhoneGap
RameshNair6
 
Hybrid Mobile Development with Apache Cordova and Java EE 7 (JavaOne 2014)
Ryan Cuprak
 
Hybrid App Development with PhoneGap
Dotitude
 
Cross-Platform Development using Angulr JS in Visual Studio
Mizanur Sarker
 
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Nick Landry
 
Workshop on Hybrid App Development with Ionic Framework
Aayush Shrestha
 
Hybrid Mobile Applications
Ruwan Ranganath
 
Hybrid Apps with Ionic Framework
Bramus Van Damme
 
All About Phonegap
Sushan Sharma
 
Cordova and PhoneGap Insights
Monaca
 
Intro to Ionic for Building Hybrid Mobile Applications
Sasha dos Santos
 
Hybrid app development with ionic
Wan Muzaffar Wan Hashim
 
Hybrid application development
Knoldus Inc.
 
Ionic framework one day training
Troy Miles
 
Introduction to PhoneGap
Quang Minh Dao
 
Building Native Mobile Applications with PhoneGap
Simon MacDonald
 
Your choices for building a mobile app in 2016
Jad Salhani
 
Cross platform mobile application development
webprogr.com
 

Viewers also liked (19)

PDF
Developing Mobile Applications for iOS and Android the Oracle way
Toronto-Oracle-Users-Group
 
PDF
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
Roel Hartman
 
PPTX
moscmy2016: Extending Docker
Mohammad Fairus Khalid
 
PDF
georchestra SDI: Project Status Report
Camptocamp
 
PDF
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Alessandro Nadalin
 
PDF
Introduction to Docker - Learning containerization XP conference 2016
XP Conference India
 
PDF
Using docker to develop NAS applications
Terry Chen
 
PPTX
Ebanking
Nitin Dhariwal
 
PDF
Docker for the Brave
David Schmitz
 
PPTX
Containers for sensor web services, applications and research @ Sensor Web Co...
Daniel Nüst
 
PPTX
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
PDF
Docker Dhahran Nov 2016 meetup
Walid Shaari
 
PPTX
Xamarin and SAP Mobile Platform for Mobile Enterprise Success - SAP Slides
Xamarin
 
PPT
6039317 ebanking
Sanjiv Shet
 
PDF
SAP mobile platform & mobile apps
Capgemini
 
PDF
Progressive web apps
R. Caner Yıldırım
 
PPTX
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Baruch Sadogursky
 
PDF
Docker introduction
Julien Maitrehenry
 
Developing Mobile Applications for iOS and Android the Oracle way
Toronto-Oracle-Users-Group
 
Best of both worlds: Create hybrid mobile applications with Oracle Applicatio...
Roel Hartman
 
moscmy2016: Extending Docker
Mohammad Fairus Khalid
 
georchestra SDI: Project Status Report
Camptocamp
 
Deploying 3 times a day without a downtime @ Rocket Tech Summit in Berlin
Alessandro Nadalin
 
Introduction to Docker - Learning containerization XP conference 2016
XP Conference India
 
Using docker to develop NAS applications
Terry Chen
 
Ebanking
Nitin Dhariwal
 
Docker for the Brave
David Schmitz
 
Containers for sensor web services, applications and research @ Sensor Web Co...
Daniel Nüst
 
Hybrid Mobile Development with Apache Cordova and
Ryan Cuprak
 
Docker Dhahran Nov 2016 meetup
Walid Shaari
 
Xamarin and SAP Mobile Platform for Mobile Enterprise Success - SAP Slides
Xamarin
 
6039317 ebanking
Sanjiv Shet
 
SAP mobile platform & mobile apps
Capgemini
 
Progressive web apps
R. Caner Yıldırım
 
Building a private CI/CD pipeline with Java and Docker in the Cloud as presen...
Baruch Sadogursky
 
Docker introduction
Julien Maitrehenry
 
Ad

Similar to Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS (20)

PDF
Building Cross-Platform Mobile Apps
Troy Miles
 
PPTX
Phone gap
Ali Dany
 
PPT
Phonegap android
umesh patil
 
PDF
Developing Great Apps with Apache Cordova
Shekhar Gulati
 
PDF
Cordova 101
Rob Dudley
 
PPTX
phonegap_101
Asanka Indrajith
 
PDF
Firefox OS in the development process of a HTML5 app with Cordova
Thomas Dori
 
PDF
[2015/2016] Apache Cordova
Ivano Malavolta
 
PDF
PhoneGap/Cordova
Mihai Corlan
 
PPTX
fdocuments.in_apache-cordova-overview.pptx
ssuserd27db6
 
PPTX
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
PDF
Apache Cordova 4.x
Ivano Malavolta
 
PDF
Introduction to Phonegap
Andrei Firoiu
 
PPTX
Building Cross-Platform JavaScript Apps using Cordova
Noam Kfir
 
PDF
Web, Native & Hybrid Apps Overview
Creative Spark, an M&C Saatchi Company
 
PPTX
NCDevCon 2017 - Cross Platform Mobile Apps
John M. Wargo
 
PDF
Native Javascript apps with Phonegap - De Keijzer
Codemotion
 
PDF
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Martin de Keijzer
 
PPTX
Talk (2)
suraj sakhardande
 
PPT
Apache Cordova phonegap plugins for mobile app development
webprogr.com
 
Building Cross-Platform Mobile Apps
Troy Miles
 
Phone gap
Ali Dany
 
Phonegap android
umesh patil
 
Developing Great Apps with Apache Cordova
Shekhar Gulati
 
Cordova 101
Rob Dudley
 
phonegap_101
Asanka Indrajith
 
Firefox OS in the development process of a HTML5 app with Cordova
Thomas Dori
 
[2015/2016] Apache Cordova
Ivano Malavolta
 
PhoneGap/Cordova
Mihai Corlan
 
fdocuments.in_apache-cordova-overview.pptx
ssuserd27db6
 
[JavaLand 2015] Developing JavaScript Mobile Apps Using Apache Cordova
Hazem Saleh
 
Apache Cordova 4.x
Ivano Malavolta
 
Introduction to Phonegap
Andrei Firoiu
 
Building Cross-Platform JavaScript Apps using Cordova
Noam Kfir
 
Web, Native & Hybrid Apps Overview
Creative Spark, an M&C Saatchi Company
 
NCDevCon 2017 - Cross Platform Mobile Apps
John M. Wargo
 
Native Javascript apps with Phonegap - De Keijzer
Codemotion
 
Native Javascript apps with PhoneGap 11-04-2014 Codemotion Rome
Martin de Keijzer
 
Apache Cordova phonegap plugins for mobile app development
webprogr.com
 
Ad

Recently uploaded (20)

PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
July Patch Tuesday
Ivanti
 
Biography of Daniel Podor.pdf
Daniel Podor
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 

Cordova / PhoneGap, mobile apps development with HTML5/JS/CSS