鸿蒙开发(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);

相关推荐
程序员黑豆25 分钟前
鸿蒙应用开发:Flex 组件从入门到实战
前端·华为·harmonyos
<小智>43 分钟前
鸿蒙多功能工具箱开发实战(二十)-性能优化与打包发布
ui·华为·harmonyos
不肥嘟嘟右卫门2 小时前
鸿蒙原生ArkTS布局方式之Popup+TextInput提示输入布局深度解析
华为·harmonyos
某林2123 小时前
ROS2 + WebRTC + MQTT 异构系统架构
架构·系统架构·机器人·硬件架构·webrtc·ros2
nullregedit3 小时前
OpenHarmony 小鸿 AI 开发实战 01:先认对工程,WS63 与 ESP32-P4 路径怎么选
openharmony·嵌入式开发·开源鸿蒙·esp32-p4·ws63
nullregedit4 小时前
原生鸿蒙像素画板实战 22:快捷键与鼠标交互
harmonyos·arkts·鸿蒙·bitart·像素画
Industio_触觉智能4 小时前
RK3576开发板UART驱动实战教程(下),基于触觉智能开发板演示
嵌入式硬件·硬件架构·串口·uart·智能硬件·rs232·rs485
在水一缸4 小时前
深度解析:OPEN NPO网络大模型架构与开发者实践指南
网络·人工智能·华为·架构·架构设计·open npo·网络大模型
a4493153625 小时前
iPhone 充电故障的全链路诊断——从 Lightning/USB-C 接口到 Tristar 充电 IC
c语言·macos·ios·电脑·硬件架构·iphone
●VON5 小时前
鸿蒙 PC Markdown 编辑器图片粘贴:从系统剪贴板到标准相对链接
华为·编辑器·harmonyos·鸿蒙