public class WebNotification extends Object
WebNotificationDelegate
to
GeckoRuntime
via GeckoRuntime.setWebNotificationDelegate(WebNotificationDelegate)
.Modifier and Type | Field and Description |
---|---|
String |
imageUrl
ImageURL contains the URL of an icon to be displayed as part of the notification.
|
String |
lang
Lang indicates the notification's language, as specified using a DOMString
representing a BCP 47 language tag.
|
boolean |
requireInteraction
RequireInteraction indicates whether a notification should remain active until the user
clicks or dismisses it, rather than closing automatically.
|
String |
source
This is the URL of the page or Service Worker that generated the notification.
|
String |
tag
Tag is the ID of the notification.
|
String |
text
Text represents the body of the notification.
|
String |
textDirection
TextDirection indicates the direction that the language of the text is displayed.
|
String |
title
Title is shown at the top of the notification window.
|
Modifier and Type | Method and Description |
---|---|
void |
click()
This should be called when the user taps or clicks a notification.
|
void |
dismiss()
This should be called when the app stops showing the notification.
|
@Nullable public final String title
@NonNull public final String tag
@Nullable public final String text
@Nullable public final String imageUrl
@Nullable public final String textDirection
@Nullable public final String lang
@NonNull public final boolean requireInteraction
@Nullable public final String source
@UiThread public void click()
dismiss()
.@UiThread public void dismiss()