Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Michał Tajchert - Android Wear Deep Dive
Search
Riga Dev Day
January 30, 2015
Programming
41
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Michał Tajchert - Android Wear Deep Dive
Riga Dev Day
January 30, 2015
More Decks by Riga Dev Day
See All by Riga Dev Day
Faster Java by Adding Structs (Sort Of)
rigadevday
0
180
Prepare for JDK 9! by Dalibor Topic
rigadevday
0
150
Little Important Things in Distributed Architectures by Andres Jaan Tack
rigadevday
0
150
Oracle 12c for Developers by Alex Nuijten
rigadevday
1
140
The Language of Regular Expressions. So You Think You Can Speak It? by Rustam Mehmandarov
rigadevday
0
85
Modern Java Component Design with Spring 4.3 by Juergen Hoeller
rigadevday
0
270
Open Source and OpenJDK: Do They Deliver? by Simon Ritter
rigadevday
0
79
Google Apps Integration in Oracle Apex by Richard Martens
rigadevday
0
300
Integration Testing from the Trenches by Nicolas Fränkel
rigadevday
0
250
Other Decks in Programming
See All in Programming
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
320
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
160
go-spidermonkeyでAIエージェントのCode Modeを実装する
syumai
3
1.5k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
390
Streamlitで実現する自然言語データアプリ開発
ayumu_yamaguchi
0
160
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.4k
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
140
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
290
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
240
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
140
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
1.9k
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
150
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
510
From π to Pie charts
rasagy
0
360
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
It's Worth the Effort
3n
188
29k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
530
A Tale of Four Properties
chriscoyier
163
24k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Skip the Path - Find Your Career Trail
mkilby
1
230
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Transcript
Android Wear Deep Dive Michał Tajchert Polidea, Software Engineer
Michał Tajchert Android dev in Polidea Warsaw GDG Gadget freak
None
Notifications
Notifications Simplicity Context Extension
Actions
Actions NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent)
.addAction(R.drawable.ic_map, “Map Title”, mapPendingIntent);
None
Notification stack NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation)
.setContentIntent(viewPendingIntent) .setGroup(“group_unique_name”)
NotificationCompat.WearableExtender
Notification NotificationCompat.WearableExtender wearableExtender = new NotificationCompat. WearableExtender() .setHintHideIcon(true) .setBackground(mBitmap); NotificationCompat.Builder
notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent) .extend(wearableExtender);
Background 400x400 px or 640x400 px
Drawables res/drawables-nodpi
Voice Actions
Standalone apps!
Standalone app • Offline mode • Custom UI • Access
to sensors (and more) • Background work • ....
APK APK
Mobile Module ? Wear Module
Google Play Services
Data exchanging • DataItem API • Message API
Message API
DataItem API
Data Layer Interfaces interface DataListener { void onDataChanged(DataEventBuffer dataEvents); }
interface MessageListener { void onMessageReceived(MessageEvent messageEvent); } interface NodeListener { void onPeerConnected(Node node); void onPeerDisconnected(Node node); }
Teleport github.com/Mariuxtheone/Teleport
Teleport TeleportClient mTeleportClient = new TeleportClient(this); mTeleportClient.connect(); mTeleportClient.sendMessage("startActivity", null); mTeleportClient.syncInt("myInt",
12345); 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); };}
EventBus
BusWear github.com/tajchert/BusWear
EventBus
EventBus
BusWear
EventBus.getDefault().post(parcelableObject, this); EventBus.getDefault().postRemote("text", this); EventBus.getDefault().postLocal(object); protected void onCreate(Bundle savedInstanceState) {
EventBus.getDefault().register(this); } public void onEvent(ParcelableObject parcelableObject){ } public void onEvent(String text){ } BusWear
None
None
None
WearHttp github.com/takahirom/WearHttp
WearHttp new WearGetText(MainActivity.this).get("http://example.com/text.txt", new WearGetText.WearGetCallBack() { @Override public void onGet(String
contents) { mTextView.setText(contents); } @Override public void onFail(final Exception e) { mTextView.setText(e.getMessage()); } });
AndroidWearScripts github.com/tajchert/AndroidWearScripts
AndroidWearScripts adb forward tcp:4444 localabstract:/adb-hub adb connect localhost:4444 adb -s
localhost:4444 <command> ./main.sh <optional Id> ./screenshot.sh ./install.sh <apk_file> ./listPackages.sh ...
Exception handling goo.gl/o46Z1u
Exception handling <service android:name=".wear.service.ErrorService" android:process=":error"/> public class WearableApp extends Application
{ private Thread.UncaughtExceptionHandler mWearUEH = new Thread.UncaughtExceptionHandler() { public void uncaughtException(final Thread thread, final Throwable ex) { //... startService(errorIntent); } }; @Override public void onCreate() { Thread.setDefaultUncaughtExceptionHandler(mWearUEH); } } goo.gl/o46Z1u
Sensors
• Acceleration (m/s2) • Magnetic Field (μT) • Gyroscope (rad/s)
• Proximity (cm) Sensors • Temperature (°C) • Pressure (hPa) • Humidity (%) • Light (lx) • Heartrate
Sensors - calculated • Acceleration (m/s2) • Magnetic Field (μT)
• Gyroscope (rad/s) • Proximity (cm) • Temperature (°C) • Pressure (hPa) • Humidity (%) • Light (lx) • Heartrate • Steps • Significant Motion • Gravity • Linear Acceleration • Vector Rotation (x3)
Magnetic Field - location, field strength
Gyroscope - rate or rotation (rad/s)
None
Continuity
Views
Problem?
WearViewStub
BoxInsetLayout
CircledImageView
DismissOverlayView
DelayedConfirmationView
DelayedConfirmationView
GridViewPager
CardFragment
CardFrame
GridViewPager- has beautiful background with parallax effect Here be dragons...
isRound() - works only with English language. which sometimes disappears.
App that rocks!
RAX79Z
google.com/+MichalTajchert @tajchert github.com/tajchert www.tajchert.pl Michał Tajchert