输入错误时的振动模式 (Android)
我知道如何创建振动模式,例如:
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
long pattern[] = new long[] {0, 200, 100, 200};
vibrator.vibrate(pattern, -1);
但我不知道哪种模式会传达“不正确的输入”。是否有任何指导方针或预定义模式?
编辑:看来我的问题有点令人困惑。我的意思是,有些声音你可以识别为成功或失败,它们很常见。但是,有没有大多数人都能理解的可用于决定成功或失败的振动模式呢?
I know how to create a vibrate pattern e.g:
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
long pattern[] = new long[] {0, 200, 100, 200};
vibrator.vibrate(pattern, -1);
But I don't know which pattern will communicate "incorrect input". Are there any guidelines or predefined patterns?
EDIT: Seems like my question is a bit confusing. What I mean is that there are sounds that you can identify as success or fail, they are quite common. But are there any vibration patterns that can be used for success or fail that most people would understand?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
希望这个答案迟到总比不到好! ;-)
我不知道 Android 中有任何特定标准,但似乎在非视觉通信的其他领域,重复模式 3 通常用于表示遇险或警报。例如,SOS 的莫尔斯电码是“三”的重复模式。当学习水肺潜水时,如果我想引起紧急注意,我被教导要以 3 的模式敲击我的气瓶,而当我进行引导丛林徒步时,我多次被指示携带口哨,并发出长长的信号。如果我想表达痛苦的话,可以使用 3 的模式。
如果您认为需要提供使用振动的成功或失败模式,而不是公认的标准,那么如果您确实想指示成功,我建议使用快速单次振动,并建议使用快速三重振动模式来指示失败。我还会用它来补充视觉提示,当然,让用户能够根据需要关闭振动,因为这肯定会导致额外的电池消耗。
干杯,
Hopefully this answer comes through as better late than never! ;-)
I'm not aware of any particular standard in android, however it appears that in other areas of non-visual communications, repeating patterns of 3 are usually used to indicate distress or alarm. For example, the morse code for S.O.S is a repeating pattern of "threes". When learning to SCUBA dive, I was taught to tap my tank in patterns of 3 if I wanted to get urgent attention, and when going on a guided bushwalk, I've been instructed many times to carry a whistle, and to signal in long patterns of 3 if I wanted to indicate distress.
In lieu of a recognized standard, if you feel that you need to provide a success or fail pattern that uses vibrate, I would suggest a quick single vibration if you really want to indicate success, and a rapid triple vibration pattern to indicate a failure. I would also use this to supplement a visual cue, and of course to give the user the ability to turn off the vibration if they wish, as this will certainly contribute to additional battery drain.
Cheers,
不。没有其他 Android 应用程序可以做到这一点。请改用视觉指示。
Don't. No other Android apps do this. Use a visual indication instead.
我不知道任何模式指南,尤其是不正确输入的模式指南。通常振动仅用于传达通知或按下某物的事实。为此,通常使用 1-2 次短振动。
复杂的振动模式很可能对游戏等有用。如果您想提醒用户输入错误,我建议使用 Toast。
I am not aware of any pattern guidelines, especially not one for incorrect input. Usually vibration is just used to convey a notification or the fact that something was pressed. For this 1-2 short vibrations is usually used.
Complex vibration patterns would most likely be useful for games and the like. If you want to alert the user of incorrect input I suggest using a Toast instead.