Back to project page SandB-Android.
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.
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); } } }