-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
基于Kotlin重构Android插件代码并支持多Flutter engine和更精准的result回调管理 #282
base: master
Are you sure you want to change the base?
Conversation
Pair(JPushInterface.EXTRA_EXTRA, notificationExtras), | ||
Pair(JPushInterface.EXTRA_ALERT_TYPE, notificationAlertType), | ||
Pair(JPushInterface.EXTRA_NOTIFICATION_ID, notificationId), | ||
Pair(JPushInterface.EXTRA_MSG_ID, msgId), | ||
Pair(JPushInterface.EXTRA_ALERT, notificationContent), | ||
Pair(JPushInterface.EXTRA_NOTIFICATION_TITLE, notificationTitle), | ||
Pair(JPushInterface.EXTRA_NOTI_TYPE, notificationType), | ||
Pair(JPushInterface.EXTRA_BIG_TEXT, notificationBigText), | ||
Pair(JPushInterface.EXTRA_INBOX, notificationInbox), | ||
Pair(JPushInterface.EXTRA_BIG_PIC_PATH, notificationBigPicPath), | ||
Pair(JPushInterface.EXTRA_NOTI_PRIORITY, notificationPriority), | ||
Pair(JPushInterface.EXTRA_NOTI_CATEGORY, notificationCategory), | ||
Pair(JPushInterface.EXTRA_NOTIFICATION_SMALL_ICON, notificationSmallIcon), | ||
Pair(JPushInterface.EXTRA_NOTIFICATION_LARGET_ICON, notificationLargeIcon), | ||
Pair(JPushInterface.EXTRA_TYPE_PLATFORM, platform), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这块是基于41项JPushInterface. EXTRA_XXX和NotificationMessage相关的属性名字整理出来的15条,其中删除了现有官方要求忽略的几条,如有错漏请补充(我们内部其实只会用到第一条)。
<receiver android:name="com.jiguang.jpush.JPushEventReceiver" | ||
android:enabled="true" | ||
android:exported="false"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的修改是基于官方文档,添加enabled和exported属性以消除警告
放弃吧...你看他们鸟你吗...这就是你国内上游厂商🤮 |
现有JPushPlugin的职责太多
所以拆分JPushPlugin的缓存和回调分发功能到单例类:JPushCallbackDispatcher。
JPushPlugin专注于onMethodCall的dart端代码调用处理。
另外删除静态内部类JPushPlugin$JPushReceiver,相关功能合并到JPushEventReceiver
架构变化如下: