harmony 鸿蒙@ohos.customization.customConfig (定制配置)
@ohos.customization.customConfig (定制配置)
本模块接口为应用提供定制配置的获取能力,如渠道号等。
说明:
本模块首批接口从API version 12开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
导入模块
import { customConfig } from '@kit.BasicServicesKit';
customConfig.getChannelId
getChannelId(): string
根据应用的BundleName获取渠道号。
原子化服务API: 从API version 13开始,该接口支持在原子化服务中使用。
系统能力:SystemCapability.Customization.CustomConfig
返回值:
类型 | 说明 |
---|---|
string | 渠道号 |
示例:
let channelId: string = customConfig.getChannelId();
console.log('app channelId is ' + channelId);
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Basic Services Kit(基础服务)
harmony 鸿蒙Print_PrintAttributes
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦