codecamp

tt.vibrateLong

从基础库 1.0.0 开始支持。

使手机发生较长时间的振动。


参数

Object object

属性类型默认值必填说明
successfunction接口调用成功后的回调函数
failfunction接口调用失败后的回调函数
completefunction接口调用结束后的回调函数(调用成功、失败都会执行)


代码示例

tt.vibrateLong({
  success(res) {
    console.log(`${res}`);
  },
  fail(res) {
    console.log(`vibrateLong调用失败`);
  }
});
tt.setKeepScreenOn
tt.vibrateShort
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定