1?hourOfDay+"":"0"+hourOfDay;StringtempMinute=(minute+"").length()>1?minute+"":"0"+minute;-IMDN开发者社群-imdn.cn"> 1?hourOfDay+"":"0"+hourOfDay;StringtempMinute=(minute+"").length()>1?minute+"":"0"+minute; - IMDN开发者社群-imdn.cn">
登录
首页 » Android » Android 创建备忘录及闹铃提醒的例子

Android 创建备忘录及闹铃提醒的例子

于 2022-02-05 发布 文件大小:70.70 kB
0 166
下载积分: 2 下载次数: 1

代码说明:

Android 创建备忘录的例子,可自定义备忘录内容,自定义时间和自定义提醒闹钟的类型、铃声等。相关代码:   c.setTimeInMillis(System.currentTimeMillis());//设置当前时间   c.set(Calendar.HOUR_OF_DAY, hourOfDay);//设置小时   c.set(Calendar.MINUTE, minute);//设置分钟   c.set(Calendar.SECOND, 0);//设置秒   c.set(Calendar.MILLISECOND, 0);//设置毫秒   Intent intent=new Intent(Sample6_12_Activity.this,AlarmReceiver.class);//运行AlarmReceiver类   PendingIntent pi=PendingIntent.getBroadcast(//创建PendingIntent对象   Sample6_12_Activity.this, 0, intent, 0);   AlarmManager alarm=(AlarmManager)Sample6_12_Activity.this.getSystemService(ALARM_SERVICE);   alarm.set(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), pi);//设置闹钟提醒一次   alarm.setRepeating(AlarmManager.RTC_WAKEUP, c.getTimeInMillis(), 120000, pi);//每两分钟提醒一次   String tempHour=(hourOfDay+"").length()>1?hourOfDay+"":"0"+hourOfDay;   String tempMinute=(minute+"").length()>1?minute+"":"0"+minute;

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 基于STM32的温感GPS终端设计
    【实例简介】 野火的指南者,GPS是ATGM332D,温度传感器是DHT11。实现定位温度的采集、LCD显示及WIFI传输 /** 温感GPS终端设计.rar   ******************************************************************************   * @file    main.c   * @author  fire   * @version V1.0   * @date    2013-xx-xx   * @brief   对GPS模块传输的数据进行解码,获取定位信息。   ******************************************************************************   * @attention   *   * 实验平台:秉火  STM32 F103-指南者 开发板    * 论坛    :http://www.firebbs.cn   * 淘宝    :https://fire-stm32.taobao.com   *   ******************************************************************************   */ #include "stm32f10x.h" #include "./usart/bsp_usart.h" #include "./gps/gps_config.h" #include "./lcd/bsp_ili9341_lcd.h" #include "./systick/bsp_SysTick.h" #include "./dht11/bsp_dht11.h" #include "./i2c/bsp_i2c_ee.h" #include "./flash/bsp_spi_flash.h" #include "usart1.h" #include "test.h" #include "bsp_esp8266.h" #include #include extern void nmea_decode_test(void); extern void ESP8266_StaTcpClient_UnvarnishTest2(void); int main(void) { ILI9341_Init (); SysTick_Init(); DHT11_Init (); ILI9341_GramScan ( 6 ); USART_Config(); USARTx_Config(); ESP8266_Init ();  GPS_Config();                                                                                                                  while(1) { ESP8266_StaTcpClient_UnvarnishTest2(); nmea_decode_test(); } }
    2021-10-16 00:31:16下载
    积分:1
  • 联系人列表视图主
    应用背景这个安卓源代码包含列表视图,显示联系人。你可以编辑和修改你的愿望关键技术建立由日食和安卓工作室,只是探索你自己
    2022-08-21 06:26:13下载
    积分:1
  • searchable
    android实现表格搜索的源码,希望读者可以通过该例子,快速了解android中界面布局的学习 (android table search)
    2012-05-08 15:46:39下载
    积分:1
  • TestOnItemClickListener
    This is a TestOnItemClickListener sample in Android.
    2014-10-28 23:12:55下载
    积分:1
  • Wind
    一款简单的安卓应用,音乐播放器.适合android自学者学习使用(android program , music player)
    2012-09-09 17:18:44下载
    积分:1
  • EX03_01
    這是一個關於Android的程式開發,是在做關於手機能辨識影像物體的位置。(This is a program developed on the Android is doing on the phone to identify the location of the object image.)
    2011-11-02 15:30:05下载
    积分:1
  • android照相机,录像机 例子源码
    android照相机,录像机 例子源码
    2015-03-09下载
    积分:1
  • JNI-Documetation
    JNI学习必备,包括编码规范,相关接口介绍,异常处理,类操作等等(JNI coding reference)
    2017-03-29 10:01:44下载
    积分:1
  • ParsingXML
    android解析从服务器获得的XML文件(parsing xml file for android)
    2012-04-17 19:50:39下载
    积分:1
  • 利用MATLAB进行弹道仿真源代码
    不可多得的导弹仿真源程序 非常的经典 绝对不会后悔
    2020-05-25下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载