Introduction to Android Wear

59
An Introduction to +Sebastian Mauer Android GDE GDG Dublin DevFest, November 1st 2014

description

-

Transcript of Introduction to Android Wear

Page 1: Introduction to Android Wear

An Introduction to

+Sebastian MauerAndroid GDEGDG Dublin DevFest, November 1st 2014

Page 2: Introduction to Android Wear

#androidwear

Page 3: Introduction to Android Wear

#androidwear

Page 4: Introduction to Android Wear

#androidwear

Page 5: Introduction to Android Wear

#androidwear

Page 6: Introduction to Android Wear

#androidwear

Page 7: Introduction to Android Wear

#androidwear

Page 8: Introduction to Android Wear

#androidwear

Page 9: Introduction to Android Wear

#androidwear

Page 10: Introduction to Android Wear

#androidwear

Page 11: Introduction to Android Wear

you talk to the wearable

#androidwear

Page 12: Introduction to Android Wear

actions

#androidwear

Page 13: Introduction to Android Wear

actions

#androidwear

Page 14: Introduction to Android Wear

the wearable talks to you

actions

#androidwear

Page 15: Introduction to Android Wear

actions

context

#androidwear

Page 16: Introduction to Android Wear

actions

context

#androidwear

Page 17: Introduction to Android Wear

#androidwear

Page 18: Introduction to Android Wear

Launched automatically

#androidwear

Page 19: Introduction to Android Wear

Glanceable

#androidwear

Page 20: Introduction to Android Wear

Suggest and demand

#androidwear

Page 21: Introduction to Android Wear

Zero or low interaction

#androidwear

Page 22: Introduction to Android Wear

#androidwear

Page 23: Introduction to Android Wear

Notifications Apps

#androidwear

Page 24: Introduction to Android Wear

Notifications

#androidwear

Page 25: Introduction to Android Wear

#androidwear

Page 26: Introduction to Android Wear

#androidwear

Page 27: Introduction to Android Wear

#androidwear

NO WORK REQUIRED

Page 28: Introduction to Android Wear

#androidwear

Page 29: Introduction to Android Wear

#androidwear

NO WORK REQUIRED

Page 30: Introduction to Android Wear

RepliesPagesStacks

#androidwear

Page 31: Introduction to Android Wear

Notifications

#androidwear

Page 32: Introduction to Android Wear

Apps

#androidwear

Page 33: Introduction to Android Wear

Send data Custom UI Voice Actions

#androidwear

Page 34: Introduction to Android Wear

#androidwear

Page 35: Introduction to Android Wear

Node

Data

Message

#androidwear

Page 36: Introduction to Android Wear

PendingResult<GetConnectedNodesResult> getConnectedNodes(GoogleApiClient);client);

Method

public interface NodeListener { void onPeerConnected(Node peer); void onPeerDisconnected(Node peer);}

Listener

Node#androidwear

Page 37: Introduction to Android Wear

PendingResult<SendMessageResult> sendMessage(GoogleApiClient client, String nodeId, String action, byte[] data);

Method

public interface MessageListener { void onMessageReceived(MessageEvent messageEvent);}

Listener

Message#androidwear

Page 38: Introduction to Android Wear

PendingResult<DataItemResult>putDataItem(GoogleApiClient client, PutDataRequest request);

PendingResult<DataItemResult>getDataItem(GoogleApiClient client, Uri uri);

Methods

public interface DataListener { void onDataChanged(DataEventBuffer dataEvents);}

Listener

Data#androidwear

Page 39: Introduction to Android Wear

<service android:name=".MyListenerService" ><intent-filter>

<action android:name="com.google.android.gms.wearable.BIND_LISTENER" /> </intent-filter></service>

Intent Filter

public class MyListenerService extends WearableListenerService { ...}

Service

#androidwear

Page 40: Introduction to Android Wear

Send data Custom UI Voice Actions

#androidwear

Page 41: Introduction to Android Wear

#androidwear

Page 42: Introduction to Android Wear

#androidwear

Page 43: Introduction to Android Wear

#androidwear

Page 44: Introduction to Android Wear

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.support:wearable:+' compile 'com.google.android.gms:play-services-wearable:+'}

build.gradle

#androidwear

Page 45: Introduction to Android Wear

#androidwear

● BoxInsetLayout

● Card Fragment

● CircledImageView

● ConfirmationActivity

● DismissOverlayView

● GridViewPager

● GridPagerAdapter

● FragmentGridPagerAdapter

● WatchViewStub

Page 46: Introduction to Android Wear

#androidwear

● BoxInsetLayout

● Card Fragment

● CircledImageView

● ConfirmationActivity

● DismissOverlayView

● GridViewPager

● GridPagerAdapter

● FragmentGridPagerAdapter

● WatchViewStub

Page 47: Introduction to Android Wear

#androidwear

● BoxInsetLayout

● Card Fragment

● CircledImageView

● ConfirmationActivity

● DismissOverlayView

● GridViewPager

● GridPagerAdapter

● FragmentGridPagerAdapter

● WatchViewStub

Page 48: Introduction to Android Wear

#androidwear

● BoxInsetLayout

● Card Fragment

● CircledImageView

● ConfirmationActivity

● DismissOverlayView

● GridViewPager

● GridPagerAdapter

● FragmentGridPagerAdapter

● WatchViewStub

Page 49: Introduction to Android Wear

Send data Custom UI Voice Actions

#androidwear

Page 50: Introduction to Android Wear

#androidwear

Page 51: Introduction to Android Wear

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

System provided voice action

#androidwear

Page 52: Introduction to Android Wear

#androidwear

● Call a car/taxi

● Take a note

● Set alarm

● Set timer

● Start/Stop a bike ride

● Start/Stop a run

● Start/Stop a workout

● Show heart rate

● Show step count

Page 53: Introduction to Android Wear

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

App provided voice action

#androidwear

Page 54: Introduction to Android Wear

private void displaySpeechRecognizer() {Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,

RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);

startActivityForResult(intent, SPEECH_REQUEST_CODE);}

Speech Recognizer

#androidwear

Page 55: Introduction to Android Wear

Notifications Apps

#androidwear

Page 56: Introduction to Android Wear

What’s next?Getting Started with Android Weardeveloper.android.com/wear

Design for Android Weardeveloper.android.com/design/wear

#androidwear

Page 57: Introduction to Android Wear

+Sebastian MauerAndroid GDEGDG Dublin DevFest, November 1st 2014

Thanks!Any questions?

Page 58: Introduction to Android Wear
Page 59: Introduction to Android Wear