How to know which package is launching?
<p>I have downloaded 'Application Protection' application from market.
It allows me to protect to open any application with password. </p>

<p>i.e. I have protected 'ConnectionLost' Application with Application Protection.</p>

<p>Now when I open 'ConnectionLost' App. I found below log in Logcat.</p>

<p>Line 1-<strong>Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.connectionlost/.ConnectionLost } from pid 5746</strong></p>

<p>Line 2-<strong>Starting: Intent { flg=0x10000000 cmp=com.ruimaninfo.approtect/.ui.ScreenLocker } from pid 5494</strong> </p>

<p>It means first my application launch and after 'applicaton protection' launch it's own activity.</p>

<p>So my question is</p>

<p><strong>How 'Application protection(Downlaode from market)' know that which package is launched?
and As programmer how can we know the same thing?</strong></p>

<p>Thank You.</p>
