简体   繁体   English

Android 4.2.2来电广播

[英]Android 4.2.2 incoming call broadcast

we have problem with incomming call broadcast on newest OS Android 4.2.2. 我们在最新的Android Android 4.2.2上遇到呼叫广播的问题。

We are developing app, which should mute ringing for some contacts. 我们正在开发应用程序,它应该静音一些联系人。 It works fine on older systems, but on OS 4.2.2 the device rings for about 1-2 seconds until we are able to mute it. 它在旧系统上运行良好,但在OS 4.2.2上,设备响铃约1-2秒,直到我们能够将其静音。

This happens only when the device is in sleep mode (screen is off). 仅当设备处于睡眠模式(屏幕关闭)时才会发生这种情况。 Is the broadcast on this system delayed in some way? 这个系统的广播是否以某种方式延迟? Has anybody experienced similar problem to this? 有没有人遇到类似的问题呢? Thank you for any reply. 谢谢你的回复。

EDIT: After some experiments (on Nexus 4) we found this: when we turn Wi-Fi off, the problem disapear so maybe Wi-fi use too much cpu time when turning on again from sleep (it's only hypothesis). 编辑:经过一些实验(在Nexus 4上),我们发现了这一点:当我们关闭Wi-Fi时,问题就会消失,因此当从睡眠中再次开启时,Wi-Fi可能会使用太多的CPU时间(这是唯一的假设)。 And other think we found: it's happen about 3 times of 4 attempts. 而其他人认为我们发现:它发生了4次尝试中的3次。

Not very nice, but solved by this: 不是很好,但解决了这个问题:

for contacts we want to mute, set silent ringtone (it's empty 1s ogg file). 对于我们想要静音的联系人,设置静音铃声(它是空的1s ogg文件)。 Of course we backup previous ringtone and restore it when mute function is turned off. 当然我们备份以前的铃声并在静音功能关闭时恢复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM