推不是每个人都收到通知 [英] push notifications not received by everyone

查看:140
本文介绍了推不是每个人都收到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用GCM服务,推送通知发送给所有用户。但是,我只要我的应用程序更新的1.3至1.4遇到了问题是,我们的通知没有达到这一更新的应用程序,但只达到了安装的第一次应用程序的用户的用户。

I am using GCM service to send push notification to all the users. But the problem I came across as soon as I updated the app from 1.3 to 1.4 is that our Notifications are not reaching the users that updated the app but are only reaching the users that installed the app for the first time.

https://medium.com/@murki/gcm-push-notifications-registration-done-right-7aba759d1d55

通过上面文章中,我证实,我们需要重新一旦应用更新注册GCM去。因此,按照教程我写了一个服务,再重新注册该设备。

Going by the above article I confirmed that we need to re register the GCM as soon as the app is updated. So following the tutorial I wrote a SERVICE that re registers the device again.

我尝试了在GCM一个示范项目,并了解设备的GCM ID将保持相同的,无论多少次,我注册。但是还是我的APP我重新注册的更新GCM。现在的问题是,我的通知走出去只有几个人以及他们的休息都无法接收通知。

I tried out a demo project on GCM and understood that the GCM id for the device would remain the same no matter how many times I register. But still for my APP I re registered the GCM on update. Now the problem is that My notifications are going out to only a few of them and the rest of them are unable to receive the notifications.

问题的列表:
1)我不知道其中许多用户中收到通知,哪些不是。那么,有没有一种方法,我们可以找出哪些收到通知的用户。

List of problems : 1) I dont know which among the many users received the notification and which not. So is there a way we can identify the users which received the notifications.

2)我如何发送通知给用户的其余部分。

2) How do I send the notifications to the rest of the users.

3)什么是永久的解决方案,这将确保我们在通知到达所有的用户的问题。

3)What is the permanent solution to the problem which will ensure us that the notifications reach all the users.

推荐答案

雅我解决了这个问题
这不是GCM的问题,这是从我的身边错误。一旦GCM收到我打我自己的服务器,以获得新的通知的详细信息。本来应该是撞到了URL中包含的用户ID,我存储在静态变量中的用户ID时,应用程序并不运行,所以在URL中的用户ID被替换为空而无法访问。所以,我从来没有得到通知的详细信息。

Ya i solved the problem It was not the GCM issue, it was an error from my side. Once the GCM is received I have to hit my own server to get the details of the new notifications. The URL that was supposed to be hit contained the USER ID and i stored the user id in static variable which are not accessible when the app is not running SO the USER ID in the URL was replaced by null. So i never got the details of the notification.

这篇关于推不是每个人都收到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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