Skip to main content

Gradle Configuration

The React Native auto-linking will handle most of the Android setup. However, you need to ensure the following:
  1. Set minimum SDK version in android/build.gradle:
buildscript {
    ext {
        minSdkVersion = 24
        compileSdkVersion = 34
        targetSdkVersion = 34
    }
}
  1. Add Maven repositories in android/build.gradle:
allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }
    }
}
The Zixflow Android SDK will be automatically included via the React Native module.

Firebase Cloud Messaging Setup

To enable Firebase Cloud Messaging (FCM) for push notifications on Android:
  1. Add Firebase to your project:
    • Go to Firebase Console
    • Add your Android app
    • Download google-services.json and place it in android/app/
  2. Add Google Services plugin in android/build.gradle:
buildscript {
    dependencies {
        classpath 'com.google.gms:google-services:4.4.2'
    }
}
  1. Apply the plugin in android/app/build.gradle:
apply plugin: 'com.google.gms.google-services'
  1. Configure FCM in the SDK (shown in the initialization section below).