简体   繁体   English

Android活动识别更新不是正常的

[英]Android Activity Recognition updates are not regular

Related to this question . 这个问题有关

I am experiencing that Activity Recognition updates are not delivered on a regular basis. 我遇到的活动识别更新不是定期提供。 The power saving mode on my phone is disabled and I set the fastest possible detection interval (0), yet sometimes intents are not delivered for more than 10-20 seconds. 手机上的省电模式已禁用,并且我设置了最快的检测间隔(0),但有时意图传达的时间不会超过10-20秒。 It seems the delays mostly happen during an activity transition (eg, still -> in vehicle ), but this is just a hypothesis. 延迟似乎主要发生在活动过渡期间(例如, still -> in vehicle ),但这只是一个假设。

In my application I need be able to set a strict upper bound for the interval between intents, has anyone achieved something like that? 在我的应用程序中,我需要能够为意图之间的间隔设置严格的上限,有人能做到这样吗?

This may come a little late. 这可能会晚一点。 However yes this is normal. 但是,是的,这很正常。 I have noticed that there is a delay during a transition from activity A to activity B (eg from still to walking) while there is generally no delay when the activity is constant. 我注意到从活动A到活动B的过渡(例如,从静止到走路)有一个延迟,而在活动不变的情况下,通常没有延迟。 I guess this is because the sensor tries to collect as much evidence as possible in case of activity change (eg to avoid returning false positives). 我猜这是因为传感器在活动发生变化时会尝试收集尽可能多的证据(例如,避免返回假阳性结果)。 I doubt there is any way to change that. 我怀疑是否有任何方法可以改变这种状况。

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

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