Files
react-native-firebase/docs/remote-config/android.md
2019-08-21 10:16:04 +01:00

1.1 KiB

title, description
title description
Android Setup Manually integrate Remote Config into your Android application.

Android Manual Linking

The following steps are only required if your environment does not have access to React Native auto-linking.

Add Remote Config to Gradle Settings

android/settings.gradle:

include ':@react-native-firebase_config'
project(':@react-native-firebase_config').projectDir = new File(rootProject.projectDir, './../node_modules/@react-native-firebase/remote-config/android')

Add Remote Config to App Gradle Dependencies

android/app/build.gradle:

// ..
dependencies {
  // ..
  implementation project(path: ":@react-native-firebase_config")
}

Add Remote Config to Main Android Application:

android/app/src/main/java/**/MainApplication.java:

// ..
import io.invertase.firebase.config.ReactNativeFirebaseConfigPackage;

  // ..
  protected List<ReactPackage> getPackages() {
    return Arrays.asList(
      new MainReactPackage(),
      new ReactNativeFirebaseConfigPackage(),
      // ..