10
Android Wear Development Lohika Sergii Kozyrev

Lviv MD Day 2015 Сергій Козирєв "Android Wear Development"

Embed Size (px)

Citation preview

Android Wear Development

Lohika Sergii Kozyrev

Intro• Wear development environment

• Notifications

• Wear Apps

• Watchfaces

• Demo

Environment

• Enable developer mode

• Wear app goes inside apk for release (wear task)

• for debug - separate

• same version code, same permissions

Notifications

• Ready for use - standard notifications

• NotificationManagerCompat

• WearableExteneder for wear specific options

Apps

• Same well known Android

• Components should live as little as possible

• 5 sec inactivity, but not in onPause (due to incoming notification)

• Always keep in mind how small battery is

Communication

• Data items: key-value, synchronised, guaranteed

• Messages: byte array, no delivery guaranteed, fast

UI

• GridViewPager and WearableListView

• BoxInsetView (layout_box) and WatchViewStub

Ambiactive support

• wake-lock - BAD, Always on - GOOD (WearableActivity - setAmbientEnabled())

• EXTRA_BURN_IN_PROTECTION and EXTRA_LOWBIT_AMBIENT from onEnterAmbient(Bundle) bundle in WearableActivity

WatchFaces• Interactive (Full colors)

• Ambiactive (disable background, avoid solid regions, 95% should be black)

• out of box screen burning protection

• Maintain timer in interactive mode and use auto-tick once per minute in ambient

• draw it straight on canvas :)

Links• https://www.udacity.com/course/android-wear-

development--ud875A

• https://developer.android.com/wear/index.html

• https://github.com/kozyrevsergey89/dangerhelper

• https://www.facebook.com/sergii.kozyrev

[email protected]