I’ve been trying to teach myself Android, and have just learned that I’ve been creating multiple instances of the same Activity in my code. Conceptually I know it’s there, but is there any tool (like DDMS, for example) that I can use to see that I’ve created multiple instances?
This would also help me find out if my experiments with Intent flags are working or not.
You can visualize the current activity stack with the following command:
It will show you something like this:
Some resources:
Android Debug Bridge (ADB) on Android developer.
Android Tools by Romain Guy. (The entire talk isn’t about ADB and what you can do with it, but it’s worth taking some time watching since he introduces and demonstrates many debugging tools).