package net.micode.notes.ui;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
 * @Package:        net.micode.notes.ui
 * @ClassName:      AlarmReceiver
 * @Description:    闹钟接收器，接收到闹钟触发的广播后启动AlarmAlertActivity进行闹钟提醒
 * @Author:         YangYizhe
 * @CreateDate:     12/17/2023 10:02 AM
 * @UpdateUser:     none
 * @UpdateDate:     12/17/2023 10:02 AM
 * @UpdateRemark:   none
 * @Version:        1.0
 */
public class AlarmReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        intent.setClass(context, AlarmAlertActivity.class);//启动AlarmAlertActivity
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);//启动闹钟提醒界面
    }
}
 