开发者

Still receiving sensor events after unregisterListener

I have noticed a lag between calling unregisterListener and when sensor events stop coming to my service. Is this normal? Is there a way to immediately stop receiving sensor 开发者_如何学JAVAevents?

-- George


If the events fast then you may end up with more events than you want. Just set a boolean variable in your Listener and flip it as soon as you detected your first event. You can use that boolean then to determine if you want to continue with the code or not.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜