Monitoring Android activity life-cycle callbacks
<p>I want to be able to launch an arbitrary app from a program (e.g. by executing the command "am start ", then have the program be notified in some way when the life-cycle callbacks (e.g. onStart, onStop) in the app's activity are called.</p>

<p>The problem is that I can not rely on having the app's source code, so can not modify it to add code to the app's implementations of those callbacks.</p>

<p>Is there any way to do this without modifying the Android activity manager, or writing a custom activity manager?</p>
