Introduction to Developing for Android Wear
Hoyt Summers Pittman
github.com/secondsun
This talk will cover
- History of Wearables
- Current Wearable
- Introduction to Wear
- Making Wear Apps
Obligitory Introduction
- Sr Software Engineer @ Red Hat
- www.aerogear.org
- Bit of a Google fan boy
- Lots more of a FOSS fanboy
- AJUG web chair
- M.S. in Human Computer Interaction
- Cyclist
History
- We've been trying this for a while
History
- My first "smart" watch
History
- My first smart watch
History
- My first smart watch I didn't hate using
History
- Up until recently, wearables have seen the most success in the fitness area.
History
- There have been several attempts at making a good smart watch.
History
- I/O 2014 Google Announced Android Wear and three watches.
Introduction to (hard)Wear
- Devices made by partners not Google
- Samsung
- LG
- Motorola
- Asus
- And more coming
- Devices use Bluetooth LE (Android 4.3+)
Introduction to (hard)Wear
- Bright Color Screens
- Touch Based Controls
- Round or Square Screens
Introduction to (hard)Wear
- Microphone
- Various Sensors
- Heartrate
- Pedometer
- Accelerometer
- GPS
Introduction to (hard)Wear
- Various styles
- Moto 360 took design very seriously
- LG Watch R looks very digital watch
- Most watches use standard bands
- Contact or wireless charging
- All watches kind of large
Introduction to (soft)Wear
- Actual Android
- 4.4 launch
- 5.0 rolling out literally right now
- Google Play Services support libs
- Wear can get features outside of Android update cycle
- Wear apps are less FOSS friendly
Introduction to (soft)Wear
- Several libraries to help out
-
com.google.android.support:wearable:+
- https://github.com/Mariuxtheone/Teleport
-
- Apps Available in the Play Store
- Applications are bundled as companions through Android Phone apps
Wear can I use it?
- Traveling
Wear can I use it?
- Exercising
Wear can I use it?
- Slacking
Wear can I use it?
- All about your day
Developing apps
- UI paradigms, rules, guides, etc
- Actually making apps
Developing apps
- https://developer.android.com/design/wear/index.html
Developing apps
- Notifications
- Can be sent from phone with 0 Wear code
- Can have simple response actions
- Yes
- No
- Cancel
- Voice
- Have to be careful not to annoy users.
Developing apps
- Don't annoy your users
- Information should be glanceable and RELEVANT
- Notifications shouldn't have deep hierarchies
- Notifications shouldn't have a lot of options
- Group notifications if you send extras
- Use whitespace effectively
Developing apps
- Custom Views
- BoxInsetLayout
- Great for displaying content correctly despite screen shape
- WatchViewStub
- View class with helper methods for handling round vs rectangular screens
- WearableListView
- ListView which does a few extra UI tricks to make them more suited for wearables
- BoxInsetLayout
Developing apps
- Custom Views
- GridViewPager
- GridPagerAdapter
- FragmentGridPagerAdapter
- Lets you layout app in a grid
- Basically the default way Wear apps "work"
Developing apps
- Tools
- Android Studio
- Gradle
- Physical Android device
- The Internet claims an emulator can be made to work. Google does not.
- Wear device OR Wear emulator
Developing apps
- Notification app
compile "com.android.support:support-v4:20.0.+"
- Wearable app
wearApp project(':wear')
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services-wearable:6.5.87'
Demo Source
- Chuck Norris facts
- https://github.com/secondsun/aerogear-android-cookbook/tree/wearnorris/ChuckNorrisJokes
- This demo is an example of use the Message API to command the phone to fetch a remote resource and deliver it to the Wear device
-
Free OTP
-
This demo is an example of using the data sync api to keep track of OTP tokens between the Wear and the phone
Introduction to Android Wear
By secondsun
Introduction to Android Wear
- 2,451