openharmony 鸿蒙 capi-telephony-radio-h

2026-08-25 浏览 (1)

telephony_radio.h

Overview

Defines C APIs for the radio module.

File to include: <telephony/core_service/telephony_radio.h>

Library: libtelephony_radio.so

System capability: SystemCapability.Telephony.CoreService

Since: 13

Related module: Telephony

Summary

Functions

NameDescription
Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state)Obtains the network status.
Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state)Obtains the network status of the SIM card in the specified slot.

Function Description

OH_Telephony_GetNetworkState()

Telephony_RadioResult OH_Telephony_GetNetworkState(Telephony_NetworkState *state)

Description

Obtains the network status.

System capability: SystemCapability.Telephony.CoreService

Required permissions: ohos.permission.GET_NETWORK_INFO

Since: 13

Parameters

NameDescription
Telephony_NetworkState *stateStructure of the network status information received by the user.

Returns

TypeDescription
Telephony_RadioResultResult code. For details, see Telephony_RadioResult.
TEL_RADIO_SUCCESS: Operation succeeded.
TEL_RADIO_PERMISSION_DENIED: Permission denied.
TEL_RADIO_ERR_MARSHALLING_FAILED: Marshalling failed.
TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED: Telephony service connection failed.
TEL_RADIO_ERR_OPERATION_FAILED: Telephony service operation failed.
TEL_RADIO_ERR_INVALID_PARAM: Invalid parameter.

OH_Telephony_GetNetworkStateForSlot()

Telephony_RadioResult OH_Telephony_GetNetworkStateForSlot(int32_t slotId, Telephony_NetworkState *state)

Description

Obtains the network status of the SIM card in the specified slot.

System capability: SystemCapability.Telephony.CoreService

Required permissions: ohos.permission.GET_NETWORK_INFO

Since: 13

Parameters

NameDescription
int32_t slotIdCard slot ID.
Telephony_NetworkState *stateStructure of the network status information received by the user.

Returns

TypeDescription
Telephony_RadioResultResult code. For details, see Telephony_RadioResult.
TEL_RADIO_SUCCESS: Operation succeeded.
TEL_RADIO_PERMISSION_DENIED: Permission denied.
TEL_RADIO_ERR_MARSHALLING_FAILED: Marshalling failed.
TEL_RADIO_ERR_SERVICE_CONNECTION_FAILED: Telephony service connection failed.
TEL_RADIO_ERR_OPERATION_FAILED: Telephony service operation failed.
TEL_RADIO_ERR_INVALID_PARAM: Invalid parameter.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 js-apis-sms-sys

openharmony 鸿蒙 capi-telephony-radio-type-h

openharmony 鸿蒙 js-apis-sim-sys

openharmony 鸿蒙 js-apis-telephony-data-sys

openharmony 鸿蒙 js-apis-observer-sys

openharmony 鸿蒙 Readme-EN

openharmony 鸿蒙 capi-telephony-data-h

openharmony 鸿蒙 ndk-apis-telephony-radio

openharmony 鸿蒙 js-apis-call

openharmony 鸿蒙 js-apis-call-sys

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/2kKZuXWW