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 153
下载积分: 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 个回复

  • 雷达操作界面(c++源码)
    雷达操作界面(c++源码)
    2021-05-06下载
    积分:1
  • android画图实例源码下载
    android画图
    2015-03-07下载
    积分:1
  • 基于android系统的多功能手电筒应用
    此软件为基于安卓系统的多功能手电筒应用。该手电筒不仅具有闪光灯功能,同时可以发出警告灯,摩尔斯电码,电灯泡以及彩色灯等多种功能。该项目可以帮助我们掌握多线程的使用,了解如何获取和设置屏幕亮度等技术。
    2022-07-02 23:50:27下载
    积分:1
  • vomc
    使用matlab软件里面的simulink仿真OFDM系统(simulation of the ofdm system using the simulink in the matlab software)
    2019-03-27 15:08:09下载
    积分:1
  • Mp3Player01
    MP3播放器源代码 经过测试的部分源代码(MP3 player after part of the source code test source code )
    2012-07-24 17:31:21下载
    积分:1
  • cwac-anddown-master
    Android组件库CWAC主要用来解决Android 开发中各个方面的常见问题,每个 CWAC 组件打包成一个独立的 jar 文件,JNI处理,本次下载的是CWAC组件库及应用示例(Component library CWAC Android Android is mainly used to solve common problems in all aspects of development, each CWAC components packaged into a separate jar files, JNI treatment, the download is CWAC component library and application examples)
    2014-04-16 08:49:06下载
    积分:1
  • android 仿qq登陆界面 源码下载
    仿仿qq登陆界面
    2015-04-20下载
    积分:1
  • WiFiScan
    WiFi指纹库采集数据专用安卓apk文件,直接下载即可安装使用,室内定位数据采集阶段神器(WiFi fingerprint database for data acquisition Android APK files can be downloaded directly to install and use, indoor positioning data acquisition stage artifacts)
    2021-03-17 20:09:20下载
    积分:1
  • listviewheSQLitezhishi
    注意:本项目是基于android studio开发的,eclipse可能无法直接使用。 本项目是一个简单的基于安卓的记事本项目源码,添加或删除数据的时候会出现显示bug(实际数据不会受到影响),bug体现在添加或删除一条数据以后会在listview里面会展示复制一遍操作后的数据。而不会清除原有的列表文本。新手朋友可以拿这个项目来试试手感,顺便看看能不能独立解决这个问题。 本项目涉及的知识点有: 1、SQLite的基本使用,增删查改 2、listview,adapeter的基本使用 3、activity生命周期 4、intent、bundle传递参数 5、AlertDialog的基本使用(Note: this project is based on the development of studio eclipse, Android may not be able to directly use. This project is a simple Notepad program source code based on Android, add or delete data will appear when the display bug (actual data will not be affected), bug reflected in add or remove a data will be in inside the listview will show copy again after the operation data. And will not clear the original list of text. Novice friends can take this project to try to feel, by the way to solve this problem can not be solved independently. The knowledge points involved in this project are: 1, the basic use of SQLite, CRUD 2, listview, the basic use of adapeter 3, activity life cycle 4, intent, bundle transfer parameters 5, the basic use of AlertDialog)
    2016-07-25 11:25:09下载
    积分:1
  • CheckBox-Text
    android中checkbox控件的属性设置及判断并返回选中的控件值(Set the checkbox controls android attributes and judgment and return the selected control values)
    2014-06-08 21:34:07下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载