public final class ToastNotification extends AbstractUserNotification
Toast
. Set a message and a duration of Toast.LENGTH_LONG
or Toast.LENGTH_LONG
.Constructor and Description |
---|
ToastNotification() |
ToastNotification(NotificationConfiguration notificationConfiguration) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
getDuration() |
java.lang.String |
getMessage() |
int |
hashCode() |
void |
setDuration(int duration)
Sets the Toast duration (either
Toast.LENGTH_SHORT (0) or Toast.LENGTH_LONG (1). |
void |
setMessage(java.lang.String message)
Sets the Toast message.
|
void |
show(android.content.Context context)
Shows the Notification to the user.
|
java.lang.String |
toString() |
getNotificationConfiguration
public ToastNotification()
public ToastNotification(NotificationConfiguration notificationConfiguration)
public void show(android.content.Context context)
UserNotification
context
- the Context
of the app.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message
- the Toast messagepublic int getDuration()
Toast.LENGTH_SHORT
or Toast.LENGTH_LONG
public void setDuration(int duration)
Toast.LENGTH_SHORT
(0) or Toast.LENGTH_LONG
(1).duration
- the Toast durationpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class AbstractUserNotification
public int hashCode()
hashCode
in class AbstractUserNotification