다음을 통해 공유


NotificationChannel.SetShowBadge(Boolean) Method

Definition

Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.

[Android.Runtime.Register("setShowBadge", "(Z)V", "", ApiSince=26)]
public void SetShowBadge (bool showBadge);
[<Android.Runtime.Register("setShowBadge", "(Z)V", "", ApiSince=26)>]
member this.SetShowBadge : bool -> unit

Parameters

showBadge
Boolean

true if badges should be allowed to be shown.

Attributes

Remarks

Sets whether notifications posted to this channel can appear as application icon badges in a Launcher.

Only modifiable before the channel is submitted to NotificationManager#createNotificationChannel(NotificationChannel).

Java documentation for android.app.NotificationChannel.setShowBadge(boolean).

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