I'm currently debugging my app which is quite complex and has up to 5 activity levels. In order to detect memory leaks (i.e. activities that aren't removed from memory even finish() is called, due to some references held somewhere) I want to check which activities are still alive in memory.
Currently I create hprof dumps, but it's not very convenient, cause every time I need to mount the sdcard, copy the hprof dump file from the sdcard to my PC, etc.
(Side note: I already tried to automate the pulling of my hprof file more easily, but I'm on an unrooted device and adb pull <hprof file>
won't let me / no permission.)
Therefore I am wondering, if all I want to know is IF and WHICH activities are still currently alive in my memory, is there a way through the Android API or any other way on-the-fly with which I can achieve this (list all alive activities of my app), programatically.