Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hands-on with Android Wear
Search
Breandan Considine
July 31, 2015
Programming
0
69
Hands-on with Android Wear
A beginners guide to getting up and running with Android Wear.
Breandan Considine
July 31, 2015
Tweet
Share
More Decks by Breandan Considine
See All by Breandan Considine
Intrinsic social motivation via causal influence in multi-agent RL
breandan
0
140
Deep, Skinny Neural Networks are not Universal Approximators
breandan
0
140
PRM-RL: Long-range Robotic Navigation Tasks by Combining Reinforcement Learning and Sampling-based Planning
breandan
0
160
DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars
breandan
0
120
Idiolect: A Reconfigurable Voice Coding Assisant
breandan
0
240
Interactive Programming with Automated Reasoning
breandan
0
89
Learning Structural Edits via Incremental Tree Transformations
breandan
0
64
Thinking Like Transformers
breandan
0
100
Discriminative Embeddings of Latent Variable Models for Structured Data
breandan
0
73
Other Decks in Programming
See All in Programming
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
280
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
AI & Enginnering
codelynx
0
110
CSC307 Lecture 07
javiergs
PRO
0
550
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
2.5k
Oxlintはいいぞ
yug1224
5
1.3k
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
570
ぼくの開発環境2026
yuzneri
0
230
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Fluid Templating in TYPO3 14
s2b
0
130
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Into the Great Unknown - MozCon
thekraken
40
2.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
220
A better future with KSS
kneath
240
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
780
KATA
mclloyd
PRO
34
15k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
YesSQL, Process and Tooling at Scale
rocio
174
15k
Transcript
Hands-on with Breandan Considine JetBrains, Inc. AnDevCon Boston ‘15
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Wearable Data Layer (Play Services) • Communication channel between handheld
and wearables • Google Play Services behind the scenes • Provides three API for communication • Data Layer API • Node Layer API • Message Layer API
Android Wear Communication Mobile App Google Play Services Wear App
Data Layer Node Layer Message
Wearable Data Layer API (Play Services) • All wearable communication
starts with the GoogleApiClient apiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Wearable.API) .build();
Wearable Data Layer API @Override protected void onStart() { super.onStart();
apiClient.connect(); } @Override protected void onStop() { apiClient.disconnect(); super.onStop(); }
@Override public void onConnected(Bundle bundle) { Wearable.DataApi.addListener(apiClient, this); Wearable.MessageApi.addListener(apiClient, this);
Wearable.NodeApi.addListener(apiClient, this); } @Override protected void onPause() { super.onPause(); Wearable.DataApi.removeListener(apiClient, this); … } Listeners and Callbacks
// Sender Wearable.MessageApi.sendMessage(apiClient, transcriptionNodeId, PATH, byteArray); // Listener public void
onMessageReceived(MessageEvent me) { if (me.getPath().equals(PATH)){ … } } Message API • One-way communication channel between local and remote node
PendingResult<NodeApi.GetConnectedNodesResult> nodes = Wearable.NodeApi.getConnectedNodes(mGoogleApiClient); @Override public void onPeerConnected(Node node) {…}
@Override public void onPeerDisconnected(Node node) {…} Node API
PendingResult<CapabilityApi.GetCapabilityResult> capability = Wearable.CapabilityApi.getCapability( mGoogleApiClient, VOICE_TRANSCRIPTION_CAPABILITY_NAME, CapabilityApi.FILTER_REACHABLE); @Override public void
onCapabilityChanged(CapabilityInfo info) {…} <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="android_wear_capabilities"> <item>voice_transcription</item> </string-array> </resources> Capability API
Voice Actions • Like handheld, launching a wear app defaults
to android:label <activity android:name=".WearActivity" android:label="WearActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> … </activity>
Special Thanks