设定闹钟的方法
来源:互联网 发布:Linux集群怎么安字体 编辑:程序博客网 时间:2024/05/10 14:18
public void sendAlarmEveryday(Context context, int hour, int minute,String action,int requestCode) { AlarmManager alarmManager = (AlarmManager) AppApplication.instance.getSystemService(Context.ALARM_SERVICE); Calendar calendar = Calendar.getInstance(Locale.getDefault()); calendar.set(Calendar.HOUR_OF_DAY, hour); calendar.set(Calendar.MINUTE, minute); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.MILLISECOND, 0); Intent intent = new Intent(); intent.setAction(action); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, requestCode, intent, PendingIntent.FLAG_CANCEL_CURRENT); alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);}
0 0
- 设定闹钟的方法
- 闹钟相关设定及闹钟的息屏唤醒
- 怎样解决HTC手机设定闹钟不响的问题。
- android 闹钟设置的几种方法
- Apache2+ssl 的设定方法
- spread的数据源设定方法
- CSS边框的设定方法
- delphi热键设定的方法
- delphi热键设定的方法
- delphi热键设定的方法
- [电源、屏保、闹钟、日程、墙纸] UILocalNotification实现本地的闹钟提醒的方法。
- [电源、屏保、闹钟、日程、墙纸] UILocalNotification实现本地的闹钟提醒的方法。
- 闹钟方法解析
- UILocalNotification实现本地的闹钟提醒的方法
- UILocalNotification实现本地的闹钟提醒的方法。
- UILocalNotification实现本地的闹钟提醒的方法
- UILocalNotification实现本地的闹钟提醒的方法
- 分享别人的两种闹钟的实现方法
- Python 之 多线程
- 第三方Charts绘制图表四种形式:饼状图,雷达图,柱状图,直线图
- Android四大组件之四:ContentProvider
- 一个项目搞明白Android 启动模式和taskAffinity
- java.lang.IllegalStateException: beginBroadcast() called while already in a broadcast
- 设定闹钟的方法
- Unique Paths II
- 程序猿练级
- BRVAH分组功能原理分析
- CSS 的优先级机制
- 自执行匿名函数
- 计算机中的位bit字节Byte帧frame关系
- Android CalendarView 控件的 getDate() 方法有错误
- 模拟实现strlen