Get Started with A3L Messaging
For an overview of the A3L Messaging SDK, watch the video tutorial.
To get started with A3L Messaging, first set up credentials for Firebase Cloud Messaging (FCM) and Amazon Device Messaging (ADM). Then, add the A3L Messaging library into your project. Use this page to guide you through the process.
Get credentials for FCM and ADM
A3L Messaging depends on individual messaging solutions for message delivery. Therefore, you must get both Google-provided and Amazon-provided credentials.
- For ADM, first obtain credentials and then add an API key to your project.
- For FCM, first create a Firebase project and register your app with Firebase. After obtaining a google-services.json configuration file, add the file to your project. Be sure to add the mentioned
classpath
to your build.gradle file. - To use Topic Based Messaging on Fire OS devices, you must register your security profile 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.
Add A3L Messaging as a dependency
Many A3L Messaging methods are comparable to FCM methods. Therefore, if you already use FCM, you might not need to make any code changes to create notifications with A3L Messaging when using the following methods:
onMessageReceived()
onNewToken()
getToken()
subscribeToTopic()
unsubscribeFromTopic()
To get started, remove the FCM library dependency and replace it with the A3L Messaging library.
Use these steps to add the A3L Messaging SDK as a dependency in your project.
-
Download the A3L Messaging SDK.
- Add the AAR file into your project's libs folder:
- In Android Studio, from the Project pane, select Project view and expand the app folder.
- Create a libs folder if it doesn't exist.
- Add A3LMessaging-1.1.0.aar to the libs folder.
- Add A3L Messaging as a dependency in your project. In your build.gradle file, add the following line:
dependencies { ... implementation files("libs/A3LMessaging-1.1.0.aar") }
- Add Firebase Messaging as a dependency. In your build.gradle file, add the following line:
dependencies { ... implementation 'com.google.firebase:firebase-messaging:23.0.0' }
- Sync your project by selecting Sync Now at the top of your build.gradle file.
Next steps
Last updated: Feb 27, 2023