From c563e0b99b93644a93d51d71ec45d6ea2601080a Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Thu, 12 May 2016 18:33:25 -0700 Subject: [PATCH] docs: Continue CL of notifications updates Bug: 28520914 Change-Id: If0bbd5c503e4149fcd8f1db34fe7847a6cbefd20 --- .../preview/features/notification-updates.jd | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/html/preview/features/notification-updates.jd b/docs/html/preview/features/notification-updates.jd index b8dfbaababcaf..c40536053f766 100644 --- a/docs/html/preview/features/notification-updates.jd +++ b/docs/html/preview/features/notification-updates.jd @@ -204,6 +204,16 @@ notificationManager.notify(notificationId, repliedNotification); android.support.v4.app.RemoteInput}, you can update the reply history using the {@code setRemoteInputHistory()} method.

+ +

+ The notification must be either updated or cancelled after the app has + received remote input. When the user replies to a remote update + using Direct Reply, + do not cancel the notification. Instead, update the notification to display the user's reply. You can update the notification using a + MessagingStyle, or you can append the user's reply to the remote + input history. +

+

Bundled Notifications

Android N provides developers with a new way to represent @@ -364,7 +374,7 @@ Notification notification = new Notification.Builder() -

Message Style

+

Messaging Style

Android N introduces a new API for customizing the style of a notification. Using the MessageStyle class, you can change several of the @@ -380,10 +390,9 @@ Notification notification = new Notification.Builder()

   Notification notification = new Notification.Builder()
              .setStyle(new Notification.MessagingStyle("Me")
-             .setConversationTitle("Team lunch")
-             .addMessage("Hi", timestamp1, null) // Pass in null for user.
-             .addMessage("What's up?", timestamp2, "Coworker")
-             .addMessage("Not much", timestamp3, null)
-             .addMessage("How about lunch?", timestamp4, "Coworker")
-             .setAllow());
+                 .setConversationTitle("Team lunch")
+                 .addMessage("Hi", timestamp1, null) // Pass in null for user.
+                 .addMessage("What's up?", timestamp2, "Coworker")
+                 .addMessage("Not much", timestamp3, null)
+                 .addMessage("How about lunch?", timestamp4, "Coworker"));
 
\ No newline at end of file