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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Breandan Considine
July 31, 2015
Programming
0
70
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
150
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
170
DeepTest: Automated Testing of Deep-Neural-Network-driven Autonomous Cars
breandan
0
120
Idiolect: A Reconfigurable Voice Coding Assisant
breandan
0
250
Interactive Programming with Automated Reasoning
breandan
0
94
Learning Structural Edits via Incremental Tree Transformations
breandan
0
68
Thinking Like Transformers
breandan
0
100
Discriminative Embeddings of Latent Variable Models for Structured Data
breandan
0
78
Other Decks in Programming
See All in Programming
Codex の「自走力」を高める
yorifuji
0
1.3k
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
970
実践ハーネスエンジニアリング #MOSHTech
kajitack
6
2.8k
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
220
存在論的プログラミング: 時間と存在を記述する
koriym
4
470
PHPで TLSのプロトコルを実装してみる
higaki_program
0
420
安いハードウェアでVulkan
fadis
1
770
ネイティブアプリとWebフロントエンドのAPI通信ラッパーにおける共通化の勘所
suguruooki
0
170
20260320登壇資料
pharct
0
120
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
300
20260315 AWSなんもわからん🥲
chiilog
2
170
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
16
3.4k
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
How GitHub (no longer) Works
holman
316
150k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
How to Think Like a Performance Engineer
csswizardry
28
2.5k
Navigating Team Friction
lara
192
16k
A Soul's Torment
seathinner
5
2.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
4 Signs Your Business is Dying
shpigford
187
22k
Paper Plane (Part 1)
katiecoart
PRO
0
5.8k
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