Nakayama
Nakayama

Reputation: 153

Broadcast receiver being discarded

I have the following code in my android manifest:

<receiver android:name="com.DDD.CCC.BBB.AAA" >
    <intent-filter>
        <action android:name="android.intent.action.SIM_STATE_CHANGED" />
    </intent-filter>
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>

On the first boot, sometimes the android.intent.action.SIM_STATE_CHANGED is not received but sometimes it does.

The event log, when the broadcast is received shows that:

01-16 05:34:01.649  1230  1274 I am_proc_start: [0,3811,1000,com.DDD.CCC,content provider,com.DDD.CCC/.databases.XXX]
01-16 05:34:01.659  1230  2798 I am_proc_bound: [0,3811,com.DDD.CCC]
01-16 05:34:05.389  1230  1561 I am_kill : [0,3811,com.DDD.CCC,15,empty #14]
01-16 05:34:05.389  1230  1242 I am_proc_died: [0,3811,com.DDD.CCC]
01-16 05:34:11.899  1230  3470 I am_proc_start: [0,4642,1000,com.DDD.CCC,broadcast,com.DDD.CCC/.service.AAA]
01-16 05:34:11.929  1230  1561 I am_proc_bound: [0,4642,com.DDD.CCC]
01-16 05:34:16.579  1230  1242 I am_kill : [0,4642,com.DDD.CCC,15,empty #14]
01-16 05:34:16.609  1230  1568 I am_proc_died: [0,4642,com.DDD.CCC]
01-16 05:34:16.859  1230  1568 I am_proc_start: [0,5079,1000,com.DDD.CCC,broadcast,com.DDD.CCC/.service.AAA]
01-16 05:34:16.889  1230  1274 I am_proc_bound: [0,5079,com.DDD.CCC]
01-16 05:34:16.979  1230  2641 I notification_enqueue: [com.DDD.CCC,262082,NULL,0,Notification(pri=0 contentView=com.DDD.CCC/0x1090064 vibrate=null sound=null defaults=0x0 flags=0x10 kind=[null])]
01-16 05:34:19.559  1230  2798 I am_kill : [0,5079,com.DDD.CCC,15,empty #14]
01-16 05:34:19.559  1230  2642 I am_proc_died: [0,5079,com.DDD.CCC]

when it does not receive, it shows the following:

01-16 05:41:29.809  1232  1506 I am_proc_start: [0,3793,1000,com.DDD.CCC,content provider,com.DDD.CCC/.databases.AAA]
01-16 05:41:29.809  1232  2338 I am_proc_bound: [0,3793,com.DDD.CCC]
01-16 05:41:36.939  1232  3326 I am_kill : [0,3793,com.DDD.CCC,15,empty #14]
01-16 05:41:36.949  1232  3325 I am_proc_died: [0,3793,com.DDD.CCC]
01-16 05:41:37.879  1232  1269 I am_proc_start: [0,4337,1000,com.DDD.CCC,broadcast,com.DDD.CCC/.service.AAA]
01-16 05:41:37.899  1232  2339 I am_proc_bound: [0,4337,com.DDD.CCC]
01-16 05:41:41.359  1232  1244 I am_kill : [0,4337,com.DDD.CCC,15,empty #14]
01-16 05:41:41.369  1232  2355 I am_proc_died: [0,4337,com.DDD.CCC]
01-16 05:41:41.369  1232  2355 I am_broadcast_discard_app: [0,1109557712,android.intent.action.SIM_STATE_CHANGED,21,ResolveInfo{428381d0 com.DDD.CCC/.service.AAA m=0x108000}]

Yes, i've seen that the process is dead and it is not restarted again. Does anyone has any clues of why this is happening?

Thank you

Upvotes: 0

Views: 2572

Answers (1)

 1004lucifer
1004lucifer

Reputation: 139

After receiving a first or second broadcast If you onReceive process takes longer, the broadcast will be the third generation ANR has confirmed that am_broadcast_discard_app occurred.

Upvotes: 1

Related Questions