From 5ff830e8617aaeedd08ad57cadebc82aae0021c6 Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Mon, 25 Feb 2019 13:27:23 -0800 Subject: [PATCH] Add RNBranchModule.getAutoInstance to README for new installs, not just update instructions --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ebcfded98..0892617ac 100644 --- a/README.md +++ b/README.md @@ -252,7 +252,7 @@ ___ Add RNBranchPackage to packages list in `getPackages()` MainApplication.java (`android/app/src/[...]/MainApplication.java`). Note that this is automatically done if you used `react-native link`. -Also add a call to `Branch.getAutoinstance()` in `onCreate()` in the same source file. This has to be +Also add a call to `RNBranchModule.getAutoinstance()` in `onCreate()` in the same source file. This has to be done even if you used `react-native link`. ```java // ... @@ -276,10 +276,13 @@ import io.branch.referral.Branch; @Override public void onCreate() { super.onCreate(); - Branch.getAutoInstance(this); + RNBranchModule.getAutoInstance(this); } ``` +_NOTE_: `RNBranchModule.getAutoInstance` was introduced in version 3.0.0-beta.2. Use `Branch.getAutoInstance` in +previous versions, including 2.x. + Override onStart and onNewIntent in MainActivity.java to handle Branch links (`android/app/src/[...]/MainActivity.java`). This has to be done regardless whether you used `react-native link`. ```java