Class FCMTopicSubscriber
- java.lang.Object
-
- com.amazon.A3L.messaging.FCM.topicsubscription.FCMTopicSubscriber
-
public class FCMTopicSubscriber extends java.lang.Object
Handles the topic subscription and unsubscription operations for Firebase Messaging.
-
-
Constructor Summary
Constructors Constructor Description FCMTopicSubscriber()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.android.gms.tasks.Task<java.lang.Void>
subscribeToTopic(java.lang.String topic)
Invokes the FCM's subscribeToTopic method which subscribes the deviceToken to the given topic.com.google.android.gms.tasks.Task<java.lang.Void>
unsubscribeFromTopic(java.lang.String topic)
Invokes the FCM's unsubscribeFromTopic method which unsubscribes the deviceToken from the given topic.
-
-
-
Method Detail
-
subscribeToTopic
public com.google.android.gms.tasks.Task<java.lang.Void> subscribeToTopic(@NonNull java.lang.String topic)
Invokes the FCM's subscribeToTopic method which subscribes the deviceToken to the given topic.- Parameters:
topic
- : Topic to which the app instance is to be subscribed.- Returns:
- Task which can be used by completion listener to determine whether the subscription completed.
-
unsubscribeFromTopic
public com.google.android.gms.tasks.Task<java.lang.Void> unsubscribeFromTopic(@NonNull java.lang.String topic)
Invokes the FCM's unsubscribeFromTopic method which unsubscribes the deviceToken from the given topic.- Parameters:
topic
- : Topic from which the app instance is to be unsubscribed.- Returns:
- Task which can be used by completion listener to determine whether the subscription completed.
-
-