We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 54c6f58 + 32efdf5 commit a9e0632Copy full SHA for a9e0632
android/src/main/java/com/zoyi/channel/rn/RNChannelIO.java
@@ -128,10 +128,12 @@ public void initPushToken(String tokenData) {
128
129
@ReactMethod
130
public void handlePushNotification(ReadableMap userInfo, Promise promise) {
131
- Context context = getCurrentActivity();
+ if (reactContext != null) {
132
+ Context context = reactContext.getApplicationContext();
133
- if (context != null){
134
- ChannelIO.showPushNotification(context, ParseUtils.toPushNotification(userInfo));
+ if (context != null) {
135
+ ChannelIO.showPushNotification(context, ParseUtils.toPushNotification(userInfo));
136
+ }
137
}
138
139
promise.resolve(true);
0 commit comments