找回密码
 立即注册
关机The自动设置 | android开发 2022-11-07 40 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android自动开关机的实现教程,包括作者的思路和实现过程以及代码细节。网上的介绍比较少,因为它需求底层rtc时钟的支持。前段时刻依据客户需求实现了自动开关机。在这里共享一下。我的实现是在设置程序里边添加一个接口,让用户设置自动开关机,这个自动开关机的设置可以参照闹钟的设置。关于自动关机,考虑到关机的时候,用户可能正有一些重要的操作,那么应该给用户一个时机去撤销当时的关机。在设置自动开关机的时候,需求考虑的状况很多,比方是否设置时刻/时区的改动,手机当时是开机仍是关机状况等。

(The implementation tutorial of Android automatic switch, including the author's ideas, implementation process and code details. There are few online introductions, because it requires the support of the underlying RTC clock. At the previous moment, the machine was switched on and off automatically according to customer requirements. Share it here. My implementation is to add an interface in the setup program to let the user set the automatic switch on/off. The setting of the automatic switch on/off can refer to the setting of the alarm clock. As for automatic shutdown, considering that the user may have some important operations during shutdown, the user should be given a chance to cancel the current shutdown. When setting the automatic switch on/off, you need to consider many situations, such as whether to set the time/time zone change, whether the phone is turned on or off at that time.)

[下载]21533879938.rar




上一篇:Android的编译系统
下一篇:Android网络开发技术实践详解