Detecting 'Cover to Mute' action on Apple Watch

被刻印的时光 ゝ 提交于 2020-01-03 03:12:09

问题


There's a feature on Apple Watch where you can cover the screen with your palm to mute it. For example, if you get a call in a meeting, you can cover your watch screen to mute the ring.

I would like to use this feature in an app, but can't find documentation that tells me how to detect this action.

Does anyone know of how to detect this, or perhaps even how I could simulate this? I know multi-touch is out, and don't know how Apple is detecting the face being covered.


回答1:


It's currently not possible to detect Cover to Mute or other gestures. Gestures are automatically handled by the system; there is no developer access to raw touch events or gestures in watchOS 2.

From the Apple Watch Human Interface Guidelines:

User interactions on Apple Watch generate touch events and gestures, but unlike iOS apps, your Watch apps don’t handle these events directly. The system provides automatic responses for all touch events and gestures ...




回答2:


Answer to your first question

As you know, not all internal gestures in Apple Watch are available to the applications in the API.

You could not access many system actions, like Force Touch action menu and Cover To Mute, by WatchKit or any other framework in watchOS. They are automatically handed by the Apple Watch itself.

Of course, one way to check this gesture is checking the sound volume by making a sound and then listening to and processing it, but this does not sound interesting.

Answer to your second question

Multi-touch is not available in Apple Watch, but the screen has special sensors to detect some gestures that you might think of them as multi-touch ones.

This gesture is not considered as multi-touch in Apple Watch, but Apple has included some special sensors for you to feel you are using multi-touch.

Conclusion

1- Not all internal gestures in Apple Watch are available to the applications in the API.

2- You could not access many system actions - including Cover to Mute - in your watchOS app.

3- Multi-touch is not available in Apple Watch, but the screen has special sensors to detect some gestures that you might think of them as multi-touch ones, like Cover to Mute.

More resources

Check out this link from Apple for more details.



来源:https://stackoverflow.com/questions/35911627/detecting-cover-to-mute-action-on-apple-watch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!