harmony 鸿蒙Vibrator Overview

  • 2022-08-09
  • 浏览 (848)

Vibrator Overview

The vibrator service is built on the native vibrator service, bolstered by the latest capabilities of the vibrator hardware. By innovatively integrating vibration and interaction, the service takes user interaction efficiency and usability to the next level.

Working Principles

The vibrator is a Misc device that consists of four modules: Vibrator API, Vibrator Framework, Vibrator Service, and HDF layer.

Figure 1 Vibrator in Misc devices

0752d302-aeb9-481a-bb8f-e5524eb61eeb

  • Vibrator API: provides basic vibrator APIs, including the APIs for obtaining the vibrator list, querying the vibrator by effect, and triggering and stopping vibration.

  • Vibrator Framework: manages the framework layer of the vibrator and communicates with the Misc Device Service.

  • Vibrator Service: manages services of vibrators.

  • HDF layer: adapts to different devices.

Constraints

When using a vibrator, you must declare the ohos.permission.VIBRATE permission before you can control the vibration effect.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Device Management

harmony 鸿蒙Peripheral Management Development

harmony 鸿蒙Input Device Development

harmony 鸿蒙Location Service Development

harmony 鸿蒙Mouse Pointer Development

harmony 鸿蒙Sample Server Development

harmony 鸿蒙Sample Server Overview

harmony 鸿蒙Sensor Development

harmony 鸿蒙Sensor Overview

harmony 鸿蒙Stationary Development

0  赞