title: Android: receiving intent sent by system ACTION_PACKAGE_RESTARTED
body: <p>I am new to android. I get completely stuck in using ACTION_PACKAGE_RESTARTED in my application</p>
  
  <p>I have removed pacakge from my emulator, also added using adb install but get nothing. Start an app. close that one and again start that app. nothing seems work for me. There is no log in logcat.</p>
  
  <p>Is there anything that i'm missing? Please help</p>
  
  <pre><code>public class RestartReceiver extends BroadcastReceiver {
  @Override
  public void onReceive(Context context, Intent intent) {
      String action= intent.getAction();
      Log.i("D", "Inside receiver");
  }
  </code></pre>
  
  <p>And here is the manifest file</p>
  
  <pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
      &lt;receiver android:name=".ReceiverTest"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.PACKAGE_REMOVED" /&gt;
              &lt;action android:name="android.intent.action.PACKAGE_ADDED" /&gt;
              &lt;action android:name="android.intent.action.ACTION_PACKAGE_RESTARTED" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  
  &lt;/application&gt;
  </code></pre>