as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
Vibrates the device.

Example

Reference

Methods

cancel() Android iOS

Call this to stop vibrating after having invoked vibrate() with repetition enabled.

vibrate() Android iOS

Triggers a vibration with a fixed duration. On Android, the vibration duration defaults to 400 milliseconds, and an arbitrary vibration duration can be specified by passing a number as the value for the pattern argument. On iOS, the vibration duration is fixed at roughly 400 milliseconds. The vibrate() method can take a pattern argument with an array of numbers that represent time in milliseconds. You may set repeat to true to run through the vibration pattern in a loop until cancel() is called. Parameters:
最后修改于 2026年10月26日