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.
精彩评论