Android Open Source - AppMan Package Intent Receiver






From Project

Back to project page AppMan.

License

The source code is released under:

GNU General Public License

If you think the Android project AppMan listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.blueodin.appman.content;
/*from   w  w  w .  j a v a  2 s. c  o m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;

public class PackageIntentReceiver extends BroadcastReceiver {
  private final AppListLoader mLoader;
  
  public PackageIntentReceiver(AppListLoader loader) {
    mLoader = loader;
    
    IntentFilter filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
    
        filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
        filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
        filter.addDataScheme("package");
        
        mLoader.getContext().registerReceiver(this, filter);
  }
  
  @Override
  public void onReceive(Context context, Intent intent) {
    mLoader.onContentChanged();
  }
}




Java Source Code List

com.blueodin.appman.MainActivity.java
com.blueodin.appman.content.AppListLoader.java
com.blueodin.appman.content.Application.java
com.blueodin.appman.content.PackageIntentReceiver.java
com.blueodin.appman.fragments.AppDetailFragment.java
com.blueodin.appman.fragments.AppListFragment.java