public class MafNativeLocalNotificationOptions
extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MafNativeLocalNotificationOptions.RepeatInterval |
Modifier and Type | Field and Description |
---|---|
static String |
ALERT_KEY |
static String |
BADGE_KEY |
static String |
DATE_KEY |
static String |
PAYLOAD_KEY |
static String |
REPEAT_KEY |
static String |
SOUND_DEFAULT_SYSTEM
set the sound to this value to hear the default system notification sound when notification triggers
|
static String |
SOUND_KEY |
static String |
TITLE_KEY |
static String |
VIBRATION_DEFAULT_SYSTEM
set the vibration to this value to hear the default system notification sound when notification triggers
|
static String |
VIBRATION_KEY |
Constructor and Description |
---|
MafNativeLocalNotificationOptions() |
Modifier and Type | Method and Description |
---|---|
String |
getAlert() |
int |
getBadge() |
java.time.LocalDateTime |
getDate() |
java.util.HashMap<String,?> |
getPayload() |
MafNativeLocalNotificationOptions.RepeatInterval |
getRepeat() |
String |
getSound() |
String |
getTitle() |
String |
getVibration() |
void |
setAlert(String alert)
Set alert text in notification alert/banner.
|
void |
setBadge(int badge)
Set the number to badge application icon with when notification triggers.
|
void |
setDate(java.time.LocalDateTime date)
Set date-time at which notification should be triggered.
|
void |
setPayload(java.util.HashMap<String,Object> payload)
Set the custom payload to be transported with notification.
|
void |
setRepeat(MafNativeLocalNotificationOptions.RepeatInterval repeat)
Set the repeat interval at which notification should be triggered.
|
void |
setSound(String sound)
Set the sound that is played when notification triggers.
|
void |
setTitle(String title)
Set title text in notification alert/banner.
|
void |
setVibration(String vibration)
Set the vibration pattern when notification triggers
|
public static final String TITLE_KEY
public static final String ALERT_KEY
public static final String DATE_KEY
public static final String REPEAT_KEY
public static final String BADGE_KEY
public static final String SOUND_KEY
public static final String PAYLOAD_KEY
public static final String VIBRATION_KEY
public static final String SOUND_DEFAULT_SYSTEM
public static final String VIBRATION_DEFAULT_SYSTEM
public String getTitle()
public void setTitle(String title)
title
- - title textpublic String getAlert()
public void setAlert(String alert)
alert
- - alert textpublic java.time.LocalDateTime getDate()
public void setDate(java.time.LocalDateTime date)
date
- public MafNativeLocalNotificationOptions.RepeatInterval getRepeat()
public void setRepeat(MafNativeLocalNotificationOptions.RepeatInterval repeat)
repeat
- MafNativeLocalNotificationOptions.RepeatInterval
public int getBadge()
public void setBadge(int badge)
Value | Outcome |
---|---|
0 | no badging occurs, existing badge stays |
less than 0 | existing badge is wiped off |
greater than 0 | badged with given value |
Note : No badging occurs on Android since it does not natively support badging application icon.
badge
- - badge numberpublic String getSound()
public void setSound(String sound)
sound
- - string representing the type of sound. Currently, only valid value is SOUND_DEFAULT_SYSTEM
SOUND_DEFAULT_SYSTEM
public String getVibration()
public void setVibration(String vibration)
vibration
- - vibration pattern representing the type of vibration. Currently, only valid value is VIBRATION_DEFAULT_SYSTEM
VIBRATION_DEFAULT_SYSTEM
public java.util.HashMap<String,?> getPayload()
public void setPayload(java.util.HashMap<String,Object> payload)
payload
- - custom payload