How do I create an Android platform application for push messaging in Amazon SNS?
Last updated: 2019-04-17
I want to create a platform application in Amazon Simple Notification Service (Amazon SNS) to send push notification messages to Android devices. How do I do that, and what cloud messaging credentials do I need?
To create your Android platform application in Amazon SNS, you need credentials from Firebase Cloud Messaging (FCM). Be sure to add a project at the Firebase console website.
Note: Amazon SNS push notifications are not available in all AWS Regions.
Copy your FCM project's API key
- In the Firebase console, choose your project.
- In the left navigation pane, choose Settings (the gear icon), and then choose Project Settings.
- Choose Cloud Messaging.
- Under Project credentials, find the Server key. This your FCM project's API key. Copy it to your clipboard.
For more information, see Setting Up FCM/GCM for Push Notifications.
Create a platform application using Amazon SNS
- Open the Amazon SNS console.
- Open the left navigation menu, expand Mobile, and then choose Push notifications.
- On the Mobile push notifications page, next to Platform applications, choose Create platform application.
- On the Create platform application page, under Details, do the following:
For Application name, enter a name for your application.
For Push notification platform, choose Firebase Cloud Messaging (FCM).
Under Firebase Cloud Messaging Credentials, paste the API key that you copied earlier.
- (Optional) Set up event notifications and delivery status logging.
- Choose Create platform application.