openharmony 鸿蒙 js-apis-bundle-ApplicationInfo

2025-06-12 浏览 (1)

ApplicationInfo

应用程序信息,未做特殊说明的属性,均通过bundle.getApplicationInfo获取。

说明:

本模块首批接口从API version 7开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。

从API Version 9开始,该模块不再维护,建议使用bundleManager-ApplicationInfo替代。

ApplicationInfo(deprecated)

从API version 9开始不再维护,建议使用bundleManager-ApplicationInfo替代。

系统能力: SystemCapability.BundleManager.BundleFramework

名称类型只读可选说明
namestring应用程序的名称。
descriptionstring应用程序的描述信息。
descriptionIdnumber应用程序的描述信息的资源id。
systemAppboolean判断是否为系统应用程序,取值为true表示系统应用,取值为false表示非系统应用。
enabledboolean判断应用程序是否可以使用,取值为true表示可以使用,取值为false表示不可使用。
labelstring应用程序显示的标签。
labelIdstring应用程序的标签的资源id值。
iconstring应用程序的图标。
iconIdstring应用程序图标的资源id值。
processstring应用程序的进程名称。
supportedModesnumber标识应用支持的运行模式,当前只定义了驾驶模式(drive)。该标签只适用于车机。
moduleSourceDirsArray<string>应用程序的资源存放的相对路径。不能拼接路径访问资源文件,请使用资源管理接口访问资源。
permissionsArray<string>访问应用程序所需的权限。
通过调用bundle.getApplicationInfo接口时,传入GET_APPLICATION_INFO_WITH_PERMISSION获取。
moduleInfosArray<ModuleInfo>应用程序的模块信息。
entryDirstring应用程序的文件保存路径。不能拼接路径访问资源文件,请使用资源管理接口访问资源。
codePath8+string应用程序的安装目录。不能拼接路径访问资源文件,请使用资源管理接口访问资源。
metaData8+Map<string, Array<CustomizeData>>应用程序的自定义元信息。
通过调用bundle.getApplicationInfo接口时,传入GET_APPLICATION_INFO_WITH_METADATA获取。
removable8+boolean应用程序是否可以被移除,取值为true表示可以被移除,取值为false表示不可以被移除。
accessTokenId8+number应用程序的accessTokenId。
uid8+number应用程序的uid。
entityTypestring应用程序的类别,例如游戏、社交、影视、新闻。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Ability Kit(程序框架服务)

harmony 鸿蒙AbilityBase

harmony 鸿蒙AbilityBase_Element

harmony 鸿蒙AbilityRuntime

harmony 鸿蒙bundle

harmony 鸿蒙OH_NativeBundle_ApplicationInfo

harmony 鸿蒙OH_NativeBundle_ElementName

harmony 鸿蒙ability_base_common.h

harmony 鸿蒙ability_runtime_common.h

harmony 鸿蒙application_context.h

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