简单网站建设模板,关于动漫制作专业,做服装辅料一般什么网站找客户,平阳县城乡规划建设局网站注册出行业务事件监听#xff0c;用于接收业务发送事件的通知。
接口说明
接口名描述[on] (type: ‘smartMobilityEvent’, smartMobilityTypes: SmartMobilityType[],callback: Callback): void应用注册出行业务事件监听。
开发步骤 导入Car Kit模块。 import { smartMobi…注册出行业务事件监听用于接收业务发送事件的通知。
接口说明
接口名描述[on] (type: ‘smartMobilityEvent’, smartMobilityTypes: SmartMobilityType[],callback: Callback): void应用注册出行业务事件监听。
开发步骤 导入Car Kit模块。 import { smartMobilityCommon } from kit.CarKit;获取SmartMobilityEventAwareness实例。 let awareness: smartMobilityCommon.SmartMobilityAwareness smartMobilityCommon.getSmartMobilityAwareness();注册出行业务事件监听。
// 业务类型
let types: smartMobilityCommon.SmartMobilityType[] [smartMobilityCommon.SmartMobilityType.CAR_HOP];
// 出行业务事件回调函数
const callBack (event: smartMobilityCommon.SmartMobilityEvent) {hilog.info(0x0000, Received smart mobility event: , JSON.stringify(event));
};
// 注册出行业务事件监听
awareness.on(smartMobilityEvent, types, callBack);