Added in API level 20

WearableExtender

class WearableExtender : Notification.Extender
kotlin.Any
   ↳ android.app.Notification.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 android.app.Notification.Builder, setting any desired properties.
  2. Create a android.app.Notification.WearableExtender.
  3. Set wearable-specific properties using the add and set methods of android.app.Notification.WearableExtender.
  4. Call android.app.Notification.Builder#extend to apply the extensions to a notification.
  5. Post the notification to the notification system with the NotificationManager.notify(...) methods.
Notification notif = new Notification.Builder(mContext)
          .setContentTitle("New mail from " + sender.toString())
          .setContentText(subject)
          .setSmallIcon(R.drawable.new_mail)
          .extend(new Notification.WearableExtender()
                  .setContentIcon(R.drawable.new_mail))
          .build();
  NotificationManager notificationManger =
          (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
  notificationManger.notify(0, notif);

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

Notification.WearableExtender wearableExtender = new Notification.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 android.app.Notification.WearableExtender with default options.

Public methods
Notification.WearableExtender!

Add a wearable action to this notification.

Notification.WearableExtender!

Adds wearable actions to this notification.

Notification.WearableExtender!

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

Notification.WearableExtender!

Add additional pages of content to display with this notification.

Notification.WearableExtender!

Clear all wearable actions present on this builder.

Notification.WearableExtender!

Clear all additional pages present on this builder.

Notification.WearableExtender!

Notification.Builder!

Apply wearable extensions to a notification that is being built.

MutableList<Notification.Action!>!

Get the wearable actions present on this notification.

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 android.app.Notification.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.

Notification.WearableExtender!
setBridgeTag(bridgeTag: String!)

Sets a bridge tag for this notification.

Notification.WearableExtender!
setContentAction(actionIndex: Int)

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

Notification.WearableExtender!

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

Notification.WearableExtender!
setContentIconGravity(contentIconGravity: Int)

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

Notification.WearableExtender!
setContentIntentAvailableOffline(contentIntentAvailableOffline: Boolean)

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

Notification.WearableExtender!

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

Notification.WearableExtender!
setCustomSizePreset(sizePreset: Int)

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

Notification.WearableExtender!
setDismissalId(dismissalId: String!)

Sets the dismissal id for this notification.

Notification.WearableExtender!

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

Notification.WearableExtender!
setGravity(gravity: Int)

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

Notification.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.

Notification.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.

Notification.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.

Notification.WearableExtender!
setHintHideIcon(hintHideIcon: Boolean)

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

Notification.WearableExtender!

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

Notification.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.

Notification.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

Added in API level 22
Deprecated in API level 29
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

Added in API level 22
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
static val UNSET_ACTION_INDEX: Int

Sentinel value for an action index that is unset.

Value: -1

Public constructors

WearableExtender

Added in API level 20
WearableExtender()

Create a android.app.Notification.WearableExtender with default options.

WearableExtender

Added in API level 20
WearableExtender(notif: Notification!)

Public methods

addAction

Added in API level 20
fun addAction(action: Notification.Action!): Notification.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 android.app.Notification.Builder#addAction. This allows for customization of which actions display on different devices.

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

addActions

Added in API level 20
fun addActions(actions: MutableList<Notification.Action!>!): Notification.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 android.app.Notification.Builder#addAction. This allows for customization of which actions display on different devices.

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

addPage

Added in API level 20
Deprecated in API level 29
fun addPage(page: Notification!): Notification.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
Notification.WearableExtender! this object for method chaining

addPages

Added in API level 20
Deprecated in API level 29
fun addPages(pages: MutableList<Notification!>!): Notification.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
Notification.WearableExtender! this object for method chaining

clearActions

Added in API level 20
fun clearActions(): Notification.WearableExtender!

Clear all wearable actions present on this builder.

Return
Notification.WearableExtender! this object for method chaining.

See Also

clearPages

Added in API level 20
Deprecated in API level 29
fun clearPages(): Notification.WearableExtender!

Deprecated: Multiple content pages are no longer supported.

Clear all additional pages present on this builder.

Return
Notification.WearableExtender! this object for method chaining.

See Also

clone

Added in API level 20
fun clone(): Notification.WearableExtender!
Return
Notification.WearableExtender! a clone of this instance.
Exceptions
java.lang.CloneNotSupportedException if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

extend

Added in API level 20
fun extend(builder: Notification.Builder!): Notification.Builder!

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

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

getActions

Added in API level 20
fun getActions(): MutableList<Notification.Action!>!

Get the wearable actions present on this notification.

getBridgeTag

Added in API level 26
fun getBridgeTag(): String!

Returns the bridge tag of the notification.

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

getContentAction

Added in API level 20
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

Added in API level 20
Deprecated in API level 28
fun getContentIcon(): Int

Deprecated: Deprecated in Java.

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

getContentIconGravity

Added in API level 20
Deprecated in API level 28
fun getContentIconGravity(): Int

Deprecated: Deprecated in Java.

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

Added in API level 20
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

Added in API level 20
Deprecated in API level 28
fun getCustomContentHeight(): Int

Deprecated: Deprecated in Java.

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

Added in API level 20
Deprecated in API level 28
fun getCustomSizePreset(): Int

Deprecated: Deprecated in Java.

Get the custom size preset for the display of this notification out of the available presets found in android.app.Notification.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

Added in API level 24
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

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
Deprecated in API level 28
fun getGravity(): Int

Deprecated: Deprecated in Java.

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

Added in API level 24
Deprecated in API level 29
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

Added in API level 22
Deprecated in API level 28
fun getHintAvoidBackgroundClipping(): Boolean

Deprecated: Deprecated in Java.

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

Added in API level 24
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

Added in API level 20
Deprecated in API level 28
fun getHintHideIcon(): Boolean

Deprecated: Deprecated in Java.

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

Added in API level 22
Deprecated in API level 28
fun getHintScreenTimeout(): Int

Deprecated: Deprecated in Java.

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

Added in API level 20
Deprecated in API level 28
fun getHintShowBackgroundOnly(): Boolean

Deprecated: Deprecated in Java.

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 android.app.Notification.WearableExtender#addPage.

getPages

Added in API level 20
Deprecated in API level 29
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

Added in API level 20
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).

setBridgeTag

Added in API level 26
fun setBridgeTag(bridgeTag: String!): Notification.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
Notification.WearableExtender! this object for method chaining

setContentAction

Added in API level 20
fun setContentAction(actionIndex: Int): Notification.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

Added in API level 20
Deprecated in API level 28
fun setContentIcon(icon: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

setContentIconGravity

Added in API level 20
Deprecated in API level 28
fun setContentIconGravity(contentIconGravity: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

Added in API level 20
fun setContentIntentAvailableOffline(contentIntentAvailableOffline: Boolean): Notification.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

Added in API level 20
Deprecated in API level 28
fun setCustomContentHeight(height: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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 android.app.Notification.WearableExtender#setDisplayIntent. See also android.app.Notification.WearableExtender#setCustomSizePreset and getCustomContentHeight.

setCustomSizePreset

Added in API level 20
Deprecated in API level 28
fun setCustomSizePreset(sizePreset: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

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

setDismissalId

Added in API level 24
fun setDismissalId(dismissalId: String!): Notification.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
Notification.WearableExtender! this object for method chaining

setDisplayIntent

Added in API level 20
Deprecated in API level 29
fun setDisplayIntent(intent: PendingIntent!): Notification.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 | PendingIntent.FLAG_MUTABLE_UNAUDITED);
  Notification notif = new Notification.Builder(context)
          .extend(new Notification.WearableExtender()
                  .setDisplayIntent(displayPendingIntent)
                  .setCustomSizePreset(Notification.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
Notification.WearableExtender! this object for method chaining

setGravity

Added in API level 20
Deprecated in API level 28
fun setGravity(gravity: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

Added in API level 24
Deprecated in API level 29
fun setHintAmbientBigPicture(hintAmbientBigPicture: Boolean): Notification.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
Notification.WearableExtender! this object for method chaining

setHintAvoidBackgroundClipping

Added in API level 22
Deprecated in API level 28
fun setHintAvoidBackgroundClipping(hintAvoidBackgroundClipping: Boolean): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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
Notification.WearableExtender! this object for method chaining

setHintContentIntentLaunchesActivity

Added in API level 24
fun setHintContentIntentLaunchesActivity(hintContentIntentLaunchesActivity: Boolean): Notification.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
Notification.WearableExtender! this object for method chaining

setHintHideIcon

Added in API level 20
Deprecated in API level 28
fun setHintHideIcon(hintHideIcon: Boolean): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

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

setHintScreenTimeout

Added in API level 22
Deprecated in API level 28
fun setHintScreenTimeout(timeout: Int): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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
Notification.WearableExtender! this object for method chaining

setHintShowBackgroundOnly

Added in API level 20
Deprecated in API level 28
fun setHintShowBackgroundOnly(hintShowBackgroundOnly: Boolean): Notification.WearableExtender!

Deprecated: Deprecated in Java.

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

Added in API level 20
fun setStartScrollBottom(startScrollBottom: Boolean): Notification.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).