Android Open Source - ClinicalTrialTracker Boot Receiver






From Project

Back to project page ClinicalTrialTracker.

License

The source code is released under:

Apache License

If you think the Android project ClinicalTrialTracker 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.yuanwei.android;
/*  w ww.j av  a 2  s  . c om*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * This BroadcastReceiver automatically (re)starts the alarm when the device is
 * rebooted. This receiver is set to be disabled (android:enabled="false") in the
 * application's manifest file. When the user sets the alarm, the receiver is enabled.
 * When the user cancels the alarm, the receiver is disabled, so that rebooting the
 * device will not trigger this receiver.
 */
// BEGIN_INCLUDE(autostart)
public class BootReceiver extends BroadcastReceiver {
    AlarmReceiver alarm = new AlarmReceiver();
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
        {
            alarm.setAlarm(context);
        }
    }
}
//END_INCLUDE(autostart)





Java Source Code List

com.yuanwei.android.AlarmReceiver.java
com.yuanwei.android.BootReceiver.java
com.yuanwei.android.BroadcastNotifier.java
com.yuanwei.android.ClinicalTrialsFeedBuilder.java
com.yuanwei.android.ComparatorArticle.java
com.yuanwei.android.Constants.java
com.yuanwei.android.DrawerExpandableListActivity.java
com.yuanwei.android.RssDialogManager.java
com.yuanwei.android.RssDownloadingSchedulingService.java
com.yuanwei.android.adapter.ArticleExpandableListAdapter.java
com.yuanwei.android.adapter.RssChannelListAdapter.java
com.yuanwei.android.constants.ClinicalTrialConditions.java
com.yuanwei.android.constants.ClinicalTrialDrugs.java
com.yuanwei.android.constants.ClinicalTrialSponsor.java
com.yuanwei.android.db.DbAdapter.java
com.yuanwei.android.db.FeedProvider.java
com.yuanwei.android.listview.widget.DontPressWithParentButton.java
com.yuanwei.android.listview.widget.DontPressWithParentCheckBox.java
com.yuanwei.android.rss.RssDownloadingTask.java
com.yuanwei.android.rss.RssRefreshTask.java
com.yuanwei.android.rss.domain.Article.java
com.yuanwei.android.rss.domain.FeedMessage.java
com.yuanwei.android.rss.domain.RSSFeed.java
com.yuanwei.android.rss.domain.RssChannel.java
com.yuanwei.android.rss.parser.RssHandler.java
com.yuanwei.android.util.DateConverter.java