diff --git a/docs/html/reference/android/preview/support/v4/app/NotificationManagerCompat.html b/docs/html/reference/android/preview/support/v4/app/NotificationManagerCompat.html
index 94b5977257540..6375d9a6f238a 100644
--- a/docs/html/reference/android/preview/support/v4/app/NotificationManagerCompat.html
+++ b/docs/html/reference/android/preview/support/v4/app/NotificationManagerCompat.html
@@ -1030,7 +1030,17 @@ From class
-
Cancel a previously shown notification.
+
Cancel a previously shown notification.
+
+
Parameters
+
+
+ | id
+ | the ID of the notification
+ |
+
+
+
@@ -1059,7 +1069,21 @@ From class
-
Cancel a previously shown notification.
+
Cancel a previously shown notification.
+
+
Parameters
+
+
+ | tag
+ | the string identifier of the notification. |
+
+
+ | id
+ | the ID of the notification
+ |
+
+
+
@@ -1177,7 +1201,21 @@ From class
-
Post a notification to be shown in the status bar, stream, etc.
+
Post a notification to be shown in the status bar, stream, etc.
+
+
Parameters
+
+
+ | id
+ | the ID of the notification |
+
+
+ | notification
+ | the notification to post to the system
+ |
+
+
+
@@ -1206,7 +1244,25 @@ From class
-
Post a notification to be shown in the status bar, stream, etc.
+
Post a notification to be shown in the status bar, stream, etc.
+
+
Parameters
+
+
+ | tag
+ | the string identifier for a notification. Can be null. |
+
+
+ | id
+ | the ID of the notification. The pair (tag, id) must be unique within your app. |
+
+
+ | notification
+ | the notification to post to the system
+ |
+
+
+
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html b/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html
index 307fc2a8b670e..6fbf8b65d7b84 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.Builder.html
@@ -886,11 +886,14 @@ From class
| returnKey
- | the extras key to be set with input collected from the user
- when the intent is sent.
- |
+ the intent extras key that refers to the input collected from the user |
+
+
+
Returns
+
- this object for method chaining
+
@@ -966,10 +969,24 @@ From class
-
Specifies whether the user can provide arbitrary values. The
- default is true. If this is set to false, a
- non-null non-empty value should be passed to setChoices(String[]).
-
+
Specifies whether the user can provide arbitrary values.
+
+
+
Returns
+
- this object for method chaining
+
+
@@ -998,8 +1015,23 @@ From class
-
Specifies choices available to the user to satisfy this input.
-
+
Specifies choices available to the user to satisfy this input.
+
+
Parameters
+
+
+ | choices
+ | an array of pre-defined choices for users input.
+ You must provide a non-null and non-empty array if
+ you set allowFreeFormInput to false. |
+
+
+
+
+
Returns
+
- this object for method chaining
+
+
@@ -1028,8 +1060,21 @@ From class
-
Set a label to be displayed to the user when collecting this input.
-
+
Set a label to be displayed to the user when collecting this input.
+
+
Parameters
+
+
+ | label
+ | The label to show to users when they input a response. |
+
+
+
+
+
Returns
+
- this object for method chaining
+
+
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.html b/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.html
index e8aa65188f870..0e1cebe34501b 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/RemoteInput.html
@@ -467,22 +467,27 @@ Summary:
Class Overview
-A RemoteInput specifies a response to be collected from the user as part of an intent being
- sent. For example, when used with a notification Action, a response may be collected
- when the user triggers the action, and the results sent as data along with the action's
- PendingIntent. The result value is set in the extras of the triggered Intent with the key
- returnKey.
+
A RemoteInput object collects a response from users and sets the
+ response as an intent extra inside the PendingIntent that is sent.
+ Always use RemoteInput.Builder to create instances of this class.
+
See
+ Receiving Voice Input from
+ a Notification for more information on how to use this class.
-
Use the builder class RemoteInput.Builder to create this object.
-
-
Example which adds a RemoteInput to an Action:
+
The following example adds a RemoteInput to a WearableNotifications.Action,
+ sets the intent extra key as quick_reply, and sets the label as Quick Reply.
+ Users are prompted to input a response when they trigger the action. The results are sent as an
+ intent extra with the key of returnKey in the action's
+ PendingIntent.
+ public static final String EXTRA_QUICK_REPLY_TEXT = "quick_reply";
WearableNotifications.Action action = new WearableNotifications.Action.Builder(
R.drawable.reply, "Reply", actionIntent)
- .addRemoteInput(new RemoteInput.Builder(EXTRA_QUICK_REPLY_TEXT)
- .setLabel("Quick reply").build())
+ .addRemoteInput(new RemoteInput.Builder(EXTRA_QUICK_REPLY_TEXT)
+ .setLabel("Quick reply").build())
.build();
+
@@ -619,8 +624,8 @@ android.os.Parcelable
final
boolean
allowFreeFormInput |
- Indicates whether or not the user may provide an arbitrary value for
- this input. |
+ Indicates whether or not users can provide an arbitrary value for
+ input. |
@@ -631,7 +636,7 @@ android.os.Parcelable
final
String[]
choices |
- The choices available to the user. |
+ Possible input choices. |
@@ -642,7 +647,7 @@ android.os.Parcelable
final
String
label |
- The label to be displayed to the user when collecting this input. |
+ The label to display to users when collecting this input. |
@@ -653,8 +658,7 @@ android.os.Parcelable
final
String
returnKey |
- The extras key to be populated with input from the user when the
- intent is sent. |
+ The lookup key for the intent extra that the response is set in. |
@@ -1062,10 +1066,10 @@ From interface
-
Indicates whether or not the user may provide an arbitrary value for
- this input. If set to false, then the user should select one of the
- provided choices. It is an error to set this to false and
- not provide choices.
+
Indicates whether or not users can provide an arbitrary value for
+ input. If you set this to false, users must select one of the
+ provided choices. An IllegalArgumentException is thrown
+ if you set this to false and choices is null or empty.
@@ -1094,8 +1098,8 @@ From interface
-
The choices available to the user. May be null if there are no choices
- to present to the user.
+
Possible input choices. This can be null
+ if there are no choices to present.
@@ -1124,7 +1128,7 @@ From interface
-
The label to be displayed to the user when collecting this input.
+
The label to display to users when collecting this input.
@@ -1153,8 +1157,8 @@ From interface
-
The extras key to be populated with input from the user when the
- intent is sent.
+
The lookup key for the intent extra that the response is set in. This is populated
+ when the PendingIntent is sent.
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html
index 884de4a26dffa..f27d406854a14 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.Builder.html
@@ -448,15 +448,6 @@ Summary:
Class Overview
Builder class for WearableNotifications.Action objects.
-
-
Example:
-
-
- WearableNotifications.Builder builder = new WearableNotifications.Builder(mContext)
- .addAction(new WearableNotifications.Action.Builder(
- R.drawable.navigate, "Navigate", pendingIntent)
- .build());
- Notification notif = builder.build();
@@ -525,7 +516,7 @@ Summary:
WearableNotifications.Action.Builder(int icon, CharSequence title, PendingIntent intent)
-
+
|
@@ -872,8 +863,25 @@ From class
-
+
+
+
Parameters
+
+
+ | icon
+ | icon to show for this action |
+
+
+ | title
+ | the title of the action |
+
+
+ | intent
+ | the PendingIntent to fire when users trigger this action
+ |
+
+
+
@@ -918,9 +926,22 @@ From class
Add an input to be collected from the user when this action is sent.
- Response values are sent as extras to this Action's pending intent when
- sent.
-
+ Response values are sent as extras to this action's pending intent when
+ sent.
+
+
Parameters
+
+
+ | remoteInput
+ | a RemoteInput to add to the action |
+
+
+
+
+
Returns
+
- this object for method chaining
+
+
@@ -950,8 +971,12 @@ From class
+
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html
index e073881bf3dfd..ff9c90494dcb2 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Action.html
@@ -474,14 +474,11 @@ Summary:
Class Overview
-Subclass of NotificationCompat.Action which adds support for additional
- wearable extensions.
-
-
To create a new Action, use the WearableNotifications.Action.Builder class and then call
+
Subclass of NotificationCompat.Action that adds additional
+ wearable extensions for actions.
+
Always use the WearableNotifications.Action.Builder to build instances of this class and call
addAction(WearableNotifications.Action) to add the action to a notification.
-
Example:
-
WearableNotifications.Builder builder = new WearableNotifications.Builder(mContext)
.addAction(new WearableNotifications.Action.Builder(
@@ -991,8 +988,12 @@ From class
-
Get a list of inputs to be collected from the user when this action is sent.
-
+
Get a list of inputs to be collected from the user when this action is sent.
+
+
Returns
+
- the array of
RemoteInput objects associated with this action
+
+
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html
index 25e4520e02c68..d6ec260422f82 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.Builder.html
@@ -447,29 +447,11 @@ Summary:
Class Overview
-Builder object that wraps a NotificationCompat.Builder to provide
- methods for adding wearable extensions to a notification.
+
Builder class that wraps a NotificationCompat.Builder to add
+ wearable extensions for a notification.
-
Methods on the wrapped NotificationCompat.Builder and this object
- can be called in any order, but the final Notification must be built with
- the build() method of this class.
-
-
Note: Notifications created using this builder should be posted to the notification
- system using the NotificationManagerCompat.notify(...) methods instead of
- NotificationManager.notify(...).
-
-
Example:
-
-
- NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
- .setContentTitle("New mail from " + sender.toString())
- .setContentText(subject)
- .setSmallIcon(R.drawable.new_mail);
- Notification notif = new WearableNotifications.Builder(builder)
- .setLocalOnly(true)
- .setMinPriority()
- .build();
- NotificationManagerCompat.from(mContext).notify(0, notif);
+ You can chain the "set" methods for this builder in any order,
+ but you must call the build() method last to build the final notification.
@@ -662,7 +644,7 @@ Summary:
+ Notification object.
@@ -826,7 +808,7 @@ Summary:
setMinPriority()
Set the priority of this notification to be minimum priority level
- (
PRIORITY_MIN).
+ (PRIORITY_MIN).
@@ -1105,14 +1087,12 @@ From class
Construct a builder to be used for adding wearable extensions to notifications. Both the
- wrapped builder (accessible via getCompatBuilder() and this builder can be used
+ wrapped builder (accessible via getCompatBuilder()) and this builder can be used
simultaneously, but the build() method from this object must be called in the end.
-
Note: Notifications created using this builder should be posted to the notification
- system using the NotificationManagerCompat.notify(...) methods instead of
- NotificationManager.notify(...).
-
-
Example:
+
Always post notifications to the notification
+ system with the NotificationManagerCompat.notify(...) methods
+ instead of the NotificationManager.notify(...) methods.
WearableNotifications.Builder builder = new WearableNotifications.Builder(mContext)
@@ -1156,12 +1136,9 @@ From class
a NotificationCompat.Builder. Both the wrapped builder and this
builder can be used simultaneously, but the build() method from this object must be
called in the end.
-
- Note: Notifications created using this builder should be posted to the notification
- system using the NotificationManagerCompat.notify(...) methods instead of
- NotificationManager.notify(...).
-
-
Example:
+
Always post notifications to the notification
+ system with the NotificationManagerCompat.notify(...) methods
+ instead of the NotificationManager.notify(...) methods.
NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
@@ -1220,6 +1197,19 @@ From class
the system as a button adjacent to the notification content. This method
accepts WearableNotifications.Action extension wrappers. Actions added by this function
are appended when build() is called.
+
+
Parameters
+
+
+ | action
+ | the action to add to this notification |
+
+
+
+
+
Returns
+
- this object for method chaining
+
See Also
WearableNotifications.Action
@@ -1257,6 +1247,19 @@ From class
notification forms the first page, and pages added using this function form
subsequent pages. This field can be used to separate a notification into multiple
sections.
+
+
Parameters
+
+
+ | page
+ | the notification to add as another page |
+
+
+
+
+
Returns
+
- this object for method chaining
+
See Also
getPages(Notification)
@@ -1294,6 +1297,19 @@ From class
notification forms the first page, and pages added using this function form
subsequent pages. This field can be used to separate a notification into multiple
sections.
+
+
Parameters
+
+
+ | pages
+ | a collection of notifications |
+
+
+
+
+
Returns
+
- this object for method chaining
+
@@ -1360,8 +1389,12 @@ From class
+ Notification object.
+
@@ -1390,8 +1423,12 @@ From class
@@ -1423,8 +1460,12 @@ From class
Get the current metadata Bundle used by this Builder, creating a new one
as necessary.
-
The returned Bundle is shared with this Builder.
-
+ The returned Bundle is shared with this Builder.
+
@@ -1460,14 +1501,18 @@ From class
| icon
- | Icon to display for the content action. |
+ icon to display for the content action. |
| subtext
- | Optional subtext to display with the big action icon.
- |
+ Optional subtext to display with the big action icon. |
+
+
+
Returns
+
- this object for method chaining
+
@@ -1504,10 +1549,14 @@ From class
| icon
- | Icon to display for the content action.
- |
+ icon to display for the content action. |
+
+
+
Returns
+
- this object for method chaining
+
@@ -1551,10 +1600,14 @@ From class
groupOrder
| The 0-indexed sort order within the group. Can also be set
to the sentinel value GROUP_ORDER_SUMMARY to mark this
- notification as being the group summary.
- |
+ notification as being the group summary.
+
+
+
Returns
+
- this object for method chaining
+
@@ -1592,10 +1645,14 @@ From class
| groupKey
- | The group key of the group. Unique within a package.
- |
+ The group key of the group. Unique within a package. |
+
+
+
Returns
+
- this object for method chaining
+
@@ -1625,8 +1682,21 @@ From class
-
Set a hint that this notification's icon should not be displayed.
-
+
Set a hint that this notification's icon should not be displayed.
+
+
Parameters
+
+
+ | hintHideIcon
+ | true to hide the icon, false otherwise. |
+
+
+
+
+
Returns
+
- this object for method chaining
+
+
@@ -1659,6 +1729,20 @@ From class
Some notifications can be bridged to other devices for remote display.
This hint can be set to recommend this notification not be bridged.
+
+
Parameters
+
+
+ | localOnly
+ | true to keep the notification on this device,
+ false otherwise. Default value is false. |
+
+
+
+
+
Returns
+
- this object for method chaining
+
diff --git a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.html b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.html
index 45b77c671631e..e03e16eedd0ba 100644
--- a/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.html
+++ b/docs/html/reference/android/preview/support/wearable/notifications/WearableNotifications.html
@@ -450,15 +450,39 @@ Summary:
Class Overview
-Helper providing extensions to android notifications for use with wearable devices.
+
Helper class that contains wearable extensions for notifications.
+ Always use the WearableNotifications.Builder to create instances of this class.
+
See
+ Creating Notifications
+ for Android Wear for more information on how to use this class.
+
+ To create a notification with wearable extensions:
+
+ - Create a
NotificationCompat.Builder, setting any desired
+ properties.
+ - Create a
WearableNotifications.Builder, passing in the
+ NotificationCompat.Builder as a starting point.
+ - Set wearable-specific properties using the
+
add and set methods of WearableNotifications.Builder.
+ - Call
build() to create the notification.
+ - Post the notification to the notification
+ system with the
NotificationManagerCompat.notify(...) methods
+ and not the NotificationManager.notify(...) methods.
+
- To build notifications with wearable extensions, use the WearableNotifications.Builder class.
- Notifications created using Builder should be posted to the notification system
- using the NotificationManagerCompat.notify(...) methods instead of
- NotificationManager.notify(...).
-
-
Once a notification is built, a variety of methods are provide in this utility to access
- the value of various notification fields in a backwards compatible manner.
+
+ NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext)
+ .setContentTitle("New mail from " + sender.toString())
+ .setContentText(subject)
+ .setSmallIcon(R.drawable.new_mail);
+ Notification notif = new WearableNotifications.Builder(builder)
+ .setLocalOnly(true)
+ .setMinPriority()
+ .build();
+ NotificationManagerCompat.from(mContext).notify(0, notif);
+ When you receive a notification object from the builder, the methods in
+ this class let you access the values of various notification fields in
+ a backward-compatible manner.
@@ -502,8 +526,8 @@ Summary:
class
WearableNotifications.Action |
- Subclass of NotificationCompat.Action which adds support for additional
- wearable extensions. |
+ Subclass of NotificationCompat.Action that adds additional
+ wearable extensions for actions. |
@@ -515,8 +539,8 @@ Summary:
class
WearableNotifications.Builder |
- Builder object that wraps a NotificationCompat.Builder to provide
- methods for adding wearable extensions to a notification. |
+ Builder class that wraps a NotificationCompat.Builder to add
+ wearable extensions for a notification. |
@@ -548,8 +572,9 @@ Summary:
| int |
GROUP_ORDER_SUMMARY |
- Sentinel value provided to the groupOrder parameter setGroup(Notification, String) to indicate that
- this member of a notification group is the summary of the group. |
+ Sentinel value provided to the groupOrder parameter of the
+ setGroup(android.app.Notification, java.lang.String, int)
+ method. |
@@ -589,8 +614,8 @@ Summary:
getAction(Notification notif, int actionIndex)
-
+
|
@@ -662,7 +687,7 @@ Summary:
getContentIntentRemoteInputs(Notification notif)
- Gets the RemoteInputs associated with the content intent.
+ Gets the RemoteInput objects associated with the content intent.
|
@@ -680,8 +705,8 @@ Summary:
getExtras(Notification notif)
- Gets the extras field from a notification in a backwards
- compatible manner.
+ Gets the extras field from a notification in a backward-compatible
+ manner.
|
@@ -919,7 +944,7 @@ Summary:
setMinPriority(Notification notif)
Set the priority of this notification to be minimum priority level
- (
PRIORITY_MIN).
+ (PRIORITY_MIN).
@@ -1246,8 +1271,10 @@ From class
-
Sentinel value provided to the groupOrder parameter setGroup(Notification, String) to indicate that
- this member of a notification group is the summary of the group.
+
@@ -1309,9 +1336,22 @@ From class
-
+
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+ | actionIndex
+ | the index of the desired action
+ |
+
+
+
@@ -1341,6 +1381,20 @@ From class
Get the number of actions present on this notification.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+
+
+
Returns
+
- the number of actions for this notification
+
+
@@ -1506,8 +1612,17 @@ From class
Get the key used to group this notification into a cluster or stack
- with other notifications. This key is unique within a package.
-
+ with other notifications. This key is unique within a package.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect
+ |
+
+
+
@@ -1539,8 +1654,21 @@ From class
Get the sort order of this notification within a group of notifications
with the same group key set. Group orders are 0-indexed integers that are used
to sort notifications in ascending order. Can also be the sentinel value
- GROUP_ORDER_SUMMARY if this is the summary notification for a group.
-
+ GROUP_ORDER_SUMMARY if this is the summary notification for a group.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+
+
+
Returns
+
- the sort order of this notification within this group
+
+
@@ -1569,8 +1697,22 @@ From class
-
Get a hint that this notification's icon should not be displayed.
-
+
Get a hint that this notification's icon should not be displayed.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+
+
+
Returns
+
true if this icon should not be displayed, false otherwise.
+ The default value is false if this was never set.
+
+
@@ -1602,8 +1744,22 @@ From class
Get whether or not this notification is only relevant to the current device.
Some notifications can be bridged to other devices for remote display.
- If this hint is set, it is recommended that this notification not be bridged.
-
+ If this hint is set, it is recommended that this notification not be bridged.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+
+
+
Returns
+
true if this notification is local only, false otherwise.
+ Default value is false if not set.
+
+
@@ -1635,8 +1791,21 @@ From class
Get the array of additional pages of content for displaying this notification. The
current notification forms the first page, and elements within this array form
subsequent pages. This field can be used to separate a notification into multiple
- sections.
-
+ sections.
+
+
Parameters
+
+
+ | notif
+ | the notification to inspect |
+
+
+
+
+
Returns
+
- the pages for this notification
+
+
@@ -1670,9 +1839,13 @@ From class
Parameters
+
+ | notif
+ | the notification to modify |
+
| icon
- | Icon to display for the content action.
+ | icon to display for the content action.
|
@@ -1710,9 +1883,13 @@ From class
Parameters
+
+ | notif
+ | the notification to modify |
+
| icon
- | Icon to display for the content action. |
+ icon to display for the content action. |
subtext
@@ -1751,8 +1928,21 @@ From class
+ an WearableNotifications.Action.
+
+ Parameters
+
+
+ | notif
+ | the notification to modify |
+
+
+ | inputs
+ | array of RemoteInput objects desired from the user.
+ |
+
+
+
@@ -1787,6 +1977,10 @@ From class
Parameters
+
+ | notif
+ | the notification to modify |
+
| groupKey
| The group key of the group. Unique within a package.
@@ -1828,6 +2022,10 @@ From class
Parameters
+
+ | notif
+ | the notification to modify |
+
| groupKey
| The group key of the group. Unique within a package. |
@@ -1869,8 +2067,21 @@ From class
- Set a hint that this notification's icon should not be displayed.
-
+ Set a hint that this notification's icon should not be displayed.
+
+ Parameters
+
+
+ | notif
+ | the notification to modify |
+
+
+ | hintHideIcon
+ | true to hide this icon, false otherwise.
+ |
+
+
+
@@ -1902,8 +2113,22 @@ From class
Set whether or not this notification is only relevant to the current device.
Some notifications can be bridged to other devices for remote display.
- This hint can be set to recommend this notification not be bridged.
-
+ This hint can be set to recommend this notification not be bridged.
+
+ Parameters
+
+
+ | notif
+ | the notification to modify |
+
+
+ | localOnly
+ | set to true to keep the notification on this device only,
+ false otherwise.
+ |
+
+
+
@@ -1933,10 +2158,19 @@ From class
Set the priority of this notification to be minimum priority level
- (PRIORITY_MIN). When set via WearableNotifications, these
+ (PRIORITY_MIN). When set via WearableNotifications, these
minimum priority notifications will bypass the notification manager on platforms
- that do not support ambient level notifications.
-
+ that do not support ambient level notifications.
+
+ Parameters
+
+
+ | notif
+ | the notification to modify
+ |
+
+
+
@@ -1968,8 +2202,22 @@ From class
Set additional pages of content to display with this notification. The current
notification forms the first page, and pages set using this function form
subsequent pages. This field can be used to separate a notification into multiple
- sections.
-
+ sections.
+
+ Parameters
+
+
+ | notif
+ | the notification to modify |
+
+
+ | pages
+ | the pages to add to the current notification. Replaces any
+ existing pages with this value.
+ |
+
+
+
diff --git a/docs/html/wear/css/wear.css b/docs/html/wear/css/wear.css
index 9d9d7a72ea6e5..40afeaa57d3a0 100644
--- a/docs/html/wear/css/wear.css
+++ b/docs/html/wear/css/wear.css
@@ -2,6 +2,7 @@
* UTILITIES
*/
+
.border-box {
box-sizing: border-box;
}
@@ -92,6 +93,10 @@
* LAYOUT
*/
+#body-content,
+.fullpage,
+#jd-content,
+.jd-descr,
.wear-body-content {
height: 100%;
}
@@ -134,13 +139,11 @@
}
.wear-hero-container {
- height: 800px;
- height: 100vh;
+ height: 100%;
}
.wear-hero {
- height: 100%;
- height: calc(100% - 72px);
+ height: calc(100% - 70px);
min-height: 504px;
margin-top: -4px;
padding-top: 0;
@@ -184,6 +187,7 @@
}
.wear-button {
+ white-space: nowrap;
display: inline-block;
padding: 16px 32px;
font-size: 18px;
@@ -233,6 +237,7 @@ a.wear-button:visited {
}
.wear-video-link {
+ white-space: nowrap;
display: inline-block;
padding: 16px 32px 16px 82px;
font-size: 18px;
@@ -436,7 +441,7 @@ pointer-events: all;
#icon-video-close {
background-image: url("../images/close.png");
background-position: 0 0;
-height: 48px;
-width: 48px;
+height: 36px;
+width: 36px;
display:block;
-}
\ No newline at end of file
+}
diff --git a/docs/html/wear/design/index.html b/docs/html/wear/design/index.html
index 4bbbf29fb012d..995249006117f 100644
--- a/docs/html/wear/design/index.html
+++ b/docs/html/wear/design/index.html
@@ -379,11 +379,15 @@ h3 {
}
-Android Wear devices provide just the right information at just the right time, allowing you to be connected to the virtual world and present in the real world.
+Android wearables provide just the right information at just the right time, allowing you to be connected to the virtual world and present in the real world.
-Here you’ll find some guidelines for designing great user experiences on the Android Wear platform. Designing for Android Wear is substantially different than designing for phones or tablets, so we’ll start by describing how your content can work in tandem with the overall Android Wear vision.
+Here you’ll find some guidelines for designing great user experiences on the Android Wear
+platform. Designing for Android Wear is substantially different than designing for phones or
+tablets, so we’ll start by describing how your content can work in tandem with the overall
+Android Wear vision. To better understand the user experience on Android Wear, also be sure
+to read the UI Overview.
@@ -393,7 +397,7 @@ Android Wear devices provide just the right information at just the right time,
Android Wear experiences are:
- - Contextually aware and smart. These devices bring a new level of awareness to computing. Rather than requiring attention and input from users, Android Wear devices are aware of their situation and state, and helpfully display the right information at the right time. Timely, relevant, specific.
+ - Contextually aware and smart. These devices bring a new level of awareness to computing. Rather than requiring attention and input from users, Android wearables are aware of their situation and state, and helpfully display the right information at the right time. Timely, relevant, specific.
- Glanceable. Wearable devices are used all throughout the day, even when they sit in our peripheral vision. Effective apps provide the maximum payload of information with a minimum of fuss, optimized to provide tiny snippets of relevant information throughout the day. Short, sharp, immediate.
@@ -462,7 +466,8 @@ Notifications for Android Wear.
-Your application’s launcher icon will be automatically placed on the card, identifying your notification. Do not use the notification title or background image to identify or brand your application. Instead, allow your icon to identify itself and focus on delivering a clear, succinct message in the card and image. You can choose not to display this icon.
+ Your application’s launcher icon will be automatically placed on the card, identifying your notification. Do not use the notification title or background image to identify or brand your application. Instead, allow your icon to identify itself and focus on delivering a clear, succinct message in the card and image. You can choose not to display this icon using
+ setHintHideIcon().
diff --git a/docs/html/wear/design/user-interface.html b/docs/html/wear/design/user-interface.html
index f87b9da5795e6..c23d79cf4ff1c 100644
--- a/docs/html/wear/design/user-interface.html
+++ b/docs/html/wear/design/user-interface.html
@@ -404,9 +404,9 @@ likely to be useful.
Cards in the stream are more than simple notifications. They can be swiped horizontally to
reveal additional pages. Further horizontal swiping may reveal tappable buttons, allowing the user
to take action on the notification. Cards can also be dismissed by swiping left to right, removing
-them from the stream until the next time they have useful information to display. In the emulator,
-hovering the mouse over the screen illuminates a blue bar at the top of the device
-that takes you home when clicked.
+them from the stream until the next time they have useful information to display.
+In the emulator, hovering the mouse over the top of the screen illuminates a blue bar at
+the top of the device that takes you home when clicked.
diff --git a/docs/html/wear/images/close.png b/docs/html/wear/images/close.png
index bd473d2db10bd..7e45fb71c3f81 100644
Binary files a/docs/html/wear/images/close.png and b/docs/html/wear/images/close.png differ
diff --git a/docs/html/wear/index.html b/docs/html/wear/index.html
index 5ea793b6d7789..712e1af636175 100644
--- a/docs/html/wear/index.html
+++ b/docs/html/wear/index.html
@@ -280,7 +280,17 @@ onkeyup="return search_changed(event, false, '/')" />
-
+
+
+
+
+
+
@@ -294,6 +304,7 @@ onkeyup="return search_changed(event, false, '/')" />
+
When you'd like to provide more information without requiring users
-to open your app on their phones, you can
+to open your app on their handheld device, you can
add one or more pages to the notification on Android Wear. The additional pages
appear immediately to the right of the main notification card.
For information about when to use and how to design
diff --git a/docs/html/wear/notifications/remote-input.html b/docs/html/wear/notifications/remote-input.html
index 6500233ff01b9..c8f6621f9753a 100644
--- a/docs/html/wear/notifications/remote-input.html
+++ b/docs/html/wear/notifications/remote-input.html
@@ -373,20 +373,24 @@ onkeyup="return search_changed(event, false, '/')" />
- 
+
If your notification includes an action to respond with text,
such as to reply to an email, it should normally launch an activity
- on the handheld device. However, when your notification appears on an Android Wear device, you can
+ on the handheld device. However, when your notification appears on an Android wearable, you can
allow users to dictate a reply with voice input. You can also provide pre-defined text
- replies for the user to select.
+ messages for the user to select.
When the user replies with voice or selects one of the available
-responses, the system delivers your app on the handheld the
-message as a string extra in the Intent you specified
-to be used for the action.
+messages, the system sends the message to your app on the connected handheld device.
+The message is attached as an extra in the Intent you specified
+to be used for the notification action.
+
+ Note: When developing with the Android emulator,
+you must type text replies into the voice input field, so be sure you have enabled
+Hardware keyboard present in the AVD settings.
@@ -397,10 +401,10 @@ to be used for the action.
RemoteInput.Builder APIs.
The
RemoteInput.Builder constructor takes a string that the system
- will use as a key for the Intent extra that caries the reply message
+ will use as a key for the Intent extra that carries the reply message
to your app on the handheld.
- For example, here's a new
+ For example, here's how to create a new
RemoteInput object that provides a custom
label for the voice input prompt:
@@ -422,7 +426,7 @@ RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY)
In addition to allowing voice input, you can
- provide up to five text responses the user can select for quick replies. Call
+ provide up to five text responses that the user can select for quick replies. Call
setChoices() and pass it a string array.
For example, you may define some responses in a resource array:
@@ -465,9 +469,9 @@ method), then you should attach the
// Create intent for reply action
-Intent replyIntent = new Intent(this, ReplyService.class);
+Intent replyIntent = new Intent(this, ReplyActivity.class);
PendingIntent replyPendingIntent =
- PendingIntent.getService(this, 0, replyIntent, 0);
+ PendingIntent.getActivity(this, 0, replyIntent, 0);
// Build the notification
NotificationCompat.Builder replyNotificationBuilder =
@@ -563,8 +567,8 @@ Notification replyNotification =
.build();
- Now, when the user selects "Reply" from an Android wearable,
- the system prompts for voice input (and provides the list of pre-defined replies, if provided).
+ Now, when the user selects "Reply" from an Android wearable, the system prompts the user
+ for voice input (and shows the list of pre-defined replies, if provided).
Once the user completes a response, the system invokes
the Intent attached to the action and adds the
EXTRA_VOICE_REPLY extra (the string
diff --git a/docs/html/wear/notifications/stacks.html b/docs/html/wear/notifications/stacks.html
index 5d1016552ffc9..e4f74a037b10c 100644
--- a/docs/html/wear/notifications/stacks.html
+++ b/docs/html/wear/notifications/stacks.html
@@ -376,15 +376,20 @@ onkeyup="return search_changed(event, false, '/')" />
- When your app creates more than one notification about the same type, you should traditionally
-update the existing notification with a summary of all the notifications instead of creating multiple notifications. For instance, instead
-of three notifications for each received email, you should create one with a summary such as "3 new
-messages." To view the contents of each message, the user must then touch the notification to open
-your app.
+ When creating notifications for a handheld device, you should always aggregate similar
+notifications into a single summary notification. For example, if your app creates notifications
+for received messages, you should not show more than one notification
+on a handheld device—when more than one is message is received, use a single notification
+to provide a summary such as "2 new messages."
- However, when a user is viewing your notifications on a wearable device, you can create
-a stack that collects all the notifications for immediate access without creating multiple
-cards in the card stream.
+ However, a summary notification is less useful on an Android wearable because users
+are not able to read details from each message on the wearable (they must open your app on the
+handheld to view more information). So for the wearable device, you should
+group all the notifications together in a stack. The stack of notifications appears as a single
+card, which users can expand to view the details from each notification separately. The new
+
+setGroup() method makes this possible while allowing you to still provide
+only one summary notification on the handheld device.
For details about designing notification stacks, see the
Design Principles of Android
@@ -420,12 +425,10 @@ href="/reference/android/preview/support/wearable/notifications/WearableNotifica
Add a Summary Notification
-It's important that you still provide a summary notification for handheld devices. So in
-addition to adding each unique notification to the same stack group, also add the summary
-notification but set its order position to be GROUP_ORDER_SUMMARY.
-The notification in this position does not appear in the stack on the wearable but
-appears as the only notification on the handheld.
+It's important that you still provide a summary notification that appears on handheld devices.
+So in addition to adding each unique notification to the same stack group, also add a summary
+notification, but set its order position to be GROUP_ORDER_SUMMARY.
Notification summaryNotification = new WearableNotifications.Builder(builder)
@@ -433,6 +436,8 @@ Notification summaryNotification = new WearableNotifications.Builder(builder)
.build();
+This notification will not appear in your stack of notifications on the wearable, but
+appears as the only notification on the handheld device.
| |