51
Android Wear introduction, concepts and case-study

Break Timer: Android-wear introduction and application case-study

Embed Size (px)

DESCRIPTION

Break Timer: An android-wear application that sits silently on your wrist and remind you to take a break if you keep typing for long duration (Facebook counts!). Help you avoid RSI problem.

Citation preview

Page 1: Break Timer: Android-wear introduction and application case-study

Android Wearintroduction, concepts and case-study

Page 2: Break Timer: Android-wear introduction and application case-study

Agenda • Android Wear Introduction

• Capabilities and User Interface

• How to create Android Wear UX

• Development case study

• Make your application android-wear ready

• Potential Use Cases

Page 3: Break Timer: Android-wear introduction and application case-study

Android Wear Concept

• Android extension for wearables

• Automatic, specific, glanceable information, with zero or low interaction!

• Showing users information and functionality just when they need it

Page 4: Break Timer: Android-wear introduction and application case-study

Android Wear Basics• Require android >= 4.3 on phone (or tablet)

• Require android-wear companion app on phone

• Phone and wearable communicate with each other via bluetooth.

• Wearable uses handheld device internet connection and GPS.

• Currently available sensors on wearables are Compass, Accelerometer, Gyroscope, Heart Rate Sensor (Samsung only)

Page 5: Break Timer: Android-wear introduction and application case-study

Android Wear Capabilities

• Generate notifications from phone and react them on wearables.

• Embed voice capabilities for getting user input.

• Create standalone apps for wearable (like compass, steps counter etc)

• Almost whole android sdk is available for development!

Page 6: Break Timer: Android-wear introduction and application case-study

Android Wear UX

Page 7: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

Page 8: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

• Glanceable

• Can user see it in split second?

Page 9: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

• Big Gestures

• Use it without focusing on watch!

Page 10: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

• Launched Automatically

• Right information at right time

Page 11: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

• Do one thing, do it fast

• Show absolute minimum, actionable information

Page 12: Break Timer: Android-wear introduction and application case-study

Android Wear UX Considerations

• Is it time to disturb?

• It is on wrist, its always visible, its difficult to avoid!

• Buzz the watch fewer times that you would do on phone!

Page 13: Break Timer: Android-wear introduction and application case-study

Android UX Applied

Lets see some examples

http://time.com/2964389/android-wear-watch-review/

Page 14: Break Timer: Android-wear introduction and application case-study
Page 15: Break Timer: Android-wear introduction and application case-study
Page 16: Break Timer: Android-wear introduction and application case-study
Page 17: Break Timer: Android-wear introduction and application case-study
Page 18: Break Timer: Android-wear introduction and application case-study
Page 19: Break Timer: Android-wear introduction and application case-study

Development Case-Study

Page 20: Break Timer: Android-wear introduction and application case-study

Android Wear case study

Why we did this

• Keep ourselves updated, so we can help our clients better.

• Wearable has a lot of potential to grow.

• Android Wear is the first disciplined approach from Google to bring Android to wearables

• Explore Android Wear; discover use-cases and create a good example app that cannot be done without Watch!

Page 21: Break Timer: Android-wear introduction and application case-study

Problem: If you use computer for 3-4 hours a day and sit continuously in a similar posture, you are at risk of RSI (Repetitive Strain Injury).

What is RSI: Repetitive strain injury (RSI) is a condition where pain and other symptoms occur in an area of the body which has done repetitive tasks (often the arms or hands).

Android Wear case study

Page 22: Break Timer: Android-wear introduction and application case-study

Break Timer

How to avoid RSI: There can be several techniques, the most basic one is to take regular breaks!

The Solution: Break Timer sits silently on your wrist and remind you to take break if you have been typing for long intervals.

Uses the accelerometer available on watch to see if you are continuously typing.

Page 23: Break Timer: Android-wear introduction and application case-study

Break Timer - case study

Page 24: Break Timer: Android-wear introduction and application case-study

Break Timer - case study

Page 25: Break Timer: Android-wear introduction and application case-study

Break Timer - case study

Typing indicator

Page 26: Break Timer: Android-wear introduction and application case-study

How to make your app wear-ready

Page 27: Break Timer: Android-wear introduction and application case-study

How to make your app wear-ready

• Integration Method

• Potential issues during development

• Coding Tips

Page 28: Break Timer: Android-wear introduction and application case-study

Enhanced Notifications• Single Notification

• Can have multiple actions

• Appears by default, with only action “Open on phone”.

Page 29: Break Timer: Android-wear introduction and application case-study

Single Notification

NotificationCompat.Builder notificationBuilder =

new NotificationCompat.Builder(this)

.setSmallIcon(R.drawable.ic_event)

.setLargeIcon(BitmapFactory.decodeResource(

getResources(), R.drawable.notif_background))

.setContentTitle(eventTitle)

.setContentText(eventLocation)

.setContentIntent(viewPendingIntent)

.addAction(R.drawable.ic_reply,

getString(R.string.map), replyPendingIntent)

.setStyle(bigStyle);

Page 30: Break Timer: Android-wear introduction and application case-study

Enhanced Notifications• Stacking Notification

• Instead of displaying multiple notifications, stack them together in one group

Page 31: Break Timer: Android-wear introduction and application case-study

Stacking Notification

final static String GROUP_KEY_EMAILS = "group_key_emails";

!

// Build the notification, setting the group appropriately

Notification notif = new NotificationCompat.Builder(mContext)

.setContentTitle("New mail from " + sender1)

.setContentText(subject1)

.setSmallIcon(R.drawable.new_mail);

.setGroup(GROUP_KEY_EMAILS)

.build();

Page 32: Break Timer: Android-wear introduction and application case-study

Enhanced Notifications• Add Pages to Notification

• To provide more information without requiring users to open your app on their phone, you can add pages to the notification.

Page 33: Break Timer: Android-wear introduction and application case-study

Add Pages to Notification// Create builder for the main notification NotificationCompat.Builder mainPage = new NotificationCompat.Builder(this) …………

// Create a big text style for the second page BigTextStyle secondPageStyle = new NotificationCompat.BigTextStyle(); secondPageStyle.setBigContentTitle("Page 2") .bigText("A lot of text...");

// Create second page notification Notification secondPageNotification = new NotificationCompat.Builder(this) .setStyle(secondPageStyle).build();

// Add second page with wearable extender and extend the main notification Notification twoPageNotification = new WearableExtender() .addPage(secondPageNotification) .extend(notificationBuilder) .build();

// Issue the notification notificationManager.notify(notificationId, twoPageNotification);

Page 34: Break Timer: Android-wear introduction and application case-study

Enhanced Notifications

Notification mNotification = new NotificationCompat.Builder(context)

.setSmallIcon(R.drawable.appicon) ….. .setCustomSizePreset(NotificationCompat.WearableExtender.SIZE_FULL_SCREEN) .setDisplayIntent(displayPendingIntent).build()

Full Screen Notification with embedded Activity

Page 35: Break Timer: Android-wear introduction and application case-study

Enhanced Notifications

• Custom Button • Default Open Button

Page 36: Break Timer: Android-wear introduction and application case-study

Communication

private GoogleApiClient mGoogleApiClient; @Override protected void onCreate(Bundle savedInstanceState) { mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() { @Override public void onConnected(Bundle bundle) { Log.d(TAG, "Google Api Client connected"); } ! @Override public void onConnectionSuspended(int i) { } }).build(); mGoogleApiClient.connect(); }

• Sending and Syncing Data

Page 37: Break Timer: Android-wear introduction and application case-study

How to make your app wear-ready

• Integration Method

• Potential issues during development

• Coding Tips

Page 38: Break Timer: Android-wear introduction and application case-study

Potential Issues• Redundant Permissions

• Cached APK

• Problems with emulators

• No accelerometer

• Round emulator is not as good as square counter part.

Page 39: Break Timer: Android-wear introduction and application case-study

Potential Issues

• Redundant Permissions

• Include all permissions in your handheld device that you need to use in watch.

• Otherwise, it will not auto install the embedded apk

Page 40: Break Timer: Android-wear introduction and application case-study

Problems faced

• APK cache

• After lot of try and error, we found that the handheld device was somehow caching and pushing old APK to watch

Page 41: Break Timer: Android-wear introduction and application case-study

Problems faced• Round emulator is not as good as the

square counter part.

Round emulator being displayed as square

Page 42: Break Timer: Android-wear introduction and application case-study

How to make your app wear-ready

• Integration Method

• Potential issues during development

• Coding Tips

Page 43: Break Timer: Android-wear introduction and application case-study

Coding Tips

• Use common module for keeping models and constants.

Page 44: Break Timer: Android-wear introduction and application case-study

Coding Tips• Should implement some logic on both mobile

and watch to handle disconnect issues

Page 45: Break Timer: Android-wear introduction and application case-study

Coding Tips

Notification mNotification = new NotificationCompat.Builder(context)

.setSmallIcon(R.drawable.appicon) ….. .setCustomSizePreset(NotificationCompat.WearableExtender.SIZE_FULL_SCREEN) .setDisplayIntent(displayPendingIntent).build()

• Embedded Activity in notification with different sizes

Page 46: Break Timer: Android-wear introduction and application case-study

Potential Use Cases

Page 47: Break Timer: Android-wear introduction and application case-study

Potential Use CasesHealth Industry

• Wearables makes it easy to measure body movements and other aspects!

• Patient data can be embedded on wearable.

• Continuous monitoring of patient is possible including,

• Their heart-beat

• Intensity of activity

• Fall detection

Page 48: Break Timer: Android-wear introduction and application case-study

Potential Use CasesWorkspace

• Help your employees being healthy.

• Research towards working patterns.

• Other automations like attendance, secure entrance.

Page 49: Break Timer: Android-wear introduction and application case-study

Potential Use Cases

Gaming

• Use your wearable as Game controller.

• Can ask user to perform some physical activity.

Page 50: Break Timer: Android-wear introduction and application case-study

Recap• Android Wear is an android extension for wearables, maintained by Google.

• The major concept is to avoid distractions and keep the interaction with gadgets to minimum

• Android-wear is only meant to work with its companion device.

• Since wearables are attached to body, they can provide additional useful context related to user’s current physical state or health.

• Its easier to integrate Android Wear functionality in your app, though you need to think wisely.

• The additional data and positioning creates many potential use cases in several industries for example health, employment and gaming.

Page 51: Break Timer: Android-wear introduction and application case-study

Thank you

https://play.google.com/store/apps/details?id=com.media2359.breaktimer

Case Study Blog http://2359media.com/android-for-wearables-opportunities-and-limitations-of-watch-apps/