Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是安卓新手。我正在制作一个将在其上运行的应用程序AlarmManager我搜索了许多博客。我得到了激活Alarm几秒钟的教程,但就我而言,我想Alarm在一天中的特定时间激活一个。你能帮我做这件事吗?
AlarmManager
Alarm
获取当前时间与一天中特定时间之间的差异(以毫秒为单位),将其添加到System.currentTimeMillis(). 将此值放入alarmManager.set(type, miliseconds, pendingIntent)
System.currentTimeMillis()
alarmManager.set(type, miliseconds, pendingIntent)