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
110
Deep, Skinny Neural Networks are not Universal Approximators
breandan
0
110
PRM-RL: Long-range Robotic Navigation Tasks by Combining Reinforcement Learning and Sampling-based Planning
breandan
0
130
DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars
breandan
0
100
Idiolect: A Reconfigurable Voice Coding Assisant
breandan
0
190
Interactive Programming with Automated Reasoning
breandan
0
66
Learning Structural Edits via Incremental Tree Transformations
breandan
0
46
Thinking Like Transformers
breandan
0
78
Discriminative Embeddings of Latent Variable Models for Structured Data
breandan
0
47
Other Decks in Programming
See All in Programming
ニーリーにおけるプロダクトエンジニア
nealle
0
840
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
PipeCDのプラグイン化で目指すところ
warashi
1
280
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
230
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
270
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
900
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
2
640
テスト駆動Kaggle
isax1015
0
170
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
650
5つのアンチパターンから学ぶLT設計
narihara
1
170
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
21
4k
AI時代の『改訂新版 良いコード/悪いコードで学ぶ設計入門』 / ai-good-code-bad-code
minodriven
16
6.5k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
GitHub's CSS Performance
jonrohan
1031
460k
Navigating Team Friction
lara
187
15k
Embracing the Ebb and Flow
colly
86
4.7k
Writing Fast Ruby
sferik
628
62k
Practical Orchestrator
shlominoach
189
11k
Raft: Consensus for Rubyists
vanstee
140
7k
Statistics for Hackers
jakevdp
799
220k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
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