Android Wear 2.0 is a major update and contains a number of significant updates that will make it easier to build delightful experiences for wearables. In this session, I will provide an overview of new features such as Standalone apps, Material Design on Android Wear and some of the new UI components we're making available (such as Navigation Drawers and Action Drawers), as well as complications and complication data providers.
48. Choosing auth methods
Fast and easy
for user
Works with iOS Works without
phone
Available
Google Sign-in Soon
SmartLock for Passwords Soon
Token over Data Layer Now
OAuth URL Soon
Activity on watch Now
64. What’s a
complication?
In Horology, the study of
clocks and watches, a
complication refers to any
feature in a timepiece
beyond the simple display of
hours and minutes.
Source: Wikipedia
89. MyWatchFaceService.Engine
@Override
public void onCreate(SurfaceHolder holder) {
...
setActiveComplications(watchFaceComplicationId1, watchFaceComplicationId2);
}
@Override
public void onComplicationDataUpdate(
int watchFaceComplicationId, ComplicationData data) {
// do something with the data
}
90. MyWatchFaceService.Engine
@Override
public void onDraw(Canvas canvas, Rect bounds) {
...
if (complicationData.isActive(currentTimeMillis) {
// draw the complication
}
...
}
@Override
public void onTapCommand(int tapType, int x, int y, long eventTime) {
// check if a complication was tapped
}
91. The watch face must have permission to show the
provider chooser and to receive data.
But these cases don't require permission:
Safe system providers
Provider and watch face from same app
Provider whitelists watch face as safe watch face
Permissions