Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Wearable Apps That People Want

Kevin Grant
November 06, 2014

Wearable Apps That People Want

We've been living with Android wear all summer and Google Glass for a few years now. In this talk we will discuss the qualities of effective wearable applications, and cover the different architectures that you can explore to implement similar strategies in your applications.

Kevin Grant

November 06, 2014
Tweet

More Decks by Kevin Grant

Other Decks in Programming

Transcript

  1. Overview » What Are Wearables? » Wearable Platform Teardowns »

    Wearable App Architectures » What Do People Want?
  2. Kevin Grant » Android Engineer at Tumblr » University of

    Nevada, Reno » Co-Author Beginning Android: Development and Design » Developed 4.2 start application on play store from scratch with > 10,000,000 downloads » Actively developing 4.4 star application, Tumblr, on Play Store with > 10,000,000 downloads
  3. Kevin Grant Wearable Enthusiast » Jawbone Wearer (even while sleeping)

    » 2nd Generation Glass Explorer » Android Wearer since Google I/O 2014 » The only person at Tumblr who still publicly wears their Wear and Glass
  4. What are wearables » Often provide a single-purpose solution »

    Overwhelming emphasis on Tracking and Quantified Self » Wearables are more than just Google Glass and Android Wear
  5. GLASS + WEAR There are many wearable categories, but the

    ones that are the most interesting are the ones we can develop for today, using our existing Android development skills.
  6. Teardown Glass » Current OS - XE 22.0 » GDK

    Based on KitKat - 4.4 - API 19 » 5 Megapixel Camera » 720p Videos » Wifi and Bluetooth » GPS » Accelerometer / Compass / Gyroscope
  7. Teardown Android Wear » OS and Wear SDK Based on

    KitKat - 4.4 - API 20 » Bluetooth 4.0 » Heart Rate Monitor (Samsung Gear / Moto 360) » Accel Compass Gyro » WiFi? (Samsung Gear, but its inactive)
  8. What does this tell us? » Wear receives all network

    and GPS data from the phone » Even images must be transferred over bluetooth » Glass manages it's own network state, either via WiFi or getting data from phone via bluetooth.
  9. cool fact Bluetooth » Bluetooth spec Created in part by

    Ericsson in Sweden » Named after former King of Denmark / Norway who had a bad tooth. » Harald "Bluetooth" Gormsson » Danish: Harald Blåtand Gormsen » The Bluetooth logo is made of the Nordic runes for his initials
  10. Android Wear Basic Notifications From Builder » Just works »

    Keeps same customizations and buttons that you're using in your apps » Adds a new style - collapsible, which you can start utilizing in your other notifications instead of rollup on your own
  11. Basic Notifications From Builder Basic Notifications int notificationId = 001;

    // Build intent for notification content Intent viewIntent = new Intent(this, ViewEventActivity.class); viewIntent.putExtra(EXTRA_EVENT_ID, eventId); PendingIntent viewPendingIntent = PendingIntent.getActivity(this, 0, viewIntent, 0); NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.ic_event) .setContentTitle(eventTitle) .setContentText(eventLocation) .setContentIntent(viewPendingIntent); // Get an instance of the NotificationManager service NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this); // Build the notification and issues it with notification manager. notificationManager.notify(notificationId, notificationBuilder.build());
  12. Basic Notifications From Builder Basic Wearable Specific Actions // Create

    a WearableExtender to add functionality for wearables NotificationCompat.WearableExtender wearableExtender = new NotificationCompat.WearableExtender() .setHintHideIcon(true) .addAction(/* some PendingIntent Action */) .setBackground(mBitmap); // Create a NotificationCompat.Builder to build a standard notification // then extend it with the WearableExtender Notification notif = new NotificationCompat.Builder(mContext) .setContentTitle("New mail from " + sender) .setContentText(subject) .setSmallIcon(R.drawable.new_mail); .extend(wearableExtender) .build();
  13. Basic Notifications From Builder Recap » Simple and familiar APIs

    » Easy to add basic wearable specific actions and logic
  14. Android Wear Customized Notification Activities » Significantly more work (need

    to manage notification syncing yourself) » Can be significantly cooler » Can use a combination of custom activitys and existing notifications
  15. Customized Notification Activities Example - Weather » Wearable Activities live

    in the Wearables project » Notifications must be built on the Watch itself » Dynamic images you want to show must be transferred from phone
  16. Example - Weather On Phone Since we can't build Activities

    on the phone, we have to tell the watch to build them using the GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) // Context .addApi(Wearable.API) .addConnectionCallbacks(this) // ConnectionCallbacks .addOnConnectionFailedListener(this) // OnConnectionFailedListener .build(); String node = // Name of the wearable to notify String path = "start_weather_notification"; // The watch receiver also listens on this path byte[] payload = weatherDataUri.toString().getBytes(); // Send message to the watch Wearable.MessageApi.sendMessage(mGoogleApiClient, node, path, payload);
  17. Example - Weather On watch // Each page is a

    separate activity Intent weatherDay = new Intent(context, WeatherDayActivity.class); weatherDay.putExtra(BasicNotificationDisplayActivity.EXTRA_TITLE, "Day Forecast"); PendingIntent weatherDayPi = PendingIntent.getActivity(context, 0, weatherDay, 0); Notification weatherDayPage = buildBasicNotification(context) .extend(new Notification.WearableExtender() .setCustomSizePreset(Notification.WearableExtender.SIZE_FULL_SCREEN) .setDisplayIntent(weatherDayPi)) .build(); // You can add as many pages as you want Intent weatherWeek = new Intent(context, WeatherWeekActivity.class); weatherDay.putExtra(BasicNotificationDisplayActivity.EXTRA_TITLE, "Week Forecast"); PendingIntent weatherWeekPi = PendingIntent.getActivity(context, 0, weatherWeek, 0); Notification weatherWeekPage = buildBasicNotification(context) .extend(new Notification.WearableExtender() .setCustomSizePreset(Notification.WearableExtender.SIZE_FULL_SCREEN) .setDisplayIntent(weatherWeekPi)) .build(); // We finally add all the pages to an actual notification return buildBasicNotification(context) .extend(new Notification.WearableExtender() .addPage(weatherDayPage) .addPage(weatherWeekPage)) .build();
  18. Advanced Notification Syncing Architecture Study these projects in the SDK

    Examples » Data Layer » Synchronized Notifications » Notifications
  19. Android Wear Full Screen UI App » Fancy way of

    saying "Just a plain ole' Activity" » Can use the GridViewPager to mimic / simulate the primary screens navigation. » Careful - Android Wear cannot directly access the internet. It must communicate via the MessageApi or DataApi.
  20. Google Glass » Mirror API (Deprecated) » Publishing Cards to

    the Stream » Immersive Mode (Full Screen Activities)
  21. Google Glass Mirror API (Deprecated) » Develop in most languages,

    enabled by calling REST APIs » Projects are setup in AppEngine and use Mirror API access » Sample projects exist in Java, PHP, and Python » Android Wear team members are not suggesting new development here
  22. Google Glass Publishing Cards to the Stream » Declare a

    Service which will post LiveCards to the stream » LiveCard takes a RemoteView as content » LiveCards are removed during reboot or when system is low on resources unless you use LiveCard.attach(). » Docs on LiveCards is quite good https://developers.google.com/glass/develop/gdk/ live-cards
  23. Google Glass Immersive Mode » Immersive mode is a fancy

    way of saying "Just a plain ole' Activity" » Build like a normal Android app, but use the GDK for voice commands or card styled UI components. » The only reliable way to keep the screen on.
  24. It's pretty different Application Architecture between Wear and Glass is

    fundamentally different, and you should approach solutions and ideas with that in mind.
  25. Why are the most best apps all from Google? »

    Google made both of these platforms. It suits their needs. » Platforms are optimized to showcase Google Now style content. » Countless lessons learned from Phone and Google Now.
  26. Do I have to be a first party app? »

    No! » Wear SDK has been out less than a year, and there are few devices. » Nobody has Glass outside of Google. » It took years for reliable services to surface in the app store. » Lots of room for immersive experiences and hands free innovation.
  27. Recap A whole world of wearable computing Wearable technology is

    more than just Android Wear, Apple Watch, and Google Glass.
  28. Recap Same problem, multiple solutions Implementing the same idea on

    multiple platforms can quickly become complicated, but it's doable.
  29. Recap In the beginning... (and the end of the presentation)

    There are some early winners in wearables, but they are mostly first party apps. It's still the early days.
  30. The challenge Wearable technology is still anyones game, and there

    is room for lots of winners. » Great wearable apps are parts of great services. » Build great services.