Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Manual Installation

Bruno Tortato Furtado edited this page Jan 2, 2020 · 4 revisions
  1. Add the following lines to android/settings.gradle:
include ':react-native-sms-retriever'
project(':react-native-sms-retriever').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sms-retriever/android')
  1. Add the compile line to the dependencies in android/app/build.gradle:
dependencies {
  // ...
  compile project(':react-native-sms-retriever')
}
  1. Add the import and link the package in MainApplication.java:
import me.furtado.smsretriever.RNSmsRetrieverPackage; // <-- Add the import

public class MainApplication extends Application implements ReactApplication {

  // ...

  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      // ...
      new RNSmsRetrieverPackage() // <-- Add it to the packages list
    );
  }

  // ...
}
Clone this wiki locally