用于控制在状态栏上的闹钟图标棒棒糖API棒棒糖、闹钟、图标、栏上

由网友(时光是个坏老人)分享简介:这是一个棒棒糖,具体问题,因为API已经更改。要了解如何做到这一点的早期版本,请参阅相关的问题:This is a Lollipop-specific question, since the API has changed. To find out how to do this on earlier version...

这是一个棒棒糖,具体问题,因为API已经更改。要了解如何做到这一点的早期版本,请参阅相关的问题:

This is a Lollipop-specific question, since the API has changed. To find out how to do this on earlier versions, see related question:

Controlling在状态栏 闹钟图标 Controlling the Alarm icon in status bar

我想知道如何打开/关闭系统报警图标状态栏如下面的图片:

I would like to know how to turn on / off the system Alarm icon in the status bar as shown in this image:

及时闹钟控制在棒棒堂这个图标是1.3版本的。此前版本中,code是使用私有的API中的相关问题的详细介绍。

Timely Alarm Clock controls this icon on Lollipop as of release 1.3. Prior to that release, the code was using private APIs as detailed in the related question.

新的技术,他们使用的作品在一个无根的Nexus 5的运行V5.0.1。

The new technique they use works on an unrooted Nexus 5 running v5.0.1.

看起来还有很多的不仅仅是改变图标这个新的API。锁屏现在也显示我已经设置了报警的时间。

It looks like there is a lot more the this new API than just changing the icon. The lock screen now also displays the time I have set the alarm for.

推荐答案

AlarmManager有一个新的API来设置此。

AlarmManager has a new api to set this.

AlarmManager.setAlarmClock (AlarmManager.AlarmClockInfo信息,   PendingIntent操作)

AlarmManager.setAlarmClock (AlarmManager.AlarmClockInfo info, PendingIntent operation)

如果你做到这一点,在通知栏和的LockScreen报警显示。

If you do this, the alarm shows on notification bar and LockScreen .

阅读全文

相关推荐

最新文章