Cordova 3, apps para android

Preview:

DESCRIPTION

Ponencia de Jorge del Casar en DroidconMAD2013. Sinopsis: Cordova es un framework de desarrollo móvil de código abierto que permite usar tecnologías web standard como HTML5, CSS3 y Javascript para el desarrollo multiplataforma, evitando desarrollar en el lenguaje nativo de cada plataforma. La nueva Command Line Interface (CLI) desarrollada en Node.js te permite automatizar la creación de proyectos, adición de plataformas y plugins así como la construir la app y probarla en simuladores y dispositivos reales.

Citation preview

Cordova 3, Apps HTML5 para AndroidJorge del Casar (a.k.a. )@JorgeCasar

What's Apache Cordova?A platform for building native mobile applications using HTML, CSS and

JavaScript

An open-source mobile development framework

http://cordova.apache.org

Apache Cordova 3.019 Jul 2013

Main release Notes:New (lighter) Core

New Command Line Tooling (Node.js based)

Release Plugman 0.11.0 (new plugin management)

Change <plugin> to <feature> in config.xml

Breakout Plugins into their own repos

Deprecate Froyo

Apache Cordova 3.102 Oct 2013

Release notes:Initial (alpha) support for Firefox OS

Windows 8 support for CLI project

Unified whitelist syntax on iOS and Android

Documentation translated into several languages:

fr, zh, de, it, ja, ko, ru & es

Apache Cordova 3.222 Nov 2013

Release notes:Bug fixes and enhancements

Fixing Android 4.4 (KitKat) related bugs

Unified whitelist syntax on iOS and Android

Apache Cordova 3.3 RC106 Dec 2013

Release notes: when it shipsInstall or update Cordova and report issues

Release date: 20 Dec 2013

CLI = Command Line Interface1. Install

2. Install Cordova package:

Node.js

sudo npm install -g cordova

Createcordova create <PATH> [ID] [NAME]

Parameters:

PATH: directory to be generated for your project

ID: reverse domain-style identifier (optional)

NAME: application's display text (optional)

Platform(s)cordova platform(s) [{add|remove|rm} <PLATFORM>]

Parameters:

PLATFORM: platform you want to add

android, blackberry10, firefoxos, ios, wp7, wp8, ...

Without parameters: list all installed and available platformsCheck and before add a platformPlatform Support Platform Guides Android

Plugin(s)cordova plugin(s) [{add|remove|rm} <PATH|URI>]

Parameters:

PATH or URI: from where intall the plugin

Without parameters: list all currently installed pluginsYou can find a or Apache Cordova Plugin Create your own one

Preparecordova prepare [<PLATFORM>]

Copies files for specified platforms, or all platforms, so that the project is

ready to build in each SDK

Compilecordova compile [<PLATFORM>]

Builds the app for specified platforms, or all platforms

Buildcordova build [<PLATFORM>]

Shortcut for , then prepare compile

Emulatecordova emulate [<PLATFORM>]

Deploys app in specified (or all) platforms' emulator, opening emulator if

necessary

Runcordova run [<PLATFORM>]

Deploys app on specified (or all) platform devices, which must be properly

connected and configured in each SDK

Platform Support

Core: The main platformssupported

Android

BlackBerry

iOS

Windows Phone

Windows 8

Horizon: next platforms tobecome core

Tizen

Qt

Firefox OS

Ubuntu Mobile (Qt)

Windows (Win32)

Sunset: not distribution anymoreSymbian

webOS

Bada

Core Features:

Supported: Android, BlackBerry 10, iOS, WP7 and WP8

:

Supported: Android and iOS

:

Supported: Android, BlackBerry 10, iOS, WP7 and WP8

cordova CLI

Embedded WebView

Plug-in Interface

Platform guide: Android1. Check the

2. Install

3. Append in the PATH enviroment:

4. Register as

System Requirements

Android SDK

[adt-path]/sdk/tools

[adt-path]/sdk/platform-tools

Google Play publisher

Make your onw PluginsYou can lern how reading the and read how to

implement the native code in

plugin development guide

Android

Platform PluginsYou can add a plugin to a specific platform using plugman directly

plugman --platform [PLATFORM] --project [PATH] --plugin [URL]

If you don't have plugman you can install globally:

npm install -g plugman

Merges: customize each platformAll you put inside ./merges/[platform] will overide the files

placed in ./www/ in the specific platform