【发布时间】:2014-06-20 12:56:08
【问题描述】:
我的 Urban Airship 推送在设备上随机失败。在失败的情况下,我可以看到底层 GCM 消息通过 wifi 正确到达设备,但是 GCM 消息被阻止,没有被转发到 Urban Airship 层(如您在以下日志中所见):
GCM : GCM message com.example.app
GCM/DMM : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.example.app (has extras) }
BroadcastQueue: Unable to launch app com.example.app/10055 for broadcast Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10 pkg=com.example.app (has extras) }: process is bad
请记住,我的大多数 UA 推送(到同一设备上的同一应用程序)都有效,因此这可能不是典型的配置问题。当我的推送成功时,日志如下所示:
GCM : GCM message com.example.app
UALib : PushService startService
UALib : Received GCM push
UALib : Incrementing notification id count UALib : Notification id: 1001
Example: Received intent: Intent { act=com.urbanairship.push.PUSH_RECEIVED flg=0x10 cmp=com.example.app/.ua.UaExtraReceiver (has extras) }
Example: ACTION_PUSH_RECEIVED. alert:i like potatoes, id:1001
顺便说一句,我在 Kitkat 平板电脑上使用 UrbanAirship 3.2.0 jar。
【问题讨论】:
-
我不知道答案,但错误中的
act=与良好收件人中的act=的值不同。是否有可能有 2 个意图接收器,其中一个有时会先处理?这比什么都更有头脑风暴。 -
关于“过程不好”,见stackoverflow.com/questions/3253676/…