文件最后提交记录最后更新时间
!866 更新根目录readme和修复vibrator * update readme and vibrator bug 3 年前
!897 整改应用readme * Description: fix readmre 3 年前
!1006 翻译完成:全量翻译---Vibrator * add vibrator readme (EN) 3 年前
!964 README整改 * update readme 3 年前
!586 修复signingConfig和JsImage、Process工程报错问题 * modify getPid->pid * fix test bug 4 年前
!521 新增 vibrator * update vibrator * update vibrator * update Review opinions * add sample vibrator 4 年前
!824 适配901工程 * 修改EngineeringCapability文件缩进格式 * 适配工程 * 适配工程 data/Preferences data/Rdb等 3 年前
README.md

Vibrator

Introduction

This sample simulates the countdown scenario to show the use of the vibrator APIs. Below shows the sample app.

Functions

You can trigger a vibrator to vibrate by duration or vibration effect.

Required Permissions

ohos.permission.VIBRATE

Usage

  1. Touch the countdown text. A time picker is displayed. Select any time and touch OK. The selected time is displayed as the countdown text.

  2. Touch start. The countdown starts, and the round progress bar and countdown text start changing. When the countdown ends, the device vibrates, the progress bar returns to the initial state, and a vibration dialog box is displayed.

  3. Touch reset. The countdown ends, and the round progress bar and countdown text are restored to the initial state.

Constraints

  1. This sample can only be run on standard-system devices.

  2. This sample requires a device with a vibrator.

  3. DevEco Studio 3.0 Beta3 (Build version: 3.0.0.901, built on May 30, 2022) must be used.