File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
android/src/main/java/com/batch/batch_rn Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -239,6 +239,11 @@ public void push_getLastKnownPushToken(Promise promise) {
239
239
promise .resolve (pushToken );
240
240
}
241
241
242
+ @ ReactMethod
243
+ public void push_requestNotificationAuthorization () {
244
+ Batch .Push .requestNotificationPermission (reactContext );
245
+ }
246
+
242
247
// MESSAGING MODULE
243
248
244
249
private void showPendingMessage () {
Original file line number Diff line number Diff line change @@ -40,15 +40,12 @@ export const BatchPush = {
40
40
} ,
41
41
42
42
/**
43
- * Ask iOS users if they want to accept push notifications.
44
- * Required to be able to push users (or use requestProvisionalNotificationAuthorization).
43
+ * Ask users if they want to accept push notifications.
44
+ * Required to be able to push users (or use requestProvisionalNotificationAuthorization - ios only ).
45
45
*
46
- * No effect on Android.
47
46
*/
48
47
requestNotificationAuthorization : ( ) : void => {
49
- if ( Platform . OS === 'ios' ) {
50
- RNBatch . push_requestNotificationAuthorization ( ) ;
51
- }
48
+ RNBatch . push_requestNotificationAuthorization ( ) ;
52
49
} ,
53
50
54
51
/**
You can’t perform that action at this time.
0 commit comments