Share
Embed
Transcript
17 slides
-
OR BEST CALLED "PhoneGap is a free and open source
framework that allows you to create mobile apps using standardized web APIs for the platforms you care about." – APACHE CORDOVA PHONEGAP http://phonegap.com -
HOW TO INSTALL IT? 1. You need install first. 2.
Install via , this way: 3. Install Cordova's CLI: node.js PhoneGap's CLI NPM $ [sudo] npm install -g phonegap $ [sudo] npm install -g cordova -
OUR FIRST HELLO WORLD APP 1. "hello" is the folder
where our first app is created. 2. "com.example.hello" our app's identifer. 3. "HelloWorld" our app's name. $ phonegap create hello com.example.hello HelloWorld $ cd hello $ phonegap run android -
"JavaScript® (often shortened to JS) is a lightweight, interpreted, object-oriented
language with first-class functions, most known as the scripting language for Web pages, but used in many non- browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic, is type safe, and supports object- oriented, imperative, and functional programming styles." – JAVASCRIPT https://developer.mozilla.org -
INITIALIZE IT PhoneGap starts our application via www/index.html, inside this
HTML file some JavaScript files where added to initialize the PhoneGap's framework, also, to start our app when the . PhoneGap development is pretty much a web application with phone capabilities. device is ready -
PROTOTYPAL INHERITANCE "JavaScript has strong object-oriented programming capabilities, even though
some debates have taken place due to the differences in object-oriented JavaScript compared to other languages." – https://developer.mozilla.org -
HERENCIA PROTOTIPAL, O, OOP ALA JAVASCRIPT "La herencia prototipal consiste
en que un objeto es el prototipo de otro. La herencia en JavaScript es simple, es como una cadena, un objeto hereda de otro a través de un atributo que posee el objeto Object, el atributo es prototype. A prototype le podemos asignar cualquier cosa, simplemente que solo funciona cuando le asignamos un objeto, si tratamos de asignarle un primitivo, por ejemplo un número entero, JavaScript solo lo ignora. A esto se le denomina prototype chain" – http://juan.im -
SUPPORTED FEATURES Basic device information ( API). Network and Battery
. , , and . , playback and . Access files on device or network ( API). via dialog box or vibration. . . . Open new browser windows ( ). Debug console. Device Connection Events Accelerometer Compass Geolocation Camera Media Capture File Notification Contacts Globalization Splashscreen InAppBrowser -
HANDLING FEATURES $ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-cons $ phonegap
local plugin list [phonegap] org.apache.cordova.core.console $ phonegap local plugin remove org.apache.cordova.core.console -
CUSTOMIZE EACH PLATFORM You can customize your application via merges
folder, this folder can handle custom stuff for each platform. This folder is a mirror from www folder, you don't need to do something inside platforms folder, basically they're regularly replaced with the top- level www directory's cross-platform source.