检查手机设置中的触觉反馈
有没有办法检查用户是否在 Android 手机设置中启用或禁用了触觉反馈?虽然我认为触觉反馈对我的应用程序很有用,但我也了解有些人(包括我自己)通常更喜欢关闭触觉反馈。我能找到的最接近的是 http://developer.android.com/reference/android/provider /Settings.System.html#HAPTIC_FEEDBACK_ENABLED 但我不确定这是否是我正在寻找的或如何对其进行测试。
预先感谢您提供的任何帮助。
Is there a way to check if the user has haptic feedback enabled or disabled in their android phone settings? While I think haptic feedback would be useful to my app, I also understand that some people (myself included) generally prefer to have haptic feedback turned off. The closest thing I can find is
http://developer.android.com/reference/android/provider/Settings.System.html#HAPTIC_FEEDBACK_ENABLED
but I'm not sure if it's what I'm looking for or how to test against it.
thank you in advance for whatever help you can provide.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我设法解决了它。这是我使用的代码:
I managed to resolve it. here is the code I used: