Test with consoles
FCM and ADM both have consoles that you can use to send a push notification. If you prefer a UI experience, you might want to use this method.Test your app with the ADM console
To test your integration with ADM, you can send a push notification by using the ADM console and following these directions.-
Go to the ADM console and log in if prompted.
- Enter the Client ID and secret for your app. You should have these from when you obtained your credentials for ADM.
- In the Device registration ID field, enter the device ID obtained when initializing A3L Messaging.
- Choose Data message.
-
Add key-value pairs for the notification you want to send.
- To a title, set Key to “a3l.notification.title” and Value to your desired title of the notification.
- To add a body, set Key to “a3l.notification.body” and Value to your desired text of the notification.
- Optionally, to add an image, set Key to “a3l.notification.image” and Value to a URL to an image.
- Add any additional desired fields. For an exhaustive list of fields and how they map to Android notifications, see A3L Messaging notification keys.
- Choose the duration of the message in the Message expires after section.
- When done adding key-value pairs, click Send test message.
onMessageReceived() method of your implementation of the A3LMessagingService class.
Test your app with Firebase console
To test your integration with FCM, send a push notification by using the Notification composer in the Firebase console.- Go to the Firebase console.
- Select the project for which you want to send a test push notification.
- On the left sidebar, expand the Engage section and select Cloud Messaging.
- Click New notification.
- Enter your message in the Notification text field. You can optionally fill in the Notification title, Notification image or Notification name fields.
- Click Send test message in the Device preview section.
- In the overlay, enter your device ID in the Add an FCM registration token field. Your device ID was obtained when initializing A3L Messaging.
- Click Test.
Test with a server-side script
The following server-side scripts allow you to send notifications to a device.- ADMWebServer.py is a python script that sends a notification to a Fire OS device.
- FCMWebServer.py is a python script that sends a notification to an Android device.
Open/Close ADMWebServer.py
Open/Close ADMWebServer.py
Open/Close FCMWebServer.py
Open/Close FCMWebServer.py
Test with solution-specific APIs
Both FCM and ADM provide APIs you can use to send messages to your devices. For detailed instructions on how to send a message through those APIs, use the following guides.A3L Messaging notification keys
A3L Messaging notification keys are similar to Android notification keys. All A3L Messaging notification keys append a prefix of “a3l.notification.” before the base field name. This prefix helps to avoids collision with the Android notification keys which have similar field names. A3L Messaging notification fields behave same as the corresponding Android notification fields. The data type and functionality of the fields are the same. The following table shows a full list of A3L Messaging notification fields and the corresponding Android notification fields.| A3L Messaging notification field | Android notification field |
|---|---|
| a3l.notification.title | title |
| a3l.notification.body | body |
| a3l.notification.image | image |
| a3l.notification.icon | icon |
| a3l.notification.color | color |
| a3l.notification.sound | sound |
| a3l.notification.tag | tag |
| a3l.notification.click_action | click_action |
| a3l.notification.channel_id | channel_id |
| a3l.notification.sticky | sticky |
| a3l.notification.event_time | event_time |
| a3l.notification.local_only | local_only |
| a3l.notification.notification_priority | notification_priority |
| a3l.notification.default_sound | default_sound |
| a3l.notification.visibility | visibility |
| a3l.notification.notification_count | notification_count |

