【问题标题】:Urban Airship push fails (unable to launch app - process is bad)Urban Airship 推送失败(无法启动应用程序 - 进程错误)
【发布时间】: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/…

标签: android urbanairship.com


【解决方案1】:

我遇到了类似的错误,我必须保持我的 FCM 服务导出。 添加:

android:exported="true"

或完全移除exported

我的服务现在看起来像这样:

    <service
        android:name=".service.MyFirebaseMessagingService"
        android:exported="true"
        >
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
    </service>
    <service
        android:name=".service.MyFirebaseInstanceIdService"
        android:exported="true"
        >
        <intent-filter>
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
        </intent-filter>
    </service>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-29
    • 1970-01-01
    • 2019-02-08
    • 1970-01-01
    • 2015-04-16
    • 2014-05-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多