bundlemanager_bundlemanager_cangjie_wrapper:基于包管理子系统的仓颉接口封装项目

仓颉包管理封装

Branch16Tags0

bundlemanager_cangjie_wrapper(beta feature)

Introduction

The Cangjie API is a Cangjie API encapsulated on OpenHarmony based on the capabilities of the Bundle Management subsystem. The Bundle Management subsystem allows you to query bundle information. The currently bundle manager Cangjie api only supports standard devices.

System Architecture

Figure 1 System architecture of bundlemanager_cangjie_wrapper

System architecture of bundlemanager_cangjie_wrapper

As shown in the architecture:

interface: Provides APIs for developers.

  • bundleManager:
    • BundleManager: Obtains the bundle information. Obtains the JSON string array of the current application's configuration. Checks whether a link can be opened.
    • ElementName: Definition of ElementName. Includes device ID, application Bundle name, and other information.
    • Metadata: Definition of Metadata. Includes metadata name, metadata value, and metadata resources.
    • Skill: Skill object. Includes the collection of actions, entities, uris, and domainVerify that Skill receives.

frameworks:

  • bundleManager wrapper:
    • BundleManager wrapper: Encapsulates the Cangjie application information query capability. The Cangjie application information query capability is implemented through the BundleManager class.
    • ElementName wrapper: Provides the definition of the Cangjie ElementName class.
    • Metadata wrapper: Provides the definition of the Cangjie Metadata class.
    • Skill wrapper: Provides the definition of the Cangjie Skill class.

Dependency Component Introduction in Architecture:

  • bundle_framework: It is responsible for providing basic functions of bundlemanager, and encapsulates C interfaces to provide interoperability for Cangjie.
  • ability_runtime: Encapsulates the C language definition of ElementName to provide interoperability with Cangjie.
  • cangjie_ark_interop: Responsible for providing APILevel definitions, used for annotating APIs. Also provides the BusinessException exception class definition that is thrown to users.
  • hiviewdfx_cangjie_wrapper: Responsible for providing HiLog APIs, used for printing logs at critical paths.
  • global_cangjie_wrapper: Provides the capability to access application resources. The ApplicationInfo depends on AppResource from this module.

Directory Structure

foundation/bundlemanager/bundlemanager_cangjie_wrapper
├── figures                   # architecture pictures
├── ohos                      # Cangjie Bundle Management code
│   ├── bundle                # Cangjie bundle code
│   │   └── bundle_manager    # Cangjie bundle basic function implementation
│   ├── element_name          # Cangjie ElementName code
│   ├── metadata              # Cangjie Metadata code
│   └── skill                 # Cangjie Skill code
└── test                      # Cangjie test code
    └── bundle_manager        # Cangjie bundle test code

Usage Guidelines

The following features are provided:

  • The module provides APIs for obtaining this application information. Please refer to getBundleInfoForSelf.
  • Obtains the json string array of the current application's configuration file. Please refer to getProfileByAbility.
  • Checks whether a link can be opened. Please refer to canOpenLink.
  • Provides the definition of ElementName, Metadata, and Skill.

For Bundlemanager-related APIs, please refer to ohos.bundle.bundle_manager (BundleManager Management).

Constraints

The following features are not provided yet:

  • Obtain other application information.
  • Obtaining the package name of a corresponding application based on a given uid.

Code Contribution

Developers are welcome to contribute code, documentation, etc. For specific contribution processes and methods, please refer to Code Contribution.

Repositories Involved

bundlemanager_bundle_framework

ability_ability_runtime

arkcompiler_cangjie_ark_interop

hiviewdfx_hiviewdfx_cangjie_wrapper

global_global_cangjie_wrapper

Introduction

仓颉包管理封装

Customize your domain