Configure the React Native Plugin for Android Apps

After you install and configure the MobilePush SDK React Native plugin, configure the plugin to enable push support for the Android platform.

Before you configure the MobilePush SDK React Native plugin for Android apps, make sure that the plugin is installed and configured for your app. See Marketing Cloud React Native Plugin.

Add the MobilePush SDK for Android repository to your build.gradle file.

To enable push support for Android, provide your FCM credentials by placing the google-services.json file in the android/app directory.

  1. Download the google-services.json file from your app’s Firebase console and place it in your project’s android/app directory.

  2. Include the Google Services plugin in your android/build.gradle file.

  3. Add the plugin to your build.gradle file.

Configure the SDK in your MainApplication.java class as shown in this example

To customize push notification functionality for Android apps, see the notification customization guide.

To implement the Carousel and Button actions features introduced in Android SDK version 9.0.0, refer to the Configure Button and Carousel Actions section.