Tag: 谷歌云消息

Parse.com推送通知延迟或仅在Android应用程序重新启动后

当测试parse.com推送通知(从afterCave上的CloudCode发送)时,有一些奇怪的事情。 有时Android应用程序会立即得到通知(低于1秒),但有些时候会延迟多秒。 重新启动应用似乎会导致尚未收到的通知立即出现。 可能是什么原因? 这可能是一个错误,例如,parse.com服务? 可以发送或接收多少通知(每单位时间)是否有限制? 问题同时发生在自定义的BroadcastReceiver和默认的系统栏通知上。 服务器端JavaScript CloudCode: Parse.Cloud.afterSave("Timer", function(request) { // from https://www.parse.com/docs/js/guide#cloud-code console.log("Before Parse.Push.send — without alert"); var query = new Parse.Query(Parse.Installation); // http://blog.parse.com/announcements/pushing-from-the-javascript-sdk-and-cloud-code/ : Parse.Push.send({ where: query, data: { //alert: "afterSave on a Timer — Parse.Push.send" } }); console.log("After Parse.Push.send — without alert"); }); Kotlin中的自定义广播接收器(但问题也没有自定义BroadcastReceiver): override fun onCreate(savedInstanceState: Bundle?) { super<BaseActivity>.onCreate(savedInstanceState) […]