开发者

Android: Is it possible to change sensor reporting modes?

开发者 https://www.devze.com 2022-12-07 23:33 出处:网络
I am interested in using the significant motion sensor, but I realized that this is a one-shot reporting sensor. So after it reports an event once, it no longer reports anymore until I re-register the

I am interested in using the significant motion sensor, but I realized that this is a one-shot reporting sensor. So after it reports an event once, it no longer reports anymore until I re-register the sensor.

My goal is to detect significant motion at all times, for example when a user picks up their phone, shakes it, throws it, etc... Based on that triggered event I will do something.

I'm w开发者_运维问答ondering now if there is an alternative or a way to continuously listen for significant motion sensor events.

I honestly thought about just continuously re-registering the sensor but I think there are consequences to that approach and it's a hack.

0

精彩评论

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

关注公众号