title: App upgrade after onReceive() method is never get called
body: <p>I want start my application after upgrade.
  I used both android.intent.action.MY_PACKAGE_REPLACED and android.intent.action.PACKAGE_REPLACED actions.But it's never calling to my onReceive method.
  Min SDK version of my app is 21.
  This app does not contain activity class.Only a service.
  I created this app for launching my another android application in this device.</p>
  
  <p>Here is Manifest code</p>
  
  <pre><code>&lt;application
          android:name=".DeviceAdminApplication"
          android:allowBackup="true"
          android:label="@string/app_name"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
  
          &lt;service
              android:name=".SchedulerJobService"
              android:permission="android.permission.BIND_JOB_SERVICE" /&gt;
          &lt;receiver
              android:name=".AdminBroadcastReceiver"
              android:enabled="true"
              android:exported="true"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
  
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
              &lt;/intent-filter&gt;
  
          &lt;/receiver&gt;
          &lt;receiver android:name=".AppInstalledReceiver"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.PACKAGE_INSTALL" /&gt;
                  &lt;action android:name="android.intent.action.PACKAGE_ADDED" /&gt;
                  &lt;data android:scheme="package"/&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MY_PACKAGE_REPLACED" /&gt;
                  &lt;data android:scheme="package" android:path="com.pnct.agent"/&gt;
              &lt;/intent-filter&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.PACKAGE_REPLACED" /&gt;
                  &lt;data android:scheme="package" android:path="com.pnct.agent"/&gt;
              &lt;/intent-filter&gt;
          &lt;/receiver&gt;
      &lt;/application&gt;
  </code></pre>
  
  <p>here is the onReceive method</p>
  
  <pre><code>public class AppInstalledReceiver extends BroadcastReceiver {
      @Override
      public void onReceive(Context context, Intent intent) {
          Log.d(Constants.LOGTAG, "inside on receive");
          Log.d(Constants.LOGTAG, "action:"+intent.getAction());
          if(intent.getAction().equalsIgnoreCase("android.intent.action.MY_PACKAGE_REPLACED") ||
                  (intent.getAction().equalsIgnoreCase("android.intent.action.PACKAGE_REPLACED"))){
              Log.d(Constants.LOGTAG, "package replaced");
          }}
  </code></pre>
  
  <p>If I install any other application,then onReceive method get called.
  Please help me to solve this problem
  thanks.</p>