Android Open Source - issue-parser On Alarm Receiver

From Project

Back to project page issue-parser.


The source code is released under:

GNU General Public License

If you think the Android project issue-parser 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 de.dom.drupalit.backgroundservice;
/*w ww . j  av  a  2 s . c o m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;

public class OnAlarmReceiver extends BroadcastReceiver {
  public void onReceive(Context context, Intent intent) {
    SharedPreferences prefs = context.getSharedPreferences("drupal", Context.MODE_PRIVATE);
    boolean doAutoUpdate = prefs.getBoolean("notify", false);

    if (doAutoUpdate) {
      context.startService(new Intent(context, AppService.class));

Java Source Code List