Skip to content

Commit 40950ff

Browse files
authored
Updated Android config steps for autolinking
Updated Android config documentation to mention which steps are not needed when using RN 0.60 or greater due to auto linking
1 parent ca88e24 commit 40950ff

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,6 @@ In `android/app/src/main/AndroidManifest.xml`
9898
This resolves the error caused by the manifest merger tool for gradle.
9999

100100
### Export React Native Module from app
101-
102-
In `android/settings.gradle`
103-
104-
```gradle
105-
...
106-
107-
include ':react-native-azurenotificationhub'
108-
project(':react-native-azurenotificationhub').projectDir = file('../node_modules/react-native-azurenotificationhub/android')
109-
```
110-
111101
In `android/build.gradle`
112102

113103
```gradle
@@ -130,7 +120,7 @@ In `android/app/build.gradle`
130120
dependencies {
131121
...
132122
133-
implementation project(':react-native-azurenotificationhub')
123+
implementation project(':react-native-azurenotificationhub') // <- Note only include this line if using a version of RN < 0.60 since it will be auto linked
134124
implementation 'com.google.firebase:firebase-messaging:17.6.0'
135125
implementation 'com.google.firebase:firebase-core:16.0.8'
136126
}
@@ -174,6 +164,17 @@ In `android/app/src/main/AndroidManifest.xml`
174164
...
175165
```
176166

167+
### If using a version of React Native before [RN 0.60](https://github.com/facebook/react-native/releases/tag/v0.60.0) that does not support autolinking:
168+
169+
In `android/settings.gradle`
170+
171+
```gradle
172+
...
173+
174+
include ':react-native-azurenotificationhub'
175+
project(':react-native-azurenotificationhub').projectDir = file('../node_modules/react-native-azurenotificationhub/android')
176+
```
177+
177178
Register the module package in `MainApplication.java`
178179

179180
```java

0 commit comments

Comments
 (0)