1
我遇到了麻烦,开机后无法再正确设置闹钟。BroadcastEvent,闹钟功能android
public void onReceive(Context context, Intent intent) {
if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())){
if(fm.getAlarmBool()){
time = fm.getAlarmTimeLong();
reminder.startAlarm(time);
}
}
这是我想在启动后运行的方法。我已经在Android清单中添加了权限,但我无法使其正常工作。怎么了?
请从提醒中添加一些附加代码cos,fm不可能回答。 – Mahesh
提醒类使用日历来设置一个固定的时间,例如,如果我设置时间15:20,那么它在那个时候设置一个闹钟事件,fm只是将一个字符串写入一个文件,然后从文件中提取信息。在这种情况下,它会写入事件发生的时间。在我看来,它不需要解决这个问题。 – Anticipating