views:

81

answers:

2

I want to look more into the workings of Android. More specifically I want to know how Applications (including Activities and Services) get launched by the system. I also want to be able to see who calls their lifecycle methods and how objects get allocated and recycled.

I have downloaded the Android source from git and browsed around for a bit, but since it's a little large any pointer would be appreciated.

Thanks!

+1  A: 

You can start looking in android.app.ActivityThread it handles most of the lifecycle calls, i.e., calling onCreate, onPause, etc. Also android.app.ActivityManager is a good starting point as well.

Qberticus
+1  A: 

One way to find out what is happening around an area of interest is to create a small test application, and then use the eclipse debugger. You can put break points in the areas of interest, like the lifecycle methods. Then you can see the callers, and step through the code line by line.

Mayra