Name Date Size

..25-Oct-20244 KiB

.gitignoreH A D25-Oct-2024124

build-profile.json5H A D25-Oct-20241 KiB

entry/H25-Oct-20244 KiB

hvigor/H25-Oct-20244 KiB

hvigorfile.jsH A D25-Oct-2024174

hvigorwH A D25-Oct-20242.1 KiB

hvigorw.batH A D25-Oct-20242 KiB

oh-package.json5H A D25-Oct-2024818

ohosTest.mdH A D25-Oct-2024676

README.mdH A D25-Oct-20241 KiB

README_zh.mdH A D25-Oct-20242.9 KiB

screenshots/device/H25-Oct-20244 KiB

README.md

1# Vibrator
2
3### Introduction
4
5This sample simulates the countdown scenario to show the use of the vibrator APIs. Below shows the sample app.
6
7![](./screenshots/device/vibratorTime.jpeg)
8
9### Functions
10
11You can trigger a vibrator to vibrate by duration or vibration effect.
12
13### Required Permissions
14
15ohos.permission.VIBRATE
16
17### Usage
18
191. Touch the countdown text. A time picker is displayed. Select any time and touch **OK**. The selected time is displayed as the countdown text.
20
212. 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.
22
233. Touch **reset**. The countdown ends, and the round progress bar and countdown text are restored to the initial state.
24
25### Constraints
26
271. This sample can only be run on standard-system devices.
28
292. This sample requires a device with a vibrator.
30
313. This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run. 
32
33