reading-notes

Notifications

What is Amazon SNS?

Features and capabilities

Amazon SNS provides the following features and capabilities:

You can use the following services with Amazon SNS:

SNS with Amplify (and Firebase)

```cd ./YOUR_PROJECT_FOLDER amplify add notifications


2. Choose Firebase Cloud Messaging (FCM).
> FCM
3. Add the following dependencies and plugin to your app/build.gradle:

```dependencies {
    // Overrides an auth dependency to ensure correct behavior
    implementation 'com.google.android.gms:play-services-auth:19.2.0'

    // Import the BoM for the Firebase platform
    implementation platform('com.google.firebase:firebase-bom:28.2.1')
    implementation 'com.google.firebase:firebase-messaging'

    implementation 'com.amazonaws:aws-android-sdk-pinpoint:2.25.+'
    implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.26.+@aar') { transitive = true }
}

apply plugin: 'com.google.gms.google-services'
  1. Add the following to your project level build.gradle:
buildscript {
    dependencies {
        classpath 'com.google.gms:google-services:4.0.1'
    }
}

allprojects {
    repositories {
        google()
    }
}
  1. added this tag to AndroidManifest.xml:
    android:name=".PushListenerService">
    <intent-filter>
        <action android:name="com.google.firebase.MESSAGING_EVENT"/>
    </intent-filter>
</service>

Additional resources

SNS: Getting Started

SNS with Amplify (and Firebase)