raoxudong 4 years ago
commit 3f3cbf5766

@ -1,3 +1,5 @@
## 0.6.0
+ 修复修复已知bug
## 0.5.9
+ 适配最新版本 JPush SDK Android 3.8.0 , IOS 3.3.6
## 0.5.6

@ -16,7 +16,7 @@ dependencies:
// pub 集成
dependencies:
jpush_flutter: 0.5.9
jpush_flutter: 0.6.0
```
### 配置

@ -155,22 +155,29 @@ public class JPushPlugin implements MethodCallHandler {
public void scheduleCache() {
Log.d(TAG,"scheduleCache:");
List<Object> tempList = new ArrayList<Object>();
if (dartIsReady) {
// try to shedule notifcation cache
for (Map<String, Object> notification: JPushPlugin.openNotificationCache) {
List<Map<String, Object>> openNotificationCacheList = JPushPlugin.openNotificationCache;
for (Map<String, Object> notification: openNotificationCacheList) {
JPushPlugin.instance.channel.invokeMethod("onOpenNotification", notification);
JPushPlugin.openNotificationCache.remove(notification);
tempList.add(notification);
}
openNotificationCacheList.removeAll(tempList);
}
String rid = JPushInterface.getRegistrationID(registrar.context());
boolean ridAvailable = rid != null && !rid.isEmpty();
if (ridAvailable && dartIsReady) {
// try to schedule get rid cache
for (Result res: JPushPlugin.instance.getRidCache) {
tempList.clear();
List<Result> resultList = JPushPlugin.instance.getRidCache;
for (Result res: resultList) {
Log.d(TAG,"scheduleCache rid = " + rid);
res.success(rid);
JPushPlugin.instance.getRidCache.remove(res);
tempList.add(res);
}
resultList.removeAll(tempList);
}
}

@ -1,6 +1,6 @@
name: jpush_flutter
description: JIGUANG officially supported JPush Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件Android & iOS(https://www.jiguang.cn).
version: 0.5.9
version: 0.6.0
# author: xudong.rao <xudong.rao@outlook.com>
homepage: https://www.jiguang.cn

Loading…
Cancel
Save