Android get PID of other applications
<p>I would like to be able to start an activity or service and get the PID of that process as quickly as possible, immediately would be the best case scenario. Do I have any options other than browsing the /proc directory, which then leads to a variable-amount-of-time race condition between the time the activity/service is launched and the time it takes me to find what I want in the proc directory and begin observing?</p>
