Android开发人员可以访问系统时钟/警报应用程序吗? [英] Can android developers access the system clock/alarm application?

查看:88
本文介绍了Android开发人员可以访问系统时钟/警报应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Nexus S带有默认的时钟应用程序,可以在其中设置闹钟。设置闹钟后,我会在状态栏中看到一个小时钟。

My Nexus S comes with a default clock application where I can set an alarm. When I set an alarm then I see a little clock in my status bar.

如果我转到管理应用程序或运行服务,我希望看到

If I go to 'Manage Applications' or 'Running Services', I would expect to see Clock there, but I don't?

如果我从管理应用程序转到全部,那么我确实看到了时钟应用程序,可以强制退出

If I go to 'All' from 'Manage Applications', then I do see the Clock app, and I can Force Quit it, however the clock in the status bar still appears.

如果默认的Clock应用程序从来没有出现在Running Applications或Services中,因为它是系统的一部分,那么开发人员可以访问此时钟应用程序?例如,我正在创建一个警报应用程序,是否应该将警报从我的应用程序连接到系统Clock应用程序?

If the default Clock application never appears in Running Applications or Services because it is part of the system, then can developers access this Clock app? For instance I am creating an alarm application, should it be possible to hookup the alarms from my application to the system Clock app?

推荐答案

据我所知,闹钟是一项系统服务,这可能就是为什么您看不到它的原因。每个设备上只有一个时钟,因此您发出的任何警报都会以某种形式使用系统时钟。 此处是使用AlarmManager进行警报的旧教程。并且这里是一个链接到开发页面上的API演示以发出警报。

As far as I can tell, the alarm clock is a system service, which may be why it is not visible to you. There is only one clock on each device, so any alarm you make will utilize the system clock in some form or another. Here is an old tutorial for making an alarm using AlarmManager. And here is a link to an API demo on the dev pages for making an alarm.

这篇关于Android开发人员可以访问系统时钟/警报应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆