简体   繁体   English

Appcelerator Android CloudPush-调用了回调,但未清除通知

[英]Appcelerator Android CloudPush - callback is called but notification isn't cleared

I tested with SDK 5.1.1 on my Android 5.0.2 - HTC One M7. 我在Android 5.0.2-HTC One M7上使用SDK 5.1.1进行了测试。

The issue: 问题:

With ti.cloudpush, if I receive a notification but leave it there without clicking it. 使用ti.cloudpush,如果我收到通知,但将其保留在此处而不单击它。 Instead I launch my app from launcher. 相反,我从启动器启动我的应用程序。 Then the callback function is called but the notification isn't cleared. 然后将调用回调函数,但不会清除通知。 If later I click the notification, it will launch the app but no callback is called. 如果稍后单击通知,它将启动应用程序,但不会调用回调。

Can anyone confirm this behavior? 谁能确认这种行为? I filed a jira ticket here , but Appc Team kept saying they couldn't re-produce. 在这里提交了一张吉拉票,但是Appc团队一直说他们无法复制。

Sample code and my configuration are in the jira ticket above. 示例代码和我的配置在上面的jira票证中。 Please test and let me know if it's just me or a bug. 请进行测试,并让我知道是我还是错误。 Thanks! 谢谢!

解决方法是,您可以通过从回调中调用http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.NotificationManager-method-cancelAll来清除通知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM