watchOS 2:背景中的触觉反馈 [英] watchOS 2: haptic feedback in background

查看:104
本文介绍了watchOS 2:背景中的触觉反馈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我已经知道了这个问题的答案,但我想问一下这个问题。

I think I know the answer to this question already, but I wanted to ask just to be thorough.

考虑Apple Watch内置地图应用。当您使用转弯指示时,当向左或向右转动时,手表会播放自定义触觉模式 - 即使屏幕关闭且应用程序背景也是如此。另一个例子是当你正在锻炼时 - 如果你已经设定了一个目标,当你获得50%和100%时,即使你没有看手表,你也会轻轻拍打你的手腕。当时(屏幕关闭,应用程序背景)。

Consider the Apple Watch built-in Maps app. When you're using turn-by-turn directions, when it's time to turn left or right, the watch plays a custom haptic pattern - even though the screen is off and the app is backgrounded. Another example is while you're doing a workout - if you've set a goal, you'll get a light tap on your wrist when you get 50% there and 100% there, even if you're not looking at the watch at the time (screen off, app backgrounded).

在watchOS 2中,我们的第三方开发者是否有任何方式让应用程序播放某种触觉模式屏幕关闭,应用程序背景?我知道 playHaptic:方法在应用程序处于活动状态时可以让你玩几种不同类型的触觉模式,我知道当应用程序处于非活动状态时,你可以拥有一个通知进来 - 但通知只会播放'通知'的触觉感觉,没有选择。

In watchOS 2, is there any way for us 3rd party developers to have an app play a certain haptic pattern when the screen is off and the app is backgrounded? I know the playHaptic: method works while the app is active to let you play several different kinds of haptic patterns, and I know that while the app is inactive, you can have a notification come in - but the notification would only ever play the 'notification' haptic feeling, no choice in that.

推荐答案

你可以仅在应用处于活动状态时运行自定义代码。所以我担心你不能这样做。

You can only run custom code when you app is active. So I´m afraid you can't do this.

这篇关于watchOS 2:背景中的触觉反馈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆