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

Turbo Charging Your Android Notifications

Juan Gomez
February 04, 2015

Turbo Charging Your Android Notifications

Android notifications are a great way to keep your users engaged with your app. And now with Android 5.0 (Lollipop) notifications are front and center on the Android platform, which means it’s even more important for you as a developer to learn how to take advantage of this very powerful Android feature.

In this class, we will take a technical deep dive into Android notifications. You will learn how to add notifications to your app, how to customize notifications to better display the information you need to present and how to take advantage of advanced features like inbox style notifications, custom layouts and custom actions. We will also explore other important aspects of Android notifications, like compatibility with previous version of Android and the possibility to extend your app’s notifications into Android Wear devices.

Juan Gomez

February 04, 2015
Tweet

More Decks by Juan Gomez

Other Decks in Technology

Transcript

  1. Intro Who am I? • Mobile Engineer at Eventbrite •

    Previously at OneLouder Apps • Android & Python Developer
  2. On the lock screen • Because notifications are visible on

    the lock screen, user privacy is an especially important consideration. • Notifications often contain sensitive information, and should not necessarily be visible to anyone who picks up the device and turns on the display. • For devices that have a secure lock screen (PIN, pattern, or password), the interface has public and private parts. • The public interface can be displayed on a secure lock screen and therefore seen by anyone. The private
  3. Lockscreen Visibility • Call Notification.Builder.setVisibility(…) • VISIBILITY_PUBLIC: Shows the notification's

    full content. • VISIBILITY_PRIVATE: shows basic information about the existence of this notification • VISIBILITY_SECRET: Shows only the most minimal information, excluding even the notification's icon.
  4. Notifications on Android Wear • Notifications and their actions are

    bridged over to Wear devices by default. • You can control which notifications bridge from the phone to the watch, and vice-versa. • If your app includes actions that can't be accomplished with a single tap, either hide these actions on your Wear notification or consider hooking them up to a Wear app, thus allowing the user to finish the action on their watch.
  5. Summary • Adding notifications to your Android app is easy.

    • Take advantage of different notification styles that allow you to display more relevant information at a glance. • Extend your notifications into Android Wear and keep your users engaged by displaying information on their Smartwatch.