52
Follow @thedamfr Android Wear

Android Wear - Ceci n'est pas une montre ! - #TakeOffTalk

Embed Size (px)

Citation preview

Follow @thedamfr

AndroidWear

Damien Cavaillès@TheDamFr

ANDROIDEVERYWHERE

ANDROIDEVERYWEAR

Predictif

No interaction

Voice Quick selection

Context Glanceable

No interaction

Voice Quick selection

Context GlanceableALL ACTION

ACTIONSNOT APPS

QUICK & SHORTINTERACTIONS

ONE PLATFORMMULTIPLE DEVICES

NOTIFICATION

NOTIFICATION

NOTIFICATION

DEMO

NOTIFICATION

DEMO

CONCEPTS

CONCEPTS

MobileModule

WearModule

CONCEPTS

?

Message

DataItem

Node

CONCEPTS

Node

CONCEPTS

Message

CONCEPTS

Message

CONCEPTS

<service android:name=".StartWearActivityService">

<intent-filter>

<action

android:name="com.google.android.gms.wearable.BIND_LISTENER"/>

</intent-filter>

</service>

DataItem

CONCEPTS

GDE

DataItem / Message

PathString “/path/to/item”

Payload Byte[ ] <=100KB

DataItem

CONCEPTS

Asset asset = createAssetFromBitmap(bitmap);

PutDataMapRequest dataMap = PutDataMapRequest.

create("/image");

dataMap.getDataMap()

.putAsset("profileImage", asset)

WearModule?

EXEMPLE

Hoi Lam Google

Wearble Developer Advocate

MobileModule

WearModule

Activity

EXEMPLE

Le mot-clé start lance l’activité

MobileModule

WearModule

Activity

L’activité utilise un Message

EXEMPLE

MobileModule

WearModule

ActivityWearService

Le message réveille un service

EXEMPLE

MobileModule

WearModule

ActivityWearService

WWW

Le service cherche les données sur le web

EXEMPLE

MobileModule

WearModule

ActivityWearService

WWW

Le service DataSync les données

EXEMPLE

MobileModule

WearModule

ActivityWearService

WWW

Le service charge l’image depuis le web

EXEMPLE

MobileModule

WearModule

ActivityWearService

WWW

Le service DataSync l’Asset

EXEMPLE

USAGE

TeleportData Sync and Messaging Libraryfor Android Wear

Githubgithub.com/Mariuxtheone/Teleport

Gradle - Mavencompile 'Teleport:teleportlib:0.1.3'

GDE

TeleportClient

TeleportClient mTeleportClient = new TeleportClient(this);

mTeleportClient.connect();

Set Up:

Send Message

mTeleportClient.sendMessage("startActivity", null);

Sync Data

mTeleportClient.syncInt("myInt", 12345)

GDE

TeleportService

setOnGetMessageTask(new TeleportService.OnGetMessageTask {

@Override

protected void onPostExecute(String path) {

if (path.equals("startActivity")){

Intent startIntent = new Intent(this, WearActivity.

class);

startIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

startActivity(startIntent);

};}

Retrieve a Message

Github : TheDamFrTwitter : @TheDamFr Questions ?