@@ -54,7 +54,7 @@ If you don't use CocoaPods, you can integrate Batch SDK manually.
5454buildscript {
5555 ...
5656 ext {
57- batchSdkVersion = '1.17+' // optional
57+ batchSdkVersion = '1.17+'
5858 }
5959 dependencies {
6060 ...
@@ -69,6 +69,7 @@ buildscript {
6969dependencies {
7070 implementation platform('com.google.firebase:firebase-bom:25.12.0') // needed if you don't have @react-native-firebase/app
7171 implementation "com.google.firebase:firebase-messaging" // needed if you don't have @react-native-firebase/messaging
72+ implementation "com.batch.android:batch-sdk:${rootProject.ext.batchSdkVersion}"
7273 ...
7374}
7475
@@ -110,6 +111,22 @@ defaultConfig {
110111
111112- Add the _ google-services.json_ file to ` /android/app `
112113
114+ #### e. Configure ` onNewIntent `
115+
116+ Add ` Batch.onNewIntent(this, intent); ` in your ` MainActivity.java ` :
117+
118+ ``` java
119+ // import android.content.Intent;
120+ // import com.batch.android.Batch;
121+
122+ @Override
123+ public void onNewIntent(Intent intent)
124+ {
125+ Batch . onNewIntent(this , intent);
126+ super . onNewIntent(intent);
127+ }
128+ ```
129+
113130### 5. Extra steps on iOS
114131
115132#### a. Enable Push Capabilities
@@ -203,23 +220,6 @@ This can be configured in the manifest as metadata in the application tag:
203220 android : value =" #FF00FF00" />
204221```
205222
206- ### Mobile landings and in-app messaging
207-
208- If you set a custom ` launchMode ` in your ` AndroidManifest.xml ` , add in your ` MainActivity.java ` :
209-
210- ``` java
211- // import android.content.Intent;
212- // import com.batch.android.Batch;
213-
214- @Override
215- public void onNewIntent(Intent intent)
216- {
217- Batch . onNewIntent(this , intent);
218-
219- super . onNewIntent(intent);
220- }
221- ```
222-
223223### GDPR compliance flow
224224
225225#### 1. Opt out by default
0 commit comments