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

anrdoid 4.1.2 4.2.1 推送成功,但是点击不能启动app #5

Open
andfly opened this issue Mar 3, 2016 · 8 comments
Open

anrdoid 4.1.2 4.2.1 推送成功,但是点击不能启动app #5

andfly opened this issue Mar 3, 2016 · 8 comments

Comments

@andfly
Copy link

andfly commented Mar 3, 2016

anrdoid 4.1.2(lenovo a770e)和4.2.1(小米2a)推送成功,但是点击不能启动app。不知道为什么?Android6.0, Android5.0 是可以推送成功并且能启动app的。

@andfly
Copy link
Author

andfly commented Mar 23, 2016

我看的JPushModule的源码,可能的原因是_isApplicationRunning这个方法验证app是否运行可能不准确,Android 4.1.2和4.2.1下,在app没有运行的情况下,也返回true,这与Android6.0版本返回结果不一致。所以,JPushModule中关于isAppRunning的判断,我改成了boolean isAppRunning = (gModules != null); 这样就解决了问题。

@happyming9527
Copy link

@andfly 不知能贴出安卓下的使用例子?如何获取到设备registerationId?使用如下代码,返回的id是空
JPush.getRegistrationID().then(function(result) {
alert(result)
})

@WhatAKitty
Copy link

WhatAKitty commented Apr 17, 2016

@andfly 是否可以提交PR?我的Android 4.4也碰到这个问题,暂时还没有用你的方式测试过;
刚刚测试了一下,使用了你说的方法,仍旧打不开app

@he5310
Copy link

he5310 commented May 9, 2016

@WhatAKitty 我也是遇到了这个问题,点击消息无法启动app(红米2a,安卓4.4),你解决了冒?

@he5310
Copy link

he5310 commented May 9, 2016

@WhatAKitty 刚刚解决了,在jpushModule里面去掉if(JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction()))外面的else就可以了。
其他的不变。

@tyao1
Copy link

tyao1 commented May 9, 2016

genymotion 4.3 系统无法启动

@cuitianze
Copy link

@he5310 去掉else能启动app,但是无法跳转到推送点击打开的详情页,这边的逻辑应该还是有问题,不知道你们解决了吗?
@andfly @WhatAKitty @XiaoBuu

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

6 participants