Notification.Builder.SetSortKey(String) Method

Definition

Set a sort key that orders this notification among other notifications from the same package.

[Android.Runtime.Register("setSortKey", "(Ljava/lang/String;)Landroid/app/Notification$Builder;", "GetSetSortKey_Ljava_lang_String_Handler")]
public virtual Android.App.Notification.Builder SetSortKey(string? sortKey);
[<Android.Runtime.Register("setSortKey", "(Ljava/lang/String;)Landroid/app/Notification$Builder;", "GetSetSortKey_Ljava_lang_String_Handler")>]
abstract member SetSortKey : string -> Android.App.Notification.Builder
override this.SetSortKey : string -> Android.App.Notification.Builder

Parameters

sortKey
String

String

Returns

This Android.App.Notification.Builder instance, allowing calls to be chained.

Attributes

Remarks

Set a sort key that orders this notification among other notifications from the same package. This can be useful if an external sort was already applied and an app would like to preserve this. Notifications will be sorted lexicographically using this value, although providing different priorities in addition to providing sort key may cause this value to be ignored. This sort key can also be used to order members of a notification group. See setGroup(String).

See also:

Android reference for android.app.Notification.Builder.setSortKey.

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.

Applies to