zhizhi/node_modules/dingtalk-jsapi/api/device/accelerometer/watchShake.d.ts

29 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 启动摇一摇 请求参数定义
* @apiName device.accelerometer.watchShake
*/
export interface IDeviceAccelerometerWatchShakeParams {
/** 振动幅度Number类型加速度变化超过这个值后触发shake */
sensitivity: number;
/** 采样间隔(毫秒)Number类型指每隔多长时间对加速度进行一次采样 然后对比前后变化判断是否触发shake */
frequency: number;
/** 触发『摇一摇』后的等待时间(毫秒)Number类型防止频繁调用 */
callbackDelay: number;
/** onSuccess为监听函数 */
onSuccess?: () => void;
}
/**
* 启动摇一摇 返回结果定义
* @apiName device.accelerometer.watchShake
*/
export interface IDeviceAccelerometerWatchShakeResult {
}
/**
* 启动摇一摇
* 开启监听
* @apiName device.accelerometer.watchShake
* @supportVersion ios: 2.4.0 android: 2.4.0
*/
export declare function watchShake$(params: IDeviceAccelerometerWatchShakeParams): Promise<IDeviceAccelerometerWatchShakeResult>;
export default watchShake$;