![](/img/trans.png)
[英]Push Notifications using Urban Airship returns apID as null at the first launch
[英]Urban Airship push fails (unable to launch app - process is bad)
我的城市飛艇推送在設備上隨機失敗。 如果發生故障,我可以看到基本的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。
我遇到了類似的錯誤,並且必須保留FCM服務的導出狀態。 加:
android:exported="true"
或完全刪除導出的內容 。
我的服務現在看起來像這樣:
<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>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.