4

The Google Analytics SDK documentation mentions the following:

Only one BroadcastReceiver class can be specified per application. Should you need to incorporate two or more BroadcastReceivers from different SDKs, you will need to create your own BroadcastReceiver class that will receive all broadcasts and call the appropriate BroadcastReceivers for each type of Broadcast.

https://developers.google.com/analytics/devguides/collection/android/devguide

Is this still true as of ICS and higher? In my current application I actually do have two receivers already and that seems to work just fine.

4

1 回答 1

3

I'm assuming this means that you can not have more than one BroadcastReceiver that listens for the same specific broadcast Inent (via intent-filter). I'd have to try this to see if it works.

In any case, we've had applications with many BroadcastReceivers since Android 1.6, so it is definitely possible to have many BroadcastReceivers in a single Application.

于 2012-08-26T21:29:24.150 回答