鸿蒙开发(NEXT/API 12)【硬件(获取智慧出行连接状态)】车载系统

获取智慧出行连接状态,用于应用UI呈现或基于HiCar认证汽车摄像头的业务交互等。

接口说明

接口名 描述
[getSmartMobilityStatus] (type: SmartMobilityType): SmartMobilityInfo 获取智慧出行连接状态。

开发步骤

  1. 导入Car Kit模块。

    复制代码
    import { smartMobilityCommon } from '@kit.CarKit';
  2. 获取SmartMobilityStatusAwareness实例。

    复制代码
    let awareness: smartMobilityCommon.SmartMobilityAwareness = smartMobilityCommon.getSmartMobilityAwareness();
  3. 获取智慧出行连接状态。

    // 业务类型
    let type = smartMobilityCommon.SmartMobilityType.HICAR;
    // 获取出行业务连接状态
    let info = awareness.getSmartMobilityStatus(type);

相关推荐
2601_949593655 小时前
Flutter_OpenHarmony_三方库_webview_flutter网页内容嵌入与交互适配详解
flutter·harmonyos
前端不太难6 小时前
为什么 AI 游戏更适合鸿蒙?
人工智能·游戏·harmonyos
特立独行的猫a6 小时前
HarmonyOS 鸿蒙PC三方库移植:vcpkg方式的 Port 脚本编写简明教程
华为·harmonyos·openharmony·vcpkg·三方库移植
GLAB-Mary7 小时前
华为职业认证新版全景图介绍及重认证规则变更预通知
运维·服务器·华为·华为认证
Ww.xh7 小时前
鸿蒙Flutter混合开发实战:跨平台UI无缝集成
flutter·华为·harmonyos
chenbin___7 小时前
鸿蒙RN position: ‘absolute‘ 和 zIndex 的兼容性问题(转自千问)
前端·javascript·react native·harmonyos
你这个想法好8 小时前
Media Service 从系统架构到应用场景的深度解析
车载系统·系统架构
苏杰豪8 小时前
DevEco Studio 启动鸿蒙模拟器提示未开启 Hyper-V,怎么处理?
华为·harmonyos
chenjixue8 小时前
记录下我理解的安卓,鸿蒙,ios, rn , fullter, Jetpack Compose,react 的相似与不同
android·华为·harmonyos
想你依然心痛9 小时前
HarmonyOS 6(API 23)悬浮导航与沉浸光感实战:打造下一代玻璃拟态UI体验
ui·华为·harmonyos·悬浮导航·沉浸光感