Uninstall Application Receiver
<p>I am using below code to get uninstall package broadcast receiver but I don't get any response. can any one say what's wrong with code.</p>

<pre><code>AndroidManifest.xml

&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="pack.test"
    android:versionCode="1"
    android:versionName="1.0" &gt;

    &lt;uses-sdk android:minSdkVersion="8" /&gt;


    &lt;application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" &gt;
        &lt;activity
            android:label="@string/app_name"
            android:name=".TestprojectActivity" &gt;
            &lt;intent-filter &gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;
        &lt;receiver android:name="UninstallApk"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.PACKAGE_REMOVED"/&gt;
                &lt;action android:name="android.intent.action.ACTION_POWER_CONNECTED"/&gt;
            &lt;/intent-filter&gt;
        &lt;/receiver&gt;
    &lt;/application&gt;

&lt;/manifest&gt;


UninstallApk.java

    import android.content.BroadcastReceiver;
    import android.content.Context;
    import android.content.Intent;
    import android.util.Log;
    import android.widget.Toast;

    public class UninstallApk extends BroadcastReceiver {

        @Override
        public void onReceive(Context context, Intent intent) {
            Log.i("DATA", "Apk uninstall");
            Toast.makeText(context,"APK uninstall",Toast.LENGTH_LONG).show();
        }

    }
</code></pre>

<p>When I plug in charger it shows me Toast but when I uninstall any other application form Application->manage Application it doesn't show any response.</p>

<p>Thank You.</p>
