// 取消已经注册的与参数匹配的闹铃 void cancel(PendingIntent operation) //注册一个新的闹铃 void set( int type, long triggerAtTime, PendingIntent operation) //注册一个重复类型的闹铃 void setRepeating( int type, long triggerAtTime, long interval, PendingIntent operation) //设置时区 void setTimeZone(String timeZone)
// 取消已经注册的与参数匹配的闹铃 void cancel(PendingIntent operation) //注册一个新的闹铃 void set(int type, long triggerAtTime, PendingIntent operation) //注册一个重复类型的闹铃 void setRepeating(int type, long triggerAtTime, long interval, PendingIntent operation) //设置时区 void setTimeZone(String timeZone)
public static final int ELAPSED_REALTIME // 当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是相对时间,是从系统启动后开始计时的,包括睡眠时 间,可以通过调用SystemClock.elapsedRealtime()获得。系统值是3 (0x00000003)。 public static final int ELAPSED_REALTIME_WAKEUP //能唤醒系统,用法同ELAPSED_REALTIME,系统值是2 (0x00000002) 。 public static final int RTC //当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是绝对时间,所用时间是UTC时间,可以通过调用 System.currentTimeMillis()获得。系统值是1 (0x00000001) 。 public static final int RTC_WAKEUP //能唤醒系统,用法同RTC类型,系统值为 0 (0x00000000) 。 Public static final int POWER_OFF_WAKEUP //能唤醒系统,它是一种关机闹铃,就是说设备在关机状态下也可以唤醒系统,所以我们把它称之为关机闹铃。使用方法同RTC类型,系统值为4(0x00000004)。
public static final int ELAPSED_REALTIME //当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是相对时间,是从系统启动后开始计时的,包括睡眠 时间,可以通过调用SystemClock.elapsedRealtime()获得。系统值是3 (0x00000003)。 public static final int ELAPSED_REALTIME_WAKEUP //能唤醒系统,用法同ELAPSED_REALTIME,系统值是2 (0x00000002) 。 public static final int RTC //当系统进入睡眠状态时,这种类型的闹铃不会唤醒系统。直到系统下次被唤醒才传递它,该闹铃所用的时间是绝对时间,所用时间是UTC时间,可以通过调用 System.currentTimeMillis()获得。系统值是1 (0x00000001) 。 public static final int RTC_WAKEUP //能唤醒系统,用法同RTC类型,系统值为 0 (0x00000000) 。 Public static final int POWER_OFF_WAKEUP //能唤醒系统,它是一种关机闹铃,就是说设备在关机状态下也可以唤醒系统,所以我们把它称之为关机闹铃。使用方法同RTC类型,系统值为 4(0x00000004)。
Intent intent = new Intent(AlarmController. this , OneShotAlarm. class ); PendingIntent sender = PendingIntent.getBroadcast(AlarmController.this , 0 , intent, 0 );
Intent intent = new Intent(AlarmController.this, OneShotAlarm.class); PendingIntent sender = PendingIntent.getBroadcast(AlarmController.this, 0, intent, 0);
// The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this , 0 , new Intent( this , AlarmService. class ), 0 );
// The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, AlarmService.class), 0);
// Create an IntentSender that will launch our service, to be scheduled // with the alarm manager. mAlarmSender = PendingIntent.getService(AlarmService.this , 0 , new Intent(AlarmService. this , AlarmService_Service. class ), 0 );
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有