Skip to content

Commit e872ab2

Browse files
committed
Fix error when import module on Android
1 parent 4cf660f commit e872ab2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import {
44
NativeModules,
55
DeviceEventEmitter,
6+
Platform,
67
} from 'react-native';
78

89
var RNVoipPushNotificationManager = NativeModules.RNVoipPushNotificationManager;
@@ -16,7 +17,7 @@ var DEVICE_LOCAL_NOTIF_EVENT = 'voipLocalNotificationReceived';
1617

1718
export default class RNVoipPushNotification {
1819

19-
static wakeupByPush = (RNVoipPushNotificationManager.wakeupByPush === 'true');
20+
static wakeupByPush = (Platform.OS == 'ios' && RNVoipPushNotificationManager.wakeupByPush === 'true');
2021

2122
/**
2223
* Schedules the localNotification for immediate presentation.

0 commit comments

Comments
 (0)