subscribeToTopic() and unsubscribeFromTopic() methods found in the Amazon Device Messaging (ADM) and Firebase Cloud Messaging (FCM) APIs.
Register your security profile
For Fire OS devices, you must register your security profile for Topic-Based Messaging through ADM. For instructions, see Register a security profile for Topic-Based Messaging. This step is not required for using Topic-Based Messaging in FCM.Subscribe or unsubscribe to a topic
To subscribe your app to an ADM or FCM topic, call the A3L MessagingsubscribeToTopic() method and pass it the topic name. This method returns a Task that can be used by a completion listener to determine whether the subscription succeeded, as shown in the following code.
unsubscribeFromTopic() method and pass it the topic name. This method returns a Task that can be used by a completion listener to determine whether unsubscribing was successful, as shown in the following code.
Test with server-side scripts
To test Topic-Based Messaging, you can use these server-side scripts to send a message to a topic.- ADMSendMessageToTopic.py is a python script that sends a topic-based message to a Fire OS device.
- FCMSendMessageToTopic.py is a python script that sends a topic-based message to an Android device.
Open/Close ADMSendMessageToTopic.py
Open/Close ADMSendMessageToTopic.py
Open/Close FCMSendMessageToTopic.py
Open/Close FCMSendMessageToTopic.py

