Class PushNotificationMessage
-
- All Implemented Interfaces:
public class PushNotificationMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
PushNotificationMessage.PushSourceType
-
Field Summary
Fields Modifier and Type Field Description public String
pushId
public RongPushClient.ConversationType
conversationType
public long
receivedTime
public String
objectName
public String
senderId
public String
senderName
public Uri
senderPortrait
public String
targetId
public String
targetUserName
public String
toId
public String
pushTitle
public String
pushContent
public String
pushData
public String
extra
public PushNotificationMessage.PushSourceType
sourceType
public String
intent
public int
voip
public String
notificationId
public boolean
isShowDetail
public String
channelIdMi
public String
channelIdHW
public String
channelIdOPPO
public String
channelIdFCM
public String
collapseKeyFCM
public String
imageUrlFCM
public String
imageUrlHW
public String
imageUrlMi
public String
busChannel
public String
pid
public final static Creator<PushNotificationMessage>
CREATOR
-
Constructor Summary
Constructors Constructor Description PushNotificationMessage()
-
Method Summary
Modifier and Type Method Description String
getPushId()
Retrieves the unique ID that identifies this push notification. void
setPushId(String id)
RongPushClient.ConversationType
getConversationType()
Retrieves the conversation type of the push notification. void
setConversationType(RongPushClient.ConversationType type)
long
getReceivedTime()
Get the arrival time of the push notification. void
setReceivedTime(long time)
String
getObjectName()
Get the type of the push notification. void
setObjectName(String objectName)
String
getSenderId()
Retrieves the sender ID of the push notification. void
setSenderId(String id)
String
getSenderName()
Retrieves the sender's name of the push notification. void
setSenderName(String name)
Uri
getSenderPortrait()
Retrieves the sender's avatar for this push notification. void
setSenderPortrait(Uri uri)
String
getTargetId()
Retrieves the target ID of the push notification. void
setTargetId(String id)
String
getTargetUserName()
Retrieves the target name of the push notification. void
setTargetUserName(String name)
String
getToId()
Retrieves the target user ID for the push notification. void
setToId(String id)
String
getPushTitle()
Push Notification Title.** Currently, this field is not enabled. void
setPushTitle(String title)
String
getPushContent()
Retrieves the display content of the push notification. void
setPushContent(String content)
String
getPushData()
Retrieves the additional information carried by the push notification. void
setPushData(String appDataContent)
String
getExtra()
Retrieves the key-value pairs of custom additional information when using the push notification service from the developer console. void
setExtra(String extra)
PushNotificationMessage.PushSourceType
getSourceType()
Retrieve the source of the push notification. void
setSourceType(PushNotificationMessage.PushSourceType type)
String
getIntent()
For Huawei and FCM redirection intent void
setIntent(String intent)
int
getVoip()
void
setVoip(int isVoip)
String
getNotificationId()
void
setNotificationId(String notificationId)
boolean
isShowDetail()
void
setShowDetail(boolean showDetail)
String
getChannelIdMi()
void
setChannelIdMi(String channelIdMi)
String
getChannelIdHW()
void
setChannelIdHW(String channelIdHW)
String
getChannelIdOPPO()
void
setChannelIdOPPO(String channelIdOPPO)
String
getChannelIdFCM()
void
setChannelIdFCM(String channelIdFCM)
String
getCollapseKeyFCM()
void
setCollapseKeyFCM(String collapseKeyFCM)
String
getImageUrlFCM()
void
setImageUrlFCM(String imageUrlFCM)
String
getImageUrlHW()
void
setImageUrlHW(String imageUrlHW)
String
getImageUrlMi()
void
setImageUrlMi(String imageUrlMi)
String
getBusChannel()
void
setBusChannel(String busChannel)
String
getPid()
void
setPid(String pid)
void
setPushFlag(String value)
String
getPushFlag()
Indicates whether the message is a push notification or a background message. boolean
isDisablePushTitle()
int
describeContents()
void
writeToParcel(Parcel dest, int flags)
String
toString()
void
setDisablePushTitle(boolean disablePushTitle)
-
-
Method Detail
-
getPushId
String getPushId()
Retrieves the unique ID that identifies this push notification. When using the broadcast push service from the developer console, this ID is used to track the push open rate. If you customize the display of push notifications, you must call recordNotificationEvent to upload the push open event when the notification is clicked. This ensures that RCbackend can accurately calculate the push open rate for you.
- Returns:
When using the broadcast push service from the developer console, returns a string representing the pushId. If the push is converted from a message, it represents the message's UID.
-
setPushId
void setPushId(String id)
-
getConversationType
RongPushClient.ConversationType getConversationType()
Retrieves the conversation type of the push notification. For example, one-to-one chat, group, discussion group, etc.
-
setConversationType
void setConversationType(RongPushClient.ConversationType type)
-
getReceivedTime
long getReceivedTime()
Get the arrival time of the push notification. This time indicates when the message arrived at the RCserver.
-
setReceivedTime
void setReceivedTime(long time)
-
getObjectName
String getObjectName()
Get the type of the push notification. For example, RC:TxtMsg for text messages, RC:ImgMsg for image messages, RC:VcMsg for voice messages. If it is a custom message, the value corresponds to the `value` in the `MessageTag` annotation of the custom message.
-
setObjectName
void setObjectName(String objectName)
-
getSenderId
String getSenderId()
Retrieves the sender ID of the push notification.
-
setSenderId
void setSenderId(String id)
-
getSenderName
String getSenderName()
Retrieves the sender's name of the push notification.
-
setSenderName
void setSenderName(String name)
-
getSenderPortrait
Uri getSenderPortrait()
Retrieves the sender's avatar for this push notification.
-
setSenderPortrait
void setSenderPortrait(Uri uri)
-
getTargetId
String getTargetId()
Retrieves the target ID of the push notification. For example, if the push is sent to group 123 of user A, the ID of group 123 is returned here.
- Returns:
The target ID of the push notification. For one-to-one chat, it is the ID of the other user; for group chat, it is the group ID.
-
setTargetId
void setTargetId(String id)
-
getTargetUserName
String getTargetUserName()
Retrieves the target name of the push notification. For example, if the push is sent to group 123 of user A, the name of group 123 is returned here.
- Returns:
The target name of the push notification. For instance, in a one-to-one chat, it is the name of the other party; in a group chat, it is the group name.
-
setTargetUserName
void setTargetUserName(String name)
-
getToId
String getToId()
Retrieves the target user ID for the push notification. For example, if this push notification is sent to user A's group 123, it returns the ID of user A.
- Returns:
The target user ID for the push notification.
-
setToId
void setToId(String id)
-
getPushTitle
String getPushTitle()
Push Notification Title.** Currently, this field is not enabled.
-
setPushTitle
void setPushTitle(String title)
-
getPushContent
String getPushContent()
Retrieves the display content of the push notification. When the push message is a custom message, this value corresponds to the content of the `pushContent` parameter in `sendMessage()`. If `pushContent` is not provided when sending a custom message, no push notification will be received.
-
setPushContent
void setPushContent(String content)
-
getPushData
String getPushData()
Retrieves the additional information carried by the push notification. The value here corresponds to the content of the `pushData` parameter in `sendMessage()`. Usage scenario: When sending a custom message, if the `pushData` parameter is filled in `sendMessage()`, the content of `pushData` can be retrieved through this method when the push notification for this message is received.
-
setPushData
void setPushData(String appDataContent)
-
getExtra
String getExtra()
Retrieves the key-value pairs of custom additional information when using the push notification service from the developer console. This field is exclusively used for the push notification service in the developer console and is null in all other cases.
-
setExtra
void setExtra(String extra)
-
getSourceType
PushNotificationMessage.PushSourceType getSourceType()
Retrieve the source of the push notification. PushSourceType
- Returns:
The source of the push notification.
-
setSourceType
void setSourceType(PushNotificationMessage.PushSourceType type)
-
getIntent
String getIntent()
For Huawei and FCM redirection intent
-
setIntent
void setIntent(String intent)
-
getVoip
int getVoip()
-
setVoip
void setVoip(int isVoip)
-
getNotificationId
String getNotificationId()
-
setNotificationId
void setNotificationId(String notificationId)
-
isShowDetail
boolean isShowDetail()
-
setShowDetail
void setShowDetail(boolean showDetail)
-
getChannelIdMi
String getChannelIdMi()
-
setChannelIdMi
void setChannelIdMi(String channelIdMi)
-
getChannelIdHW
String getChannelIdHW()
-
setChannelIdHW
void setChannelIdHW(String channelIdHW)
-
getChannelIdOPPO
String getChannelIdOPPO()
-
setChannelIdOPPO
void setChannelIdOPPO(String channelIdOPPO)
-
getChannelIdFCM
String getChannelIdFCM()
-
setChannelIdFCM
void setChannelIdFCM(String channelIdFCM)
-
getCollapseKeyFCM
String getCollapseKeyFCM()
-
setCollapseKeyFCM
void setCollapseKeyFCM(String collapseKeyFCM)
-
getImageUrlFCM
String getImageUrlFCM()
-
setImageUrlFCM
void setImageUrlFCM(String imageUrlFCM)
-
getImageUrlHW
String getImageUrlHW()
-
setImageUrlHW
void setImageUrlHW(String imageUrlHW)
-
getImageUrlMi
String getImageUrlMi()
-
setImageUrlMi
void setImageUrlMi(String imageUrlMi)
-
getBusChannel
String getBusChannel()
-
setBusChannel
void setBusChannel(String busChannel)
-
getPid
String getPid()
-
setPid
void setPid(String pid)
-
setPushFlag
void setPushFlag(String value)
-
getPushFlag
String getPushFlag()
Indicates whether the message is a push notification or a background message.
-
isDisablePushTitle
boolean isDisablePushTitle()
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
toString
String toString()
-
setDisablePushTitle
void setDisablePushTitle(boolean disablePushTitle)
-
-
-
-