Question

In Android, I can monitor if certain events are triggered through the use of Broadcast Receivers. Are there any tools which let me view ALL events on an android device I am debugging instead of having to add a broadcast receiver to listen to them?

For example, in a Broadcast receiver, I can monitor for a call forwarding event. Is there a way to debug such events outside of having to write additional Android code? My goal is to test that certain events are triggered after UI state changes, and I am not seeing anything obvious in Logcat that communicates which events are being fired.

For example,

with call forwarding I only see cases like below in Logcat.

START u0 {act=android.intent.action.MAIN cmp=com.android.phone/.GsmUmtsCallForwardOptions}
Was it helpful?

Solution

The machine where you run an Android remotely can be any system supported by the Android SDK: Windows, Mac OS X, or Linux. The socket connections is forward from a specified local port to a specified remote port on the device instance.

It is recommended that this machine is on the same network as your development PC, for performance and configuration reasons, but it is also possible to use any remotely located machine if firewalls and routing are configured correctly. You have to follow specified steps that provide you with the necessary settings in your environment configuration that will allow you to have remote debugging.

Alternatively you can also consider using Google chrome remote debugging for Android. The jsHybugger can also offers you a similar tool that will equally allow Android remote debugging.

Indeed you can choose the approach that suits you better.

Otherwise, if what you meant is to listen to event in some application, then this has to be done by yourself by hand, including it to the respective app you want to listen for every single event. Further details on this direction you find here:

As you can see, Android has a lot of capabilities, but everything come at some cost - i.e. you have to code it. Otherwise, something that could be done according to your suggestion would be kind of an App or an API that would monitor every single event from all Apps currently in your mobile. But if this is what you really want, then in my view such approach would be cumbersome and overload your mobile.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top