This repository was archived by the owner on Jul 28, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
android/src/main/java/tech/bam/RNBatchPush Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,15 @@ You can enable do not disturb mode with the following steps:
64
64
65
65
defaultConfig {
66
66
...
67
- resValue "bool", "BATCH_DISABLE_DO_NOT_DISTURB ", "false "
67
+ resValue "bool", "BATCH_DO_NOT_DISTURB_INITIAL_STATE ", "true "
68
68
}
69
69
```
70
70
71
71
* On iOS, add in your ` Info.plist ` :
72
72
73
73
``` xml
74
- <key >BatchDisableDoNotDisturb </key >
75
- <false />
74
+ <key >BatchDoNotDisturbInitialState </key >
75
+ <true />
76
76
```
77
77
78
78
* Show pending in app message or mobile landing
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ public static void initialize(Application application) {
83
83
Batch .setConfig (new Config (batchAPIKey ));
84
84
85
85
try {
86
- boolean disableDoNotDisturb = resources .getBoolean (resources .getIdentifier ("BATCH_DISABLE_DO_NOT_DISTURB " , "bool" , packageName ));
87
- Batch .Messaging .setDoNotDisturbEnabled (! disableDoNotDisturb );
86
+ boolean doNotDisturbEnabled = resources .getBoolean (resources .getIdentifier ("BATCH_DO_NOT_DISTURB_INITIAL_STATE " , "bool" , packageName ));
87
+ Batch .Messaging .setDoNotDisturbEnabled (doNotDisturbEnabled );
88
88
} catch (Resources .NotFoundException e ) {
89
89
Batch .Messaging .setDoNotDisturbEnabled (false );
90
90
}
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ + (void)start
35
35
36
36
NSDictionary *info = [[NSBundle mainBundle ] infoDictionary ];
37
37
38
- id disableDoNotDisturb = [info objectForKey: @" BatchDisableDoNotDisturb " ];
39
- if (disableDoNotDisturb != nil ) {
40
- [BatchMessaging setDoNotDisturb: ![disableDoNotDisturb boolValue ]];
38
+ id doNotDisturbEnabled = [info objectForKey: @" BatchDoNotDisturbInitialState " ];
39
+ if (doNotDisturbEnabled != nil ) {
40
+ [BatchMessaging setDoNotDisturb: [doNotDisturbEnabled boolValue ]];
41
41
} else {
42
42
[BatchMessaging setDoNotDisturb: false ];
43
43
}
You can’t perform that action at this time.
0 commit comments