SendableResource

The SendableResource module provides sendable resource information, such as the application bundle name, application module name, and resource ID.

NOTE

The initial APIs of this module are supported since API version 12. Newly added APIs will be marked with a superscript to indicate their earliest API version.

Import a module.

import { resourceManager } from '@kit.LocalizationKit';

SendableResource

Atomic service API: This API can be used in atomic services since API version 12.

System capability: SystemCapability.Global.ResourceManager

Name Type Read-Only Optional Description
bundleName string No No Bundle name of the application.
moduleName string No No Module name of the application.
id number No No Resource ID. The value can be:
- Application resource range: [0x01000000, 0x06FFFFFF] and [0x08000000, 0xFFFFFFFF]
- System resource range: [0x07000000, 0x07FFFFFF]
params collections.Array<string | number> No Yes Other resource parameters, including the resource name, substitution value for the formatting API, and quantifier for the singular-plural formatting API.
type number No Yes Resource type. The options are as follows:
- 10001: color
- 10002: float
- 10003: string
- 10004: plural
- 10005: boolean
- 10006: intarray
- 10007: integer
- 10008: pattern
- 10009: strarray
- 20000: media
- 30000: rawfile
- 40000: symbol