是否有任何意图解雇每一秒在Android中? [英] Is there any intent fired every second in Android?

查看:99
本文介绍了是否有任何意图解雇每一秒在Android中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找一些意向性而得到广播的每一秒。我看着 android.intent.action.TIME_TICK 但是这个意图得到播出的每一分钟。我知道AlarmManger /处理器/线程可以被用于此目的,但我倾向于用系统广播意图。 请分享你的想法吗?

I am looking for some Intent which get broadcasted every second. I looked into android.intent.action.TIME_TICK but this intent get broadcasted every minute. I know AlarmManger/handler/thread can be used for this purpose, but I am inclined to use system broadcasted intent. Please share your thoughts?

推荐答案

我不这么认为。首先因为如果系统会发送一个广播的每一秒它会耗尽电池。第二,如果许多应用程序有兴趣处理的广播,这会严重拖慢系统。

I do not think so. First because if system would send a broadcast every second it would drain the battery. Second, if many apps were interested in handling the broadcast, that could seriously slow down the system.


其实如果一个意图触发一次一分钟,但有限制如何使用它

There is in fact a Intent fired once a minute, but there is restriction on how you can use it

http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK

这篇关于是否有任何意图解雇每一秒在Android中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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