HomeDocs
Skip to main content

dlt.vibrateShort

Introduction​

Causes the phone to vibrate for a short duration (15 ms).

Usage Restrictions​

Supported on basic library version 4.0.0 or higher.

Parameters​

Object object

PropertyTypeDefault ValueRequiredDescription
typestringYesVibration intensity type, valid values are: heavy, medium, light
successfunctionNoCallback function executed when the interface call is successful
failfunctionNoCallback function executed when the interface call fails
completefunctionNoCallback function executed when the interface call ends (executed regardless of success or failure)

Sample Code​

// pages/index/index.js
Page({
vibrateShort() {
dlt.vibrateShort({
type: 'heavy',
success: function (res) {},
fail: function (res) {},
complete: function (res) {},
});
},
});
Privacy agreementDeveloper agreementcontact us: developer_private.mi@dlightek.com © 2024 MiniApp. All Rights Reserved.