- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我使用以下方式获得了注册 ID:
String regid = (GoogleCloudMessaging.getInstance(this)).register("My_Sender_ID");
并将其存储在我服务器上的数据库中。稍后当应用程序被卸载并且我尝试发送一条消息时,我预计会收到一条 NotRegistered 错误消息,查看它我将从数据库中删除相应的 ID。
但问题是它仍然像任何其他成功案例一样返回一个message_id。我想再测试一段时间,等了一个小时,现在我收到了正确的消息。
[error] => NotRegistered
那么,这种延迟是预期的吗?
谢谢
最佳答案
是的,这种延迟是意料之中的。
在卸载您的应用程序后第一次尝试发送消息时,GCM 服务器尝试将其发送到设备并发现您的应用程序不再在该设备上注册 GCM。
在卸载后第二次尝试发送消息时,您收到了 NotRegistered
错误,因为这次 GCM 服务器知道此注册 ID 不再注册。
您无需等待一个小时即可再次尝试发送。
Note: When users uninstall an application, it is not automatically unregistered on GCM. It is only unregistered when the GCM server tries to send a message to the device and the device answers that the application is uninstalled or it does not have a broadcast receiver configured to receive com.google.android.c2dm.intent.RECEIVE intents. At that point, your server should mark the device as unregistered (the server will receive a NotRegistered error).
(引自here)
关于android - 没有针对已卸载的 registration_id 的 NotRegistered 消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16942973/
4 月,我们开始收到大量“NotRegistered”错误。根据 Google 文档,只有在卸载或更新应用程序时才会发生这种情况,但在我们的例子中,即使设备完全没有发生任何事情, token 也会在大
我正在使用 Android GCM 推送服务,它在一段时间内运行良好,但是如果我让我的应用程序空闲几分钟,或者当我在代码中进行一些修改后重新运行它时,我没有收到任何消息并且 GCM 服务器给我这个错误
感谢您阅读我的文章: 我让 C2DM 在我的应用程序中完美运行。为了测试不同的场景,我注销了我的手机,这样它就不会再收到推送,然后我重新注册了我的手机。由于我已经重新注册推送不起作用。 以下是我遇到的
我是根据 GCM documentation 学习的如果由于应用程序在设备上卸载或其他原因导致设备不再注册而导致发送消息失败,它将返回错误值“NotRegistered”。 我的问题是,响应是否还会包
在 django shell 中运行此脚本: import processors.topics.tasks as t t.test.delay() 给出这个错误: NotRegistered: 'pr
我正在尝试获取 celery 的官方教程,但一直出现此错误: D:\test>celery -A tasks worker --loglevel=info -------------- celery@
我遇到了使用 FCM 向 Android 发送推送通知的奇怪问题。 Goal :- Having error while sending push notification 下面是我确实有向 Andr
我已经使用 GCM 很长时间了。有一天突然断了。问题是我发送的第一个推送返回成功状态,但该应用程序没有收到任何推送。我发送的第二次推送失败并出现 NotRegistered 错误。我重新安装应用程序:
我的应用程序不会收到来自 GCM 的任何消息,当生成号码并通过联系 Activity 发送它时,我在 mysql 中收到它,如下所示 #######:############ #######aWvJR
我正在尝试通过 Java 服务器通过以下代码向已注册的设备发送推送通知: import java.io.IOException; import java.util.ArrayList; import
我正在使用 Android GCM 推送服务,它在一段时间内运行良好,但在这期间出现故障。 详情如下如果我让我的应用程序空闲一段时间,然后服务器突然从 Google GCM 收到 NotRegiste
这是我为 GCM 创建的示例服务器。 class Program2 { public static string SenderId = "318115091714"; public s
我们刚刚从 GCM 迁移到 FCM。为了跟踪卸载,我们向所有用户发送静默通知,如果我们收到“NotRegistered”响应,我们将用户视为已卸载。从最近几天开始,我们开始收到一些尚未卸载该应用的用户
我按照 firebase.google.com 上的说明在我的项目中添加了 FCM。 一切正常,我的日志中收到消息“FirebaseApp 初始化成功”和新 token 。但它不起作用......只有
我有一个客户端 celery 应用程序为工作人员(使用 Redis)发布任务,它工作正常。客户端和工作应用程序都使用相同的配置: app = Celery('clientApp', broker='r
我启动了这个Turial,Here 得到这个错误 **mongoengine.errors.NotRegistered:** `Comment` has not been registered in
虽然我在使用 Android 时从未遇到过任何问题,但我所有向 iOS 发送通知的尝试都失败了。一切都已正确设置,但 gcm 端点始终为每个 iOS reg_id 返回“NotRegistered”,
我使用以下方式获得了注册 ID: String regid = (GoogleCloudMessaging.getInstance(this)).register("My_Sender_ID"); 并
我正在 Xamarin Android 中开发一个应用程序,对于我正在使用 FCM 预发布包的通知:https://www.nuget.org/packages/Xamarin.Firebase.Me
我正在尝试弄清楚如何获得 Google GCM 响应(即 NotRegistered 错误),以便我可以从用户帐户中删除 GCM 信息。 来自 GCM Archetecture Overview (关
我是一名优秀的程序员,十分优秀!