public final class Notification
extends java.lang.Object
implements java.io.Serializable
Instances of this class are immutable and should be created using a
Notification.Builder. Examples:
Simplest notification:
Notification notification = new Notification.Builder("myicon").build();
Notification with optional attributes:
Notification notification = new Notification.Builder("myicon")
.title("Hello world!")
.body("Here is a more detailed description")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
Notification.Builder |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getBadge()
Gets the badge.
|
java.lang.String |
getBody()
Gets the body.
|
java.util.List<java.lang.String> |
getBodyLocArgs()
Gets the body localization values list, which is immutable.
|
java.lang.String |
getBodyLocKey()
Gets the body localization key.
|
java.lang.String |
getClickAction()
Gets the click action.
|
java.lang.String |
getColor()
Gets the color.
|
java.lang.String |
getIcon()
Gets the icon.
|
java.lang.String |
getSound()
Gets the sound.
|
java.lang.String |
getTag()
Gets the tag.
|
java.lang.String |
getTitle()
Gets the title.
|
java.util.List<java.lang.String> |
getTitleLocArgs()
Gets the title localization values list, which is immutable.
|
java.lang.String |
getTitleLocKey()
Gets the title localization key.
|
java.lang.String |
toString() |
public java.lang.String getTitle()
public java.lang.String getBody()
public java.lang.String getIcon()
public java.lang.String getSound()
public java.lang.Integer getBadge()
public java.lang.String getTag()
public java.lang.String getColor()
public java.lang.String getClickAction()
public java.lang.String getBodyLocKey()
public java.util.List<java.lang.String> getBodyLocArgs()
public java.lang.String getTitleLocKey()
public java.util.List<java.lang.String> getTitleLocArgs()
public java.lang.String toString()
toString in class java.lang.Object