Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以通过代码检测 android 设备中的振动。我正在使用加速度计构建一个应用程序,因此希望在设备振动时给出不同的条件。
提前致谢 :)
我查看了文档,据我所知这是不可能的。没有振动监听器......请参阅这个问题:Android 中的振动监听器
此外,手机的振动可能太弱而无法通过Shake Listener检测到