Save 37% off PRO during our Black Friday Sale! »

Android notifications - What's new in Android Lollipop

Android notifications - What's new in Android Lollipop

Talk given in this form at the Google devfest of the Dutch Android User Group and the Google Developers Group, Netherlands.

A slightly different version of this talk was given Oct, 26th 2014 at the devfest of the GDG, Düsseldorf.

D0ed2f28dd13ddfb192ebe198623924c?s=128

Wolfram Rittmeyer

November 08, 2014
Tweet

Transcript

  1. Android Notifications What's new in Android Lollipop?

  2. How users experience notifications

  3. Where we come from

  4. New Style

  5. New Style

  6. Where we come from

  7. New way

  8. New way Public notifications Private notifications

  9. None
  10. Heads Up Notifications • Are less intrusive than old way

    • Yet still annoying enough to not go unnoticed • For the most pressing notifications
  11. None
  12. Android Wear • Mirrors notifications of device • Well, kind

    of – it's actually more flexible than that • For stuff that is important now
  13. User is in Control • User can disable all notifications

    for specific apps • User can define periods of „Downtime“ – Only priority notifications will go through – Only users can elevate apps to priority apps • Users can opt out of Lockscreen Notifications
  14. User is in Control

  15. User is in Control • User can go there either

    from the settings • Or when long-clicking your notification:
  16. How devs create this stuff

  17. The minimum

  18. Always set the content intent • That's the intent that

    gets fired when the user clicks your Notification • Users expect notifications to be clickable • Not required, but necessary :-)
  19. Always set the content intent

  20. PendingIntents • Independent of app lifecycle • Allows other apps

    to use your permissions • Key is combined of: – Intent (without Extras!) – Requestcode • Use correct flags – Most often FLAG_UPDATE_CURRENT
  21. More actions possible

  22. Updating notifications • Android updates when ID is the same

    • Important for – Actions – Persistent notifications • To avoid flicker: builder.setWhen(naturalTimestamp) • Consider adding this line: builder.setOnlyAlertOnce(true);
  23. Priority • HIGH or MAX -> Heads up notification •

    MIN -> no small icon will be displayed – Don't use sound, light or vibration! • LOW -> small icon will be displayed – Don't use sound, light or vibration! • DEFAULT – Documentation recommends to use light and sound • Ranking in Lollipop more complex than before
  24. Big Styles • BigPictureStyle • BigTextStyle • InboxStyle – Doesn't

    work great on Wear – Use stacked notifications on Wear instead • MediaStyle – New in Lollipop
  25. Big Styles

  26. Visibility • Important for lockscreen notifications – VISIBILITY_PUBLIC • Android

    displays everything – VISIBILITY_PRIVATE • Is the default level • Android displays the icon and the ticker text – VISIBILITY_SECRET • Android shows nothing on the lockscreen • builder.setVisibility(VISIBILITY_PUBLIC) • Consider setPublicVersion()
  27. Visibility

  28. Link to the Settings Activity

  29. How to not spoil the user experience

  30. PITA • Always consider the „Pain in the A**“ level

    • Notifications are attracting the user's attention • Thus they are always distracting • MIN do not show an icon – The only one without any PITA attached – Use them whenever possible and appropriate Her
  31. Ticker text • Is very distracting • Only use it

    if the user cares about it now – The user's favorite club scored: Yes – Some other club scored: No
  32. LED colors • Just leave them white • The user

    doesn't know your color anyway • If at all, let the user select a color
  33. Icon colors • Leave them white! • I mean it:

    Leave them white!
  34. Icon colors • Leave them white! • I mean it:

    Leave them white! • This is a horrible mess:
  35. User notifications • For cloud based notifications: Use user notifications

    • See once, delete everywhere!
  36. Priority • Do not use a higher priority to improve

    ranking • Consider the importance for the user only
  37. Give the user control • Provide settings for notifications •

    Let them disable them completely • Let them control the PITA level – Color, sound, vibration, priority, frequency
  38. Make them a benefit „Notifications embody your app's voice, and

    contribute to your app's personality“ https://developer.android.com/design/patterns/notifications.html
  39. None