How can I write a Broadcast Receiver that will be invoked when user clicks on any application icon?
<p>How can I write a Broadcast Receiver that will be invoked when user clicks on any application icon?</p>

<p>I tried by writing:</p>

<pre><code>&lt;receiver android:name = "myreceiver"&gt; 
    &lt;intent-filter&gt; 
        &lt;action android:name = "android.intent.action.MAIN"&gt; 
    &lt;/intent-filter&gt; 
&lt;/receiver&gt; 
</code></pre>

<p>But it is not called. </p>

<p>I tried, 
by using <code>Packagemanager</code> I will get <code>ApplicationInfo</code>. From that I can know all the application starting activity name and package names. I thought I can use them to registerReceiver
and my receiver will listen by its launching activity and package name. 
But I strucked. I am unable to do that. I think I lost the way.</p>

<p>What can I do to solve this problem?</p>
