Interface MessagingService
-
public interface MessagingServiceMain class of the Messaging service for the Card issued by D1.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgetMessageList(D1Task.Callback<List<Message>> callback)To retrieve message list for the current consumer.voidmarkMessageListAsRead(List<String> messageID, D1Task.Callback<Void> callback)To mark the message as read.voidregisterMessageNotification(D1Task.Callback<Void> callback)To register the notification for card issued by D1.voidunregisterMessageNotification(D1Task.Callback<Void> callback)To unregister notification for card issued by D1.
-
-
-
Method Detail
-
registerMessageNotification
void registerMessageNotification(@NonNull D1Task.Callback<Void> callback)
To register the notification for card issued by D1.The SDK registers the token to the server. Hence,
D1Task.Builder.setApplicationProfileId(String)andMessagingService.updatePushTokenshould be called before calling this API. Otherwise, the SDK will either returnIllegalArgumentExceptionorD1Error.Code.pushTokenNotFound.- Parameters:
callback- The callback is invoked when the operation is completed. Notification is registered when the callback is successful.
Possible errors:
- Since:
- 4.0.0
-
unregisterMessageNotification
void unregisterMessageNotification(@NonNull D1Task.Callback<Void> callback)
To unregister notification for card issued by D1.- Parameters:
callback- The callback is invoked when the operation is completed. Notification is unregistered when the callback is successful.
Possible errors:
- Since:
- 4.0.0
-
getMessageList
void getMessageList(@NonNull D1Task.Callback<List<Message>> callback)
To retrieve message list for the current consumer. The message is related to activities in the card issued by D1.- Parameters:
callback- The callback is invoked when the operation is completed. When the callback is successful, the list ofmessagesis returned.
Possible errors:
- Since:
- 4.0.0
-
markMessageListAsRead
void markMessageListAsRead(@NonNull List<String> messageID, @NonNull D1Task.Callback<Void> callback)
To mark the message as read. The message is related to activities in the card issued by D1.- Parameters:
messageID- The list of message IDs.callback- The callback is invoked when the operation is completed.
Possible errors:
- Since:
- 4.0.0
-
-