public class AylaServiceApp
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AylaServiceApp.NotificationType |
static class |
AylaServiceApp.PushType |
Constructor and Description |
---|
AylaServiceApp() |
Modifier and Type | Method and Description |
---|---|
void |
configureAsEmail(AylaContact contact,
java.lang.String message,
java.lang.String username,
AylaEmailTemplate emailTemplate)
Configures the receiver as AylaNotificationTypeEmail for the specified AylaContact with the
specified message and AylaEmailTemplate
|
void |
configureAsPushBaidu(java.lang.String applicationId,
java.lang.String channelId,
java.lang.String message,
java.lang.String pushSound,
java.lang.String pushMetaData)
Configures the receiver as AylaNotificationType for Baidu
|
void |
configureAsPushFCM(java.lang.String registrationId,
java.lang.String message,
java.lang.String pushSound,
java.lang.String pushMetaData)
Configures the receiver as AylaNotificationType for FCM Push defaulting to the
application ID specified in the System Settings
|
void |
configureAsPushFCM(java.lang.String applicationId,
java.lang.String registrationId,
java.lang.String message,
java.lang.String pushSound,
java.lang.String pushMetaData)
Configures the receiver as AylaNotificationType for FCM Push
|
void |
configureAsSMS(AylaContact contact,
java.lang.String message)
Configures the receiver as AylaNotificationTypeSMS for the specified AylaContact and message
|
void |
configureAsSMS(java.lang.String countryCode,
java.lang.String phoneNumber,
java.lang.String username,
java.lang.String message)
Configures the receiver as AylaNotificationTypeSMS for the specified parameters.
|
java.lang.String |
getChannelId() |
java.lang.String |
getContactId() |
java.lang.String |
getCountryCode() |
java.lang.String |
getEmailAddress() |
AylaEmailTemplate |
getEmailTemplate() |
java.lang.String |
getMessage() |
java.lang.String |
getNickname() |
AylaServiceApp.NotificationType |
getNotificationType() |
java.lang.String |
getPhoneNumber() |
java.lang.String |
getPushMdata() |
java.lang.String |
getPushSound() |
java.lang.String |
getRegistrationId() |
java.lang.String |
getRetrievedAt() |
java.lang.String |
getUsername() |
void |
populateFields() |
void |
setEmailAddress(java.lang.String emailAddress) |
void |
setEmailTemplate(AylaEmailTemplate emailTemplate) |
void |
setNickname(java.lang.String nickname) |
void |
setNotificationType(AylaServiceApp.NotificationType notificationType) |
java.lang.String |
toJSON() |
public java.lang.String getContactId()
public java.lang.String getUsername()
public java.lang.String getMessage()
public java.lang.String getEmailAddress()
public java.lang.String getCountryCode()
public java.lang.String getPhoneNumber()
public java.lang.String getPushSound()
public java.lang.String getPushMdata()
public java.lang.String getRetrievedAt()
public java.lang.String getRegistrationId()
public java.lang.String getChannelId()
public java.lang.String getNickname()
public AylaEmailTemplate getEmailTemplate()
public AylaServiceApp.NotificationType getNotificationType()
public void setNickname(java.lang.String nickname)
public void setEmailAddress(java.lang.String emailAddress)
public void setEmailTemplate(AylaEmailTemplate emailTemplate)
public void setNotificationType(AylaServiceApp.NotificationType notificationType)
public java.lang.String toJSON()
public void populateFields()
public void configureAsSMS(AylaContact contact, java.lang.String message)
contact
- The AylaContact that will receive the appmessage
- The message of the SMSpublic void configureAsSMS(java.lang.String countryCode, java.lang.String phoneNumber, java.lang.String username, java.lang.String message)
countryCode
- phoneNumber
- The phone numberusername
- The username of the appmessage
- The message of the SMSpublic void configureAsEmail(AylaContact contact, java.lang.String message, java.lang.String username, AylaEmailTemplate emailTemplate)
contact
- The AylaContact that will receive the appmessage
- The message of the emailusername
- The username of the appemailTemplate
- An AylaEmailTemplate with the email specificationspublic void configureAsPushFCM(java.lang.String registrationId, java.lang.String message, java.lang.String pushSound, java.lang.String pushMetaData)
registrationId
- The registration ID needed for FCMmessage
- The Push message for FCMpushSound
- The sound file name present on mobile app eg: my_sound_file.mp3pushMetaData
- Comma separated data needed by app eg: {"key1":"value1", "key2":"value2"}public void configureAsPushFCM(java.lang.String applicationId, java.lang.String registrationId, java.lang.String message, java.lang.String pushSound, java.lang.String pushMetaData)
applicationId
- Application ID for this app, provided by Ayla NetworksregistrationId
- The registration ID needed for FCMmessage
- The Push message for FCMpushSound
- The sound file name present on mobile app eg: my_sound_file.mp3pushMetaData
- Comma separated data needed by app eg: {"key1":"value1", "key2":"value2"}public void configureAsPushBaidu(java.lang.String applicationId, java.lang.String channelId, java.lang.String message, java.lang.String pushSound, java.lang.String pushMetaData)
applicationId
- The Application IDchannelId
- The Channel IDmessage
- The Push MessagepushSound
- The sound the Phone should emit on receiving this NotificationpushMetaData
- The optional Meta Data to be included in the message