Android package replace intent
<p>In my application I am listening for following 3 intents by using broadcast receiver.</p>

<pre><code>ACTION_PACKAGE_REPLACED
ACTION_PACKAGE_REMOVED
ACTION_PACKAGE_ADDED
</code></pre>

<p>The problem is that whenever I reinstall some application First I get 
<code>ACTION_PACKAGE_REMOVED</code> then I get <code>ACTION_PACKAGE_ADDED</code> then I get <code>ACTION_PACKAGE_REPLACED</code>.</p>

<p>Is there any way to know that in reinstallation of application the <code>ACTION_PACKAGE_REMOVED</code> and <code>ACTION_PACKAGE_ADDED</code> intents belongs to <code>ACTION_PACKAGE_REPLACED</code>. I mean these are not the intents when only application is removed and installed respectively.</p>

<p>Thx
Dalvin</p>
