Skip to content

Commit a9744e0

Browse files
authored
Merge pull request #33 from zoyi/develop
0.4.3
2 parents f108067 + cdd2f4f commit a9744e0

File tree

4 files changed

+10
-17
lines changed

4 files changed

+10
-17
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1+
# 0.4.3
2+
## Bug fixes
3+
* support android channel-io 7.0.7
4+
* fix notification
5+
16
# 0.4.2
27
## Bug fixes & support legacy
3-
# fix language bug
4-
# Legacy support - language / locale
8+
* fix language bug
9+
* Legacy support - language / locale
510

611
# 0.4.1
712
## Bug fixes

android/src/main/java/com/zoyi/channel/rn/RNChannelIO.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ public void initPushToken(String tokenData) {
118118

119119
@ReactMethod
120120
public void handlePushNotification(ReadableMap userInfo, Promise promise) {
121-
Context context = getCurrentActivity();
121+
if (reactContext != null) {
122+
Context context = reactContext.getApplicationContext();
122123

123124
if (context != null) {
124125
ChannelIO.showPushNotification(context, ParseUtils.toPushNotification(userInfo));

android/src/main/java/com/zoyi/channel/rn/Utils.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.zoyi.channel.rn;
22

3-
import android.content.Context;
4-
53
import com.facebook.react.bridge.*;
64
import com.facebook.react.modules.core.DeviceEventManagerModule;
7-
import com.zoyi.channel.plugin.android.global.PrefSupervisor;
85

96
/**
107
* Created by mika on 2018. 9. 18..
@@ -60,16 +57,6 @@ public static ReadableArray getReadableArray(ReadableMap readableMap, String key
6057
return null;
6158
}
6259

63-
public static String getPluginKey(Context context) {
64-
String pluginKey = null;
65-
66-
if (PrefSupervisor.getPluginSetting(context) != null) {
67-
pluginKey = PrefSupervisor.getPluginSetting(context).getPluginKey();
68-
}
69-
70-
return pluginKey;
71-
}
72-
7360
public static void sendEvent(ReactContext reactContext, String eventName, WritableMap params) {
7461
reactContext
7562
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-channel-plugin",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"description": "react native module for channel io",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)