Details presented tonight are likely to change after Google I/O.
- New API to support wearable devices (currently only watches) coming to market soon.
- Lots of wearable attention at Google I/O
- Incredibly easy to make your apps work well on Android Wear devices
- These are coming soon and is not an exhaustive list
- Moto 360: moto360.motorola.com/
- LG G Watch: www.lg.com/global/gwatch/main.html#movie
- This is rumored to be given away to Google I/O attendees
- Have a physical Android device running 4.3 or later
- Sign up at developer.android.com/wear
- Within 24 hours (usually within 1-2 hours) you will receive a confirmation e-mail (http://cl.ly/image/3B0J1K0k1q0H) with two important things
- Link to download samples, preview, libraries, etc.
- Link to be a beta tester for the Wear Preview app
- Within 24 hours (usually within 1-2 hours) you will receive a confirmation e-mail (http://cl.ly/image/3B0J1K0k1q0H) with two important things
- Install required packages through the Android SDK Manager (http://cl.ly/image/2X0S2y223b32, http://cl.ly/image/2D443W443N2U)
- The Android Wear SDK through the Android SDK Manager
- The latest version of these packages installed in the Android SDK Manager
- Android SDK Tools
- Android Support Library
- Android Support Repository
- Setup an Android Wear emulator (http://cl.ly/image/3I1k0Q3b2z09)
- Under the Device drop down pick "Android Wear Round" or "Android Wear Square"
- Under the Target drop down pick "Android 4.4.2 - API Level 19"
- CPU/ABI drop down should default to "Android Wear ARM (armeabi-v7a) (Sorry...no HAXM support at this time)
- Under the Skin option pick "Android Wear Round" or "Android Wear Square" (should match what you picked for a device"
- Turn on the Snapshot checkbox
- Save and launch the emulator
- Pair the emulator to your device
- Ensure USB debugging on your device is turned on
- Ensure that the the only emulator running is the Wear emulator and the only device plugged in is the device you will use for pairing
- Open the "Android Wear Preview" app
- If this is your first time, tap the blue box at the top to open up "Notifications Access".
- Check the "Android Wear Preview" checkbox, confirm the prompt, hit back.
- Do some ADB port forwarding magic from the command line using:
adb -d forward tcp:5601 tcp:5601
- (FWIW,
adb -d forward <local> <remote>
translates to forward all local device ADB traffic (emulator) to the USB connected (-d) remote device).
- Return to the preview app and your device should now be connected to the Wear emulator (which is now much more interesting!)
- Current Wear SDK capabilities are still evolving. Keep up with the latest and greatest at developer.android.com/wear/index.html
- You should also NOT ship applications based on the Developer Preview SDK because your app will break when the official SDK is released.
- Extend your app's notifications to Android Wear
- Add extra pages specific to Wear
- Add voice reply actions (emulator still requires you to type input...)
- Stackable notifications
- This is not a limited set of current features: think about what notifications you can trigger today (geofences, activity detection, etc) and imagine those on Wear.
- Custom UI
- Sending data back to the paired device
- Sensors
- Voice actions
- See: http://developer.android.com/wear/notifications/creating.html
- First: Make sure we have all the right imports:
import android.preview.support.wearable.notifications.*;
import android.preview.support.v4.app.NotificationManagerCompat;
import android.support.v4.app.NotificationCompat;
- Also make sure we do not have references to the non-compat version of the
Notification
classes. - Extend an app's current notification with notification pages
- Extend an app's current notification with stackable notifications
- Teaser video: www.youtube.com/watch?v=QrqZl2QIz0c (start with this?)
- Developer site: developer.android.com/wear
- Wear DevBytes YouTube channel: www.youtube.com/playlist?list=PLWz5rJ2EKKc-kIrPiq098QH9dOle-fLef
- G+ Android Wear Developers Community: plus.google.com/communities/113381227473021565406
- Device mirroring: java -jar asm.jar