hello, android wear!

46
Hello, Android Wear! +FrederikSchweiger | @flschweiger Design and build apps for wearables.

Upload: frederik-schweiger

Post on 16-Apr-2017

138 views

Category:

Technology


0 download

TRANSCRIPT

Hello, Android Wear!

+FrederikSchweiger | @flschweiger

Design and build apps for wearables.

~ 0.25 %of all apps in the Google Play Store

?

Suggest.Be aware of the user’s context ( time, location, physical activity ) and proactively display the currently needed information.

Demand.Listen to voice commands and / or show your fullscreen user interface.

launched automatically glanceable suggest and demand zero or low interaction

launched automatically glanceable suggest and demand zero or low interactionDesigning for G

lancing

extended notifications

VS

native wear applications

extended notifications

VS

native wear applications

NO WORK REQUIRED

NO WORK REQUIRED

NotificationCompat.WearableExtender wearableExtender =

new NotificationCompat.WearableExtender()

.setHintHideIcon(true)

.setBackground(mBitmap)

.addPage(mySecondPageNotification);

WearableExtenderNotificationService.java

// Extend the notification builder with the second page

Notification notification = notificationBuilder

.extend(wearableExtender)

.build();

WearableExtenderNotificationService.java

Simple.

extended notifications

VS

native wear applications

Send data Custom UI Voice Actions

Send data Custom UI Voice Actions

Data

Node

MessageAPI

DataItemconsists of

PayloadPathA

PI

Nodeconsists of

IDName

isNear()API

Messageconsists of

PathPayload (optional)A

PI

Send data Custom UI Voice Actions

Think about stream cards first!

Max 5 seconds per interaction!

5

✓✘

Don’t buzz your users on every move!

The Wearable UI Librarydependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.google.android.support:wearable:+'

compile 'com.google.android.gms:play-services-wearable:+'

}

WearableListView CircledImageView ConfirmationActivity ...and many more!

Send data Custom UI Voice Actions

<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>

“OK Google, take a note” “OK Google, note to self” “OK Google, call me a taxi”

System-providedAndroidManifest.xml

<application>

<activity

android:name=".MainTimerActivity"

android:label="Timer" >

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />

</intent-filter>

</activity>

</application>

“OK Google, start Timer”

App-providedAndroidManifest.xml

private static final int SPEECH_REQUEST_CODE = 0;

// Create an intent that can start the Speech Recognizer activity

private void displaySpeechRecognizer() {

Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);

intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,

RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);

// Start the activity, the intent will be populated with the speech text

startActivityForResult(intent, SPEECH_REQUEST_CODE);

}

Free-form Speech InputMainActivity.java

DEMOtime

Thanks!

+FrederikSchweiger | @flschweiger

Feel free to circle me on Google+ and send me your questions! You will find the slides in my Google+ stream.