简体   繁体   中英

Urban Airship push fails (unable to launch app - process is bad)

My Urban Airship pushes are randomly failing on the device. In the case of failure, I can see the underlying GCM message correctly reaching the device over wifi, but that GCM message is being stymied without being forwarded up to the Urban Airship layer (as you can see in the following logs):

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

Bear in mind, most of my UA pushes (to the same app on the same device) work, so this probably not a typical configuration problem. When my pushes succeed, the log looks like this:

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

Btw, I'm using UrbanAirship 3.2.0 jar on a Kitkat tablet.

I had this similar error, and I had to keep my FCM Service exported. add:

android:exported="true"

or remove exported altogether.

My services now looks like this:

    <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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM