当App未运行时,GCM通知未收到 [英] GCM notification is not received when App is not running

查看:87
本文介绍了当App未运行时,GCM通知未收到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实施了GCM,除一个问题外,它工作正常。

如果应用程序在前台或后台通知中工作,则会被应用程序使用。但是,如果在应用程序中收到的通知被终止。只比顶部栏显示通知。但是,即使用户启动应用程序,应用程序也无法找到它。



我注意到重新启动设备后收到消息时,消息中心显示消息,但应用程序未找到消息。比开始应用程序之后,它开始接收消息。

解决方案


在上面的栏中。


你自己把那个通知放在那里。 GCM不会自行显示 Notification


但是应用程序无法找到它即使用户启动应用程序。


应用程序发现它显示通知


i'v implemented GCM and it works fine except one issue.

if application works in foreground or background notification are consumed by application. However, if notification received while application is killed. Than notification only shown in top bar. But application cant find it even when user launch app.

I notice when message is recived after rebooting device, message is shown ony on message center, but its not found by application. Than, after application started, than, it start to receive messages.

解决方案

Than notification only shown in top bar.

You put that Notification there yourself. GCM does not display a Notification on its own.

But application cant find it even when user launch app.

The application "found" it to display the Notification.

这篇关于当App未运行时,GCM通知未收到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆