android wear develpment

Post on 22-Jun-2015

250 Views

Category:

Internet

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Android Wear Development

TRANSCRIPT

Desarrollo en Android Wear

@GDGMALLORCA

Índice

● Entorno de Desarrollo / API● Notificaciones● Views● Reconocimiento de voz● Data Layer

Entorno de Desarrollo / API

Herramientas● Android Studio

● SDK○ Paquetes necesarios○ Versiones de Android

● API Wear○ Emulador

Creación de un nuevo proyecto para Wear

Proyecto● Mobile● Wear

Esqueleto● AndroidManifest● Resources● Layouts● Drawables● Values

Notificaciones

La parte fácil

Notificaciones

La parte nueva

● NotificationCompat

● Tipos de notificaciones○ Stacking Notifications○ Page Notifications○ Remote input

Notificaciones

Creando una notificación

Notificaciones

Actions en NotificationCompat

Notificaciones

¿Y lo nuevo?

Notificaciones

Page notifications

Notificaciones

Stack notificationsO cómo evitar el síndrome del cansinismo

Notificaciones

Stack notifications

Googleconsejo: “Add a Summary Notification”

Notificaciones

Remote inputO no tocar el móvil ni con un palo

Notificaciones

Remote input

Views

Views

Reconocimiento de voz

Reconocimiento de voz

Utilizar las palabras predefinidas para sobreescribir una acción

<activity android:name="MyNoteActivity"> <intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="com.google.android.voicesearch.SELF_NOTE" /> </intent-filter> </activity>

Reconocimiento de voz

Iniciar la aplicación con la voz

<application> <activity android:name="StartRunActivity" android:label="MyRunningApp"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity></application>

Reconocimiento de voz

Abrir el intent de reconocimiento

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);

startActivityForResult(intent, SPEECH_REQUEST_CODE);

Data Layer

4.3(SDK 18)

Last Google Play

Wear/AVD

Data Layer

s

Data Layer

DataItemsMessageApi AssetsWearableListener → WearDataListener → Phone

s

Fin

@GDGMallorca

Iñaki Villar@inyaki_mwc

Santi Iglesias@ianholing

Juan Miguel Liras@sekongur

Github:

s

top related