Language

Notification.WearableExtender Class

Definition

Helper class to add wearable extensions to notifications.

[Android.Runtime.Register("android/app/Notification$WearableExtender", DoNotGenerateAcw=true)]
public sealed class Notification.WearableExtender : Java.Lang.Object, Android.App.Notification.IExtender, IDisposable
[<Android.Runtime.Register("android/app/Notification$WearableExtender", DoNotGenerateAcw=true)>]
type Notification.WearableExtender = class
    inherit Object
    interface Notification.IExtender
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Notification.WearableExtender
Attributes
Implements

Remarks

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: Create a Notification.Builder, setting any desired properties. Create a Notification.WearableExtender. Set wearable-specific properties using the add and set methods of Notification.WearableExtender. Call Notification.Builder.extend(Extender) to apply the extensions to a notification. Post the notification to the notification system with the NotificationManager.notify(...) methods. Wearable extensions can be accessed on an existing notification by using the WearableExtender(Notification) constructor, and then using the get methods to access values.

Android reference for android.app.Notification.WearableExtender.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Constructors

Name Description
Notification.WearableExtender()

Create a Notification.WearableExtender with default options.

Notification.WearableExtender(Notification)

Fields

Name Description
ScreenTimeoutLong

This constant was deprecated in API level 29.

ScreenTimeoutShort

This constant was deprecated in API level 29.

UnsetActionIndex

Sentinel value for an action index that is unset.

Properties

Name Description
Actions

Get the wearable actions present on this notification.

Background

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

BridgeTag

Returns the bridge tag of the notification.

Class

Returns the runtime class of this Object.

(Inherited from Object)
ContentAction

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

ContentIcon

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

ContentIconGravity

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

ContentIntentAvailableOffline

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

CustomContentHeight

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

CustomSizePreset

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

DismissalId

Returns the dismissal id of the notification.

DisplayIntent

This method was deprecated in API level 29.

Gravity

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

Handle

The handle to the underlying Android instance.

(Inherited from Object)
HintAmbientBigPicture

This method was deprecated in API level 29.

HintAvoidBackgroundClipping

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.

HintContentIntentLaunchesActivity

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

HintHideIcon

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

HintScreenTimeout

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

HintShowBackgroundOnly

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

JniIdentityHashCode

Gets the identity hash code assigned to this Java peer by the interop runtime.

(Inherited from Object)
JniManagedPeerState (Inherited from JavaObject)
JniPeerMembers

Provides JNI binding infrastructure for Android.App.Notification.WearableExtender.

Pages

This method was deprecated in API level 29.

PeerReference

Gets the JNI object reference for this Java peer.

(Inherited from Object)
StartScrollBottom

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.

ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)

Methods

Name Description
AddAction(Notification+Action)

Add a wearable action to this notification.

AddActions(IList<Notification.Action>)

Adds wearable actions to this notification.

AddPage(Notification)

This method was deprecated in API level 29.

AddPages(IList<Notification>)

This method was deprecated in API level 29.

ClearActions()

Clear all wearable actions present on this builder.

ClearPages()

This method was deprecated in API level 29.

Clone()

Creates and returns a copy of this object.

Construct(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
Dispose()

Releases the resources held by this Java peer.

(Inherited from Object)
Dispose(Boolean)

Releases the resources held by this Java peer.

(Inherited from Object)
DisposeUnlessReferenced() (Inherited from JavaObject)
Equals(Object) (Inherited from JavaObject)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
Extend(Notification+Builder)

Apply wearable extensions to a notification that is being built.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetBackground(Bitmap)
SetBridgeTag(String)

Sets a bridge tag for this notification.

SetContentAction(Int32)

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

SetContentIcon(Int32)

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

SetContentIconGravity(GravityFlags)

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

SetContentIntentAvailableOffline(Boolean)

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

SetCustomContentHeight(Int32)

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

SetCustomSizePreset(WearableSizePreset)

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

SetDismissalId(String)

Sets the dismissal id for this notification.

SetDisplayIntent(PendingIntent)

This method was deprecated in API level 29.

SetGravity(GravityFlags)

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

SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
SetHintAmbientBigPicture(Boolean)

This method was deprecated in API level 29.

SetHintAvoidBackgroundClipping(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.

SetHintContentIntentLaunchesActivity(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.

SetHintHideIcon(Boolean)

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

SetHintScreenTimeout(Int32)

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

SetHintShowBackgroundOnly(Boolean)

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

SetPeerReference(JniObjectReference, JniObjectReferenceOptions) (Inherited from JavaObject)
SetStartScrollBottom(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.

ToArray<T>()

Creates a managed array from this Java array wrapper.

(Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime()

Unregisters this Java peer from the interop runtime.

(Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

Name Description
IJavaPeerable.Disposed() (Inherited from JavaObject)
IJavaPeerable.Finalized() (Inherited from JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock (Inherited from JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from JavaObject)
IJavaPeerable.UnregisterFromRuntime()

Extension Methods

Name Description
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to