Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing all broadcast events on Android

Tags:

is it somehow possible to show all broadcast events/intents that are triggered in android? I just want to know if I can quickly figure out if an application is using intents/broadcasts I can hook into. For most of the stock android applications I can read the source but is time consuming.

like image 602
plaisthos Avatar asked Jan 05 '11 01:01

plaisthos


People also ask

How do I receive broadcast messages on Android?

A BroadcastReceiver is a piece of code to which an app subscribes in order to get notified when an action happens. That action is in a form of an intent broadcast. When the right intent is fired, the receiver wakes up and executes. The “wakeup” happens in form of a onReceive() callback method.

How many broadcast receivers are there in Android?

There are two types of broadcast receivers: Static receivers, which you register in the Android manifest file. Dynamic receivers, which you register using a context.

What are Android system broadcasts?

The Android system automatically sends broadcasts when various system events occur, such as when the system switches in and out of airplane mode. The system sends these broadcasts to all apps that are subscribed to receive the event.

Does broadcast receiver work in background?

If you want a background receiver, you need to register it inside the AndroidManifest (with intent filter), add an IntentService and start it when you receive a broadcast in the receiver.


1 Answers

List all historical broadcasts and registered broadcast receivers with the following terminal command:

$ adb shell dumpsys activity broadcasts

like image 68
Rupert Rawnsley Avatar answered Oct 11 '22 07:10

Rupert Rawnsley