• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
03 Building cross platform mobile applications with PhoneGap / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles
 

03 Building cross platform mobile applications with PhoneGap / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles

on

  • 691 views

Building cross platform mobile applications with PhoneGap

Building cross platform mobile applications with PhoneGap
Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles

Statistics

Views

Total Views
691
Views on SlideShare
691
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs LicenseCC Attribution-NonCommercial-NoDerivs License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    03 Building cross platform mobile applications with PhoneGap / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles 03 Building cross platform mobile applications with PhoneGap / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles Presentation Transcript

    • Desarrollo de Aplicaciones Cross- Platform para Dispositivos Móviles Building Cross-Platform Mobile Applications M.S.C. Raquel Vásquez Ramírez M.S.C. Cristian A. Rodríguez Enríquez
    • Contenido •  Config XML •  Essential Properties: Config XML •  Uso de Config XML •  Preferences: Multi-Platform •  Preferences: iOS •  Preferences: BlackBerry •  Preferences: Android •  Storage Building Cross-Plaftform Mobile Applications – PhoneGap Slide 02 of 18
    • Config XML Building Cross-Plaftform Mobile Applications – PhoneGap Slide 03 of 18 Apps built using Adobe® PhoneGap™ Build can be set up either through PhoneGap Build Web Interface or by using a config.xml The config.xml file, as specified in the W3C widget specification, allows developers to easily specify metadata about their applications.
    • Essen%al  Proper%es  (config.xml)   Building Cross-Plaftform Mobile Applications – PhoneGap Slide 04 of 18 <widget>: The widget element must be the root of your XML document - it lets us know that you are following the W3C specification. •  id: the unique identifier for your application •  version: for best results, use a major/minor/patch style version, with three numbers, such as 0.0.1 •  versionCode: (optional) when building for Android, you can set the versionCode by specifying it in your config.xml.
    • Notes: BlackBerry only supports latin characters inthe <name> attribute. BlackBerry should keep the <description> element at a reasonable length Building Cross-Plaftform Mobile Applications – PhoneGap Slide 05 of 18 Essen%al  Proper%es  (config.xml) <name>: The name of the application. <description>: A description for your application.
    • <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id = "com.phonegap.example" versionCode = "10” version = "1.0.0"> <!-- versionCode is optional and Android only --> <name>PhoneGap Example</name> <description> An example for phonegap build docs. </description> <author href="https://build.phonegap.com" email="support@phonegap.com"> Hardeep Shoker </author> </widget> Building Cross-Plaftform Mobile Applications – PhoneGap Slide 06 of 18 Uso de Config XML
    • Preferences Building Cross-Plaftform Mobile Applications – PhoneGap Slide 07 of 18 <preference>: You can have zero or more of these elements present in your config.xml. If you specify none, default properties maybe applied. • name: required • value: required
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 08 of 18 Preferences: Multi-Platform <preference name="phonegap-version" value="2.9.0" /> <preference name="orientation" value="landscape" /> <preference name="target-device" value="universal" /> <preference name="fullscreen" value="true" />
    • More: https://build.phonegap.com/docs/config-xml Building Cross-Plaftform Mobile Applications – PhoneGap Slide 09 of 18 Preferences: iOS <preference name="webviewbounce" value="false" /> Controls whether the screen "bounces" when scrolled beyond the top or bottom on iOS. By default, the bounce is on. <preference name="prerendered-icon" value="true" /> if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen. Default is false. <preference name="prerendered-icon" value="true" /> if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen. Default is false.
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 10 of 18 Preferences: BlackBerry <preference name="disable-cursor" value="true" /> Prevents a mouse-icon/cursor from being displayed on the app
    • More: https://build.phonegap.com/docs/config-xml Building Cross-Plaftform Mobile Applications – PhoneGap Slide 11 of 18 Preferences: Android <preference name="android-minSdkVersion" value="10" /> <preference name="android-maxSdkVersion" value="15" /> Android-minSdkVersion and/or android-maxSdkVersion, with integer values <preference name="splash-screen-duration" value="10000" /> splash-screen-duration with a value in milliseconds
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 12 of 18 Storage PhoneGap provides access to the device's storage options. This API offers storage options based on two different W3C specifications: •  The Web Storage API Specification allows you to access data via simple key/value pairs. •  The Web SQL Database Specification offers more full- featured database tables accessed via SQL queries.
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 13 of 18 Storage: localStorage var permanentStorage = window.localStorage; var tempStorage = window.sessionStorage; Plataformas Soportadas: •  Android •  BlackBerry WebWorkss (OS 6.0 and higher) •  iOS •  Tizen •  Windows Phone 7 and 8
    • var value = window.localStorage.getItem("key"); // value is now equal to "value” Building Cross-Plaftform Mobile Applications – PhoneGap Slide 14 of 18 Storage: localStorage var keyName = window.localStorage.key(0); Key Quick Example - Returns the name of the key at the specified position window.localStorage.setItem("key", "value"); Set Item Quick Example - Assigns a keyed item's value Get Item Quick Example - Returns the item identified by the specified key
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 15 of 18 Storage: localStorage window.localStorage.removeItem("key"); Remove Item Quick Example - Removes the item identified by the specified key. window.localStorage.clear(); Clear  Quick  Example  -­‐  Removes all of the key/value pairs.
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 16 of 18 Storage: Database var db = window.openDatabase("test", "1.0", "Test DB", 1000000); openDatabase: Returns a new Database object. var dbShell = window.openDatabase(database_name, database_version, database_displayname, database_size); Plataformas Soportadas: •  Android •  BlackBerry WebWorkss (OS 6.0 and higher) •  iOS •  Tizen
    • Building Cross-Plaftform Mobile Applications – PhoneGap Slide 17 of 18 Storage: Database Objects: •  Database •  SQLTransaction •  SQLResultSet •  SQLResultSetRowList •  SQLError
    • Conclusiones   •  PhoneGap permite configurar la aplicación a través de un archivo de configuración XML •  Existen configuraciones especificas para cada plataforma •  PhoneGap permite utilizar almacenamiento local (Web y de base de datos) •  Hydra permite actualizar sin reinstalar utilizando push, inclusive cuando se actualiza el esquema de almacenamiento Building Cross-Plaftform Mobile Applications – PhoneGap Slide 18 of 18