Android Dev Summit, October 23-24: two days of technical content, directly from the Android team. Sign-up for livestream updates.

WearableExtender

class WearableExtender : NotificationCompat.Extender
kotlin.Any
   ↳ androidx.core.app.NotificationCompat.WearableExtender

Helper class to add wearable extensions to notifications.

See Creating Notifications for Android Wear for more information on how to use this class.

To create a notification with wearable extensions:

  1. Create a NotificationCompat.Builder, setting any desired properties.
  2. Create a NotificationCompat.WearableExtender.
  3. Set wearable-specific properties using the add and set methods of NotificationCompat.WearableExtender.
  4. Call NotificationCompat.Builder#extend to apply the extensions to a notification.
  5. Post the notification to the notification system with the NotificationManagerCompat.notify(...) methods and not the NotificationManager.notify(...) methods.
Notification notification = new NotificationCompat.Builder(mContext)
              .setContentTitle("New mail from " + sender.toString())
              .setContentText(subject)
              .setSmallIcon(R.drawable.new_mail)
              .extend(new NotificationCompat.WearableExtender()
                      .setContentIcon(R.drawable.new_mail))
              .build();
      NotificationManagerCompat.from(mContext).notify(0, notification);

Wearable extensions can be accessed on an existing notification by using the WearableExtender(Notification) constructor, and then using the get methods to access values.

NotificationCompat.WearableExtender wearableExtender =
              new NotificationCompat.WearableExtender(notification);
      List<Notification> pages = wearableExtender.getPages();

Summary

Constants

static Int

Sentinel value for use with setHintScreenTimeout to keep the screen on for a longer amount of time when this notification is displayed on the screen.

static Int

Sentinel value for use with setHintScreenTimeout to keep the screen on for a short amount of time when this notification is displayed on the screen.

static Int

Size value for use with setCustomSizePreset to show this notification with default sizing.

static Int

Size value for use with setCustomSizePreset to show this notification full screen.

static Int

Size value for use with setCustomSizePreset to show this notification with a large size.

static Int

Size value for use with setCustomSizePreset to show this notification with a medium size.

static Int

Size value for use with setCustomSizePreset to show this notification with a small size.

static Int

Size value for use with setCustomSizePreset to show this notification with an extra small size.

static Int

Sentinel value for an action index that is unset.

Public constructors

Create a NotificationCompat.WearableExtender with default options.

<init>(notification: Notification!)

Public methods

NotificationCompat.WearableExtender!

Add a wearable action to this notification.

NotificationCompat.WearableExtender!

Adds wearable actions to this notification.

NotificationCompat.WearableExtender!

Add an additional page of content to display with this notification.

NotificationCompat.WearableExtender!

Add additional pages of content to display with this notification.

NotificationCompat.WearableExtender!

Clear all wearable actions present on this builder.

NotificationCompat.WearableExtender!

Clear all additional pages present on this builder.

NotificationCompat.WearableExtender!

NotificationCompat.Builder!

Apply wearable extensions to a notification that is being built.

MutableList<NotificationCompat.Action!>!

Get the wearable actions present on this notification.

Bitmap!

Get a background image to be displayed behind the notification content.

String!

Returns the bridge tag of the notification.

Int

Get the index of the notification action, if any, that was specified as the primary action.

Int

Get an icon that goes with the content of this notification.

Int

Get the gravity that the content icon should have within the notification display.

Boolean

Get whether the content intent is available when the wearable device is not connected to a companion device.

Int

Get the custom height in pixels for the display of this notification's content.

Int

Get the custom size preset for the display of this notification out of the available presets found in NotificationCompat.WearableExtender, e.

String!

Returns the dismissal id of the notification.

PendingIntent!

Get the intent to launch inside of an activity view when displaying this notification.

Int

Get the gravity that this notification should have within the available viewport space.

Boolean

Get a hint that this notification's BigPictureStyle (if present) should be converted to low-bit and displayed in ambient mode, especially useful for barcodes and qr codes, as well as other simple black-and-white tickets.

Boolean

Get a hint that this notification's background should not be clipped if possible, and should instead be resized to fully display on the screen, retaining the aspect ratio of the image.

Boolean

Get a hint that this notification's content intent will launch an Activity directly, telling the platform that it can generate the appropriate transitions

Boolean

Get a hint that this notification's icon should not be displayed.

Int

Get the duration, in milliseconds, that the screen should remain on for when this notification is displayed.

Boolean

Get a visual hint that only the background image of this notification should be displayed, and other semantic content should be hidden.

MutableList<Notification!>!

Get the array of additional pages of content for displaying this notification.

Boolean

Get whether the scrolling position for the contents of this notification should start at the bottom of the contents instead of the top when the contents are too long to display within the screen.

NotificationCompat.WearableExtender!
setBackground(background: Bitmap!)

Set a background image to be displayed behind the notification content.

NotificationCompat.WearableExtender!
setBridgeTag(bridgeTag: String!)

Sets a bridge tag for this notification.

NotificationCompat.WearableExtender!
setContentAction(actionIndex: Int)

Set an action from this notification's actions as the primary action.

NotificationCompat.WearableExtender!

Set an icon that goes with the content of this notification.

NotificationCompat.WearableExtender!
setContentIconGravity(contentIconGravity: Int)

Set the gravity that the content icon should have within the notification display.

NotificationCompat.WearableExtender!
setContentIntentAvailableOffline(contentIntentAvailableOffline: Boolean)

Set whether the content intent is available when the wearable device is not connected to a companion device.

NotificationCompat.WearableExtender!

Set the custom height in pixels for the display of this notification's content.

NotificationCompat.WearableExtender!
setCustomSizePreset(sizePreset: Int)

Set the custom size preset for the display of this notification out of the available presets found in NotificationCompat.WearableExtender, e.

NotificationCompat.WearableExtender!
setDismissalId(dismissalId: String!)

Sets the dismissal id for this notification.

NotificationCompat.WearableExtender!

Set an intent to launch inside of an activity view when displaying this notification.

NotificationCompat.WearableExtender!
setGravity(gravity: Int)

Set the gravity that this notification should have within the available viewport space.

NotificationCompat.WearableExtender!
setHintAmbientBigPicture(hintAmbientBigPicture: Boolean)

Set a hint that this notification's BigPictureStyle (if present) should be converted to low-bit and displayed in ambient mode, especially useful for barcodes and qr codes, as well as other simple black-and-white tickets.

NotificationCompat.WearableExtender!
setHintAvoidBackgroundClipping(hintAvoidBackgroundClipping: Boolean)

Set a hint that this notification's background should not be clipped if possible, and should instead be resized to fully display on the screen, retaining the aspect ratio of the image.

NotificationCompat.WearableExtender!
setHintContentIntentLaunchesActivity(hintContentIntentLaunchesActivity: Boolean)

Set a hint that this notification's content intent will launch an Activity directly, telling the platform that it can generate the appropriate transitions.

NotificationCompat.WearableExtender!
setHintHideIcon(hintHideIcon: Boolean)

Set a hint that this notification's icon should not be displayed.

NotificationCompat.WearableExtender!

Set a hint that the screen should remain on for at least this duration when this notification is displayed on the screen.

NotificationCompat.WearableExtender!
setHintShowBackgroundOnly(hintShowBackgroundOnly: Boolean)

Set a visual hint that only the background image of this notification should be displayed, and other semantic content should be hidden.

NotificationCompat.WearableExtender!
setStartScrollBottom(startScrollBottom: Boolean)

Set whether the scrolling position for the contents of this notification should start at the bottom of the contents instead of the top when the contents are too long to display within the screen.

Constants

SCREEN_TIMEOUT_LONG

static val SCREEN_TIMEOUT_LONG: Int

Deprecated: This feature is no longer supported.

Sentinel value for use with setHintScreenTimeout to keep the screen on for a longer amount of time when this notification is displayed on the screen.

Value: -1

SCREEN_TIMEOUT_SHORT

static val SCREEN_TIMEOUT_SHORT: Int

Deprecated: This feature is no longer supported.

Sentinel value for use with setHintScreenTimeout to keep the screen on for a short amount of time when this notification is displayed on the screen. This is the default value.

Value: 0

SIZE_DEFAULT

static val SIZE_DEFAULT: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification with default sizing.

For custom display notifications created using setDisplayIntent, the default is SIZE_MEDIUM. All other notifications size automatically based on their content.

Value: 0

SIZE_FULL_SCREEN

static val SIZE_FULL_SCREEN: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification full screen.

This value is only applicable for custom display notifications created using setDisplayIntent.

Value: 5

SIZE_LARGE

static val SIZE_LARGE: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification with a large size.

This value is only applicable for custom display notifications created using setDisplayIntent.

Value: 4

SIZE_MEDIUM

static val SIZE_MEDIUM: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification with a medium size.

This value is only applicable for custom display notifications created using setDisplayIntent.

Value: 3

SIZE_SMALL

static val SIZE_SMALL: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification with a small size.

This value is only applicable for custom display notifications created using setDisplayIntent.

Value: 2

SIZE_XSMALL

static val SIZE_XSMALL: Int

Deprecated: Display intents are no longer supported.

Size value for use with setCustomSizePreset to show this notification with an extra small size.

This value is only applicable for custom display notifications created using setDisplayIntent.

Value: 1

UNSET_ACTION_INDEX

static val UNSET_ACTION_INDEX: Int

Sentinel value for an action index that is unset.

Value: -1

Public constructors

<init>

WearableExtender()

Create a NotificationCompat.WearableExtender with default options.

<init>

WearableExtender(notification: Notification!)

Public methods

addAction

fun addAction(action: NotificationCompat.Action!): NotificationCompat.WearableExtender!

Add a wearable action to this notification.

When wearable actions are added using this method, the set of actions that show on a wearable device splits from devices that only show actions added using NotificationCompat.Builder#addAction. This allows for customization of which actions display on different devices.

Parameters
action NotificationCompat.Action!: the action to add to this notification
Return
NotificationCompat.WearableExtender!: this object for method chaining

addActions

fun addActions(actions: MutableList<NotificationCompat.Action!>!): NotificationCompat.WearableExtender!

Adds wearable actions to this notification.

When wearable actions are added using this method, the set of actions that show on a wearable device splits from devices that only show actions added using NotificationCompat.Builder#addAction. This allows for customization of which actions display on different devices.

Parameters
actions MutableList<NotificationCompat.Action!>!: the actions to add to this notification
Return
NotificationCompat.WearableExtender!: this object for method chaining

addPage

fun addPage(page: Notification!): NotificationCompat.WearableExtender!

Deprecated: Multiple content pages are no longer supported.

Add an additional page of content to display with this notification. The current 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 Notification!: the notification to add as another page
Return
NotificationCompat.WearableExtender!: this object for method chaining

addPages

fun addPages(pages: MutableList<Notification!>!): NotificationCompat.WearableExtender!

Deprecated: Multiple content pages are no longer supported.

Add additional pages of content to display with this notification. The current 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 MutableList<Notification!>!: a list of notifications
Return
NotificationCompat.WearableExtender!: this object for method chaining

clearActions

fun clearActions(): NotificationCompat.WearableExtender!

Clear all wearable actions present on this builder.

Return
NotificationCompat.WearableExtender!: this object for method chaining.

See Also

clearPages

fun clearPages(): NotificationCompat.WearableExtender!

Deprecated: Multiple content pages are no longer supported.

Clear all additional pages present on this builder.

Return
NotificationCompat.WearableExtender!: this object for method chaining.

See Also

extend

fun extend(builder: NotificationCompat.Builder!): NotificationCompat.Builder!

Apply wearable extensions to a notification that is being built. This is typically called by the NotificationCompat.Builder#extend method of NotificationCompat.Builder.

Parameters
builder NotificationCompat.Builder!: the builder to be modified.
Return
NotificationCompat.Builder!: the build object for chaining.

getActions

fun getActions(): MutableList<NotificationCompat.Action!>!

Get the wearable actions present on this notification.

getBackground

fun getBackground(): Bitmap!

Deprecated: Background images are no longer supported.

Get a background image to be displayed behind the notification content. Contrary to the NotificationCompat.BigPictureStyle, this background will work with any notification style.

Return
Bitmap!: the background image

getBridgeTag

fun getBridgeTag(): String!

Returns the bridge tag of the notification.

Return
String!: the bridge tag or null if not present.

getContentAction

fun getContentAction(): Int

Get the index of the notification action, if any, that was specified as the primary action.

If wearable specific actions were added to the main notification, this index will apply to that list, otherwise it will apply to the regular actions list.

Return
Int: the action index or UNSET_ACTION_INDEX if no action was selected.

getContentIcon

fun getContentIcon(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get an icon that goes with the content of this notification.

getContentIconGravity

fun getContentIconGravity(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get the gravity that the content icon should have within the notification display. Supported values include android.view.Gravity#START and android.view.Gravity#END. The default value is android.view.Gravity#END.

See Also

getContentIntentAvailableOffline

fun getContentIntentAvailableOffline(): Boolean

Get whether the content intent is available when the wearable device is not connected to a companion device. The user can still trigger this intent when the wearable device is offline, but a visual hint will indicate that the content intent may not be available. Defaults to true.

getCustomContentHeight

fun getCustomContentHeight(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get the custom height in pixels for the display of this notification's content.

This option is only available for custom display notifications created using setDisplayIntent. See also setCustomSizePreset and setCustomContentHeight.

getCustomSizePreset

fun getCustomSizePreset(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get the custom size preset for the display of this notification out of the available presets found in NotificationCompat.WearableExtender, e.g. SIZE_LARGE.

Some custom size presets are only applicable for custom display notifications created using setDisplayIntent. Check the documentation for the preset in question. See also setCustomContentHeight and setCustomSizePreset.

getDismissalId

fun getDismissalId(): String!

Returns the dismissal id of the notification.

Return
String!: the dismissal id of the notification or null if it has not been set.

getDisplayIntent

fun getDisplayIntent(): PendingIntent!

Deprecated: Display intents are no longer supported.

Get the intent to launch inside of an activity view when displaying this notification. This PendingIntent should be for an activity.

getGravity

fun getGravity(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get the gravity that this notification should have within the available viewport space. Supported values include android.view.Gravity#TOP, android.view.Gravity#CENTER_VERTICAL and android.view.Gravity#BOTTOM. The default value is android.view.Gravity#BOTTOM.

getHintAmbientBigPicture

fun getHintAmbientBigPicture(): Boolean

Deprecated: This feature is no longer supported.

Get a hint that this notification's BigPictureStyle (if present) should be converted to low-bit and displayed in ambient mode, especially useful for barcodes and qr codes, as well as other simple black-and-white tickets.

Return
Boolean: true if it should be displayed in ambient, false otherwise otherwise. The default value is false if this was never set.

getHintAvoidBackgroundClipping

fun getHintAvoidBackgroundClipping(): Boolean

Deprecated: This method has no effect starting with Wear 2.0.

Get a hint that this notification's background should not be clipped if possible, and should instead be resized to fully display on the screen, retaining the aspect ratio of the image. This can be useful for images like barcodes or qr codes.

Return
Boolean: true if it's ok if the background is clipped on the screen, false otherwise. The default value is false if this was never set.

getHintContentIntentLaunchesActivity

fun getHintContentIntentLaunchesActivity(): Boolean

Get a hint that this notification's content intent will launch an Activity directly, telling the platform that it can generate the appropriate transitions

Return
Boolean: true if the content intent will launch an activity and transitions should be generated, false otherwise. The default value is false if this was never set.

getHintHideIcon

fun getHintHideIcon(): Boolean

Deprecated: This method has no effect starting with Wear 2.0.

Get a hint that this notification's icon should not be displayed.

Return
Boolean: true if this icon should not be displayed, false otherwise. The default value is false if this was never set.

getHintScreenTimeout

fun getHintScreenTimeout(): Int

Deprecated: This method has no effect starting with Wear 2.0.

Get the duration, in milliseconds, that the screen should remain on for when this notification is displayed.

Return
Int: the duration in milliseconds if > 0, or either one of the sentinel values SCREEN_TIMEOUT_SHORT or SCREEN_TIMEOUT_LONG.

getHintShowBackgroundOnly

fun getHintShowBackgroundOnly(): Boolean

Deprecated: This method has no effect starting with Wear 2.0.

Get a visual hint that only the background image of this notification should be displayed, and other semantic content should be hidden. This hint is only applicable to sub-pages added using NotificationCompat.WearableExtender#addPage.

getPages

fun getPages(): MutableList<Notification!>!

Deprecated: Multiple content pages are no longer supported.

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.

Return
MutableList<Notification!>!: the pages for this notification

getStartScrollBottom

fun getStartScrollBottom(): Boolean

Get whether the scrolling position for the contents of this notification should start at the bottom of the contents instead of the top when the contents are too long to display within the screen. Default is false (start scroll at the top).

setBackground

fun setBackground(background: Bitmap!): NotificationCompat.WearableExtender!

Deprecated: Background images are no longer supported.

Set a background image to be displayed behind the notification content. Contrary to the NotificationCompat.BigPictureStyle, this background will work with any notification style.

Parameters
background Bitmap!: the background bitmap
Return
NotificationCompat.WearableExtender!: this object for method chaining

setBridgeTag

fun setBridgeTag(bridgeTag: String!): NotificationCompat.WearableExtender!

Sets a bridge tag for this notification. A bridge tag can be set for notifications posted from a phone to provide finer-grained control on what notifications are bridged to wearables. See Adding Wearable Features to Notifications for more information.

Parameters
bridgeTag String!: the bridge tag of the notification.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setContentAction

fun setContentAction(actionIndex: Int): NotificationCompat.WearableExtender!

Set an action from this notification's actions as the primary action. If the action has a RemoteInput associated with it, shortcuts to the options for that input are shown directly on the notification.

Parameters
actionIndex Int: The index of the primary action. If wearable actions were added to the main notification, this index will apply to that list, otherwise it will apply to the regular actions list.

setContentIcon

fun setContentIcon(icon: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set an icon that goes with the content of this notification.

setContentIconGravity

fun setContentIconGravity(contentIconGravity: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set the gravity that the content icon should have within the notification display. Supported values include android.view.Gravity#START and android.view.Gravity#END. The default value is android.view.Gravity#END.

See Also

setContentIntentAvailableOffline

fun setContentIntentAvailableOffline(contentIntentAvailableOffline: Boolean): NotificationCompat.WearableExtender!

Set whether the content intent is available when the wearable device is not connected to a companion device. The user can still trigger this intent when the wearable device is offline, but a visual hint will indicate that the content intent may not be available. Defaults to true.

setCustomContentHeight

fun setCustomContentHeight(height: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set the custom height in pixels for the display of this notification's content.

This option is only available for custom display notifications created using NotificationCompat.WearableExtender#setDisplayIntent. See also NotificationCompat.WearableExtender#setCustomSizePreset and getCustomContentHeight.

setCustomSizePreset

fun setCustomSizePreset(sizePreset: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set the custom size preset for the display of this notification out of the available presets found in NotificationCompat.WearableExtender, e.g. SIZE_LARGE.

Some custom size presets are only applicable for custom display notifications created using NotificationCompat.WearableExtender#setDisplayIntent. Check the documentation for the preset in question. See also setCustomContentHeight and getCustomSizePreset.

setDismissalId

fun setDismissalId(dismissalId: String!): NotificationCompat.WearableExtender!

Sets the dismissal id for this notification. If a notification is posted with a dismissal id, then when that notification is canceled, notifications on other wearables and the paired Android phone having that same dismissal id will also be canceled. See Adding Wearable Features to Notifications for more information.

Parameters
dismissalId String!: the dismissal id of the notification.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setDisplayIntent

fun setDisplayIntent(intent: PendingIntent!): NotificationCompat.WearableExtender!

Deprecated: Display intents are no longer supported.

Set an intent to launch inside of an activity view when displaying this notification. The PendingIntent provided should be for an activity.

Intent displayIntent = new Intent(context, MyDisplayActivity.class);
          PendingIntent displayPendingIntent = PendingIntent.getActivity(context,
                  0, displayIntent, PendingIntent.FLAG_UPDATE_CURRENT);
          Notification notification = new NotificationCompat.Builder(context)
                  .extend(new NotificationCompat.WearableExtender()
                          .setDisplayIntent(displayPendingIntent)
                          .setCustomSizePreset(NotificationCompat.WearableExtender.SIZE_MEDIUM))
                  .build();

The activity to launch needs to allow embedding, must be exported, and should have an empty task affinity. It is also recommended to use the device default light theme.

Example AndroidManifest.xml entry:

<activity android:name="com.example.MyDisplayActivity"
              android:exported="true"
              android:allowEmbedded="true"
              android:taskAffinity=""
              android:theme="@android:style/Theme.DeviceDefault.Light" />
Parameters
intent PendingIntent!: the PendingIntent for an activity
Return
NotificationCompat.WearableExtender!: this object for method chaining

setGravity

fun setGravity(gravity: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set the gravity that this notification should have within the available viewport space. Supported values include android.view.Gravity#TOP, android.view.Gravity#CENTER_VERTICAL and android.view.Gravity#BOTTOM. The default value is android.view.Gravity#BOTTOM.

setHintAmbientBigPicture

fun setHintAmbientBigPicture(hintAmbientBigPicture: Boolean): NotificationCompat.WearableExtender!

Deprecated: This feature is no longer supported.

Set a hint that this notification's BigPictureStyle (if present) should be converted to low-bit and displayed in ambient mode, especially useful for barcodes and qr codes, as well as other simple black-and-white tickets.

Parameters
hintAmbientBigPicture Boolean: true to enable converstion and ambient.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setHintAvoidBackgroundClipping

fun setHintAvoidBackgroundClipping(hintAvoidBackgroundClipping: Boolean): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set a hint that this notification's background should not be clipped if possible, and should instead be resized to fully display on the screen, retaining the aspect ratio of the image. This can be useful for images like barcodes or qr codes.

Parameters
hintAvoidBackgroundClipping Boolean: true to avoid clipping if possible.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setHintContentIntentLaunchesActivity

fun setHintContentIntentLaunchesActivity(hintContentIntentLaunchesActivity: Boolean): NotificationCompat.WearableExtender!

Set a hint that this notification's content intent will launch an Activity directly, telling the platform that it can generate the appropriate transitions.

Parameters
hintContentIntentLaunchesActivity Boolean: true if the content intent will launch an activity and transitions should be generated, false otherwise.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setHintHideIcon

fun setHintHideIcon(hintHideIcon: Boolean): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set a hint that this notification's icon should not be displayed.

Parameters
hintHideIcon Boolean: true to hide the icon, false otherwise.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setHintScreenTimeout

fun setHintScreenTimeout(timeout: Int): NotificationCompat.WearableExtender!

Deprecated: This method has no effect.

Set a hint that the screen should remain on for at least this duration when this notification is displayed on the screen.

Parameters
timeout Int: The requested screen timeout in milliseconds. Can also be either SCREEN_TIMEOUT_SHORT or SCREEN_TIMEOUT_LONG.
Return
NotificationCompat.WearableExtender!: this object for method chaining

setHintShowBackgroundOnly

fun setHintShowBackgroundOnly(hintShowBackgroundOnly: Boolean): NotificationCompat.WearableExtender!

Deprecated: This method has no effect starting with Wear 2.0.

Set a visual hint that only the background image of this notification should be displayed, and other semantic content should be hidden. This hint is only applicable to sub-pages added using addPage.

setStartScrollBottom

fun setStartScrollBottom(startScrollBottom: Boolean): NotificationCompat.WearableExtender!

Set whether the scrolling position for the contents of this notification should start at the bottom of the contents instead of the top when the contents are too long to display within the screen. Default is false (start scroll at the top).