Skip to content
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

发现几个bug #18

Open
yuanxiang-gao opened this issue Feb 21, 2019 · 2 comments
Open

发现几个bug #18

yuanxiang-gao opened this issue Feb 21, 2019 · 2 comments

Comments

@yuanxiang-gao
Copy link

No description provided.

@yuanxiang-gao
Copy link
Author

cordova-plugin-xgpush-hl 这个fork版本,发现几个问题:
1、src/android/XGPushPlugin.java ,execute()方法里面,调用unRegisterPush()方法那里少了一个参数data。
2、项目如果已经添加了安卓平台,然后再添加这个插件,可以成功执行after_plugin_add.js钩子,platform/android/corodva-plugin-xgpush/xx-build-extras.gradle里面的信鸽安卓id和key可以成功替换掉。但如果添加这个插件后,再添加安卓平台,那么after_plugin_add.js钩子不会被执行,xx-build-extras.gradle这个文件里的安卓id和key就不会替换。
我的解决方法:再添加一个after_plugin_install.js钩子,在这个钩子里处理安卓信鸽id和key。

@yuanxiang-gao
Copy link
Author

yuanxiang-gao commented Mar 6, 2019

xgpush.js文件
me.registerPush(null, function (info) {
console.log("[XGPush] RegisterPush: ", info);
channel.onCordovaXGPushReady.fire();
}, function (e) {
console.log("[ERROR] RegisterPush: ", e);
channel.onCordovaXGPushReady.fire();
});
这段代码,如果信鸽注册出问题,不回调失败的方法,将会导致程序一直卡在启动页面,因为channel.onCordovaXGPushReady.fire() 没有执行。
如努比亚手机,不能注册成功,会一直卡在程序启动界面。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant