Android Open Source - SandB-Android Xml Pull Receiver






From Project

Back to project page SandB-Android.

License

The source code is released under:

GNU General Public License

If you think the Android project SandB-Android 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 edu.grinnell.sandb.xmlpull;
// w ww. java2s .c  o  m
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import edu.grinnell.sandb.ArticleListFragment;
import edu.grinnell.sandb.MainActivity;

public class XmlPullReceiver extends BroadcastReceiver {

  private static final String TAG = "Receiver";

  public static final String FEED_PROCESSED = "edu.grinnell.sandb.xmlpull.FEED_PROCESSED";
  
  @Override
  public void onReceive(Context context, Intent intent) {
    Log.i(TAG, "Intent Received: " + intent.getAction());
    if (FEED_PROCESSED.equals(intent.getAction())) {
      Intent i = new Intent(context, MainActivity.class);
      i.setAction(ArticleListFragment.UPDATE);
      i.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | 
             Intent.FLAG_ACTIVITY_CLEAR_TOP | 
             Intent.FLAG_ACTIVITY_NEW_TASK);
      
      context.startActivity(i);
    }
  }

}




Java Source Code List

edu.grinnell.sandb.ArticleDetailActivity.java
edu.grinnell.sandb.ArticleDetailFragment.java
edu.grinnell.sandb.ArticleListAdapter.java
edu.grinnell.sandb.ArticleListFragment.java
edu.grinnell.sandb.CommentListAdapter.java
edu.grinnell.sandb.CommentListFragment.java
edu.grinnell.sandb.ImagePagerActivity.java
edu.grinnell.sandb.MainActivity.java
edu.grinnell.sandb.MainPrefs.java
edu.grinnell.sandb.ScarletAndBlackApplication.java
edu.grinnell.sandb.Utility.java
edu.grinnell.sandb.comments.CommentStorageHelper.java
edu.grinnell.sandb.comments.CommentTable.java
edu.grinnell.sandb.comments.Comment.java
edu.grinnell.sandb.data.ArticleStorageHelper.java
edu.grinnell.sandb.data.ArticleTable.java
edu.grinnell.sandb.data.Article.java
edu.grinnell.sandb.img.BodyImageGetter.java
edu.grinnell.sandb.img.ImageStorageHelper.java
edu.grinnell.sandb.img.ImageTable.java
edu.grinnell.sandb.img.Image.java
edu.grinnell.sandb.img.UniversalLoaderUtility.java
edu.grinnell.sandb.xmlpull.CommentParseTask.java
edu.grinnell.sandb.xmlpull.XmlCheckAgeTask.java
edu.grinnell.sandb.xmlpull.XmlFetchTask.java
edu.grinnell.sandb.xmlpull.XmlParseTask.java
edu.grinnell.sandb.xmlpull.XmlPullReceiver.java
edu.grinnell.sandb.xmlpull.XmlPullService.java