ISSUE_GUIDE.md
# Issue Guide
Use this guide when a HarmonyOS NEXT user reports a requirement, bug, missing capability, confusing behavior, documentation gap, or local DevEco/HVD automation problem that should become a GitHub issue for this repository.
Repository: `linhay/harmony-next.skills`
## Scenario Forms
Choose the issue form that matches the workflow under investigation:
| Scenario | Form | Direct URL |
| --- | --- | --- |
| DevEco Emulator / HVD launch, image root, license, HDC readiness, lifecycle | `deveco-emulator-hvd.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=deveco-emulator-hvd.yml` |
| HarmonyOS Command Line Tools setup, archive install, PATH, `codelinter` | `commandline-tools.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=commandline-tools.yml` |
| HDC evidence, bounded UI action, WebView DevTools socket/fport diagnostics | `device-evidence-bundle.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=device-evidence-bundle.yml` |
| Offline UI/UX audit, UxTestService, Python deps, rule result, false positive/negative | `offline-ux-audit.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=offline-ux-audit.yml` |
| Offline Profiler trace audit, `trace_streamer`, SQLite summary, long spans | `profiler-trace-audit.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=profiler-trace-audit.yml` |
| Reference/API lookup, missing/stale docs, bad slug/anchor/routing | `reference-api-feedback.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=reference-api-feedback.yml` |
| Skill packaging, release asset, `BUILD_INFO.json`, install/versioning | `skill-packaging-release.yml` | `https://github.com/linhay/harmony-next.skills/issues/new?template=skill-packaging-release.yml` |
## Workflow
1. Clarify only the minimum missing detail needed to avoid filing a wrong issue.
2. Reproduce or inspect locally when possible. Prefer machine-readable checks from this skill. Resolve `HARMONY_NEXT_SKILL_DIR` from the loaded `SKILL.md` first; do not assume `harmony-next/` exists at the current repository root:
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/hvd_manager.py" doctor --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/hvd_manager.py" list --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/hvd_manager.py" launch-preflight ... --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/hvd_manager.py" launch ... --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/commandline_tools_manager.py" doctor --tools-root <dir> --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/device_evidence_bundle.py" doctor --deveco-app <DevEco-Studio.app> --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/device_evidence_bundle.py" webview-devtools --deveco-app <DevEco-Studio.app> --target <target> --artifact-dir <dir> --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/device_ui_action.py" tap --deveco-app <DevEco-Studio.app> --target <target> --artifact-dir <dir> --text "<text>" --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/ux_audit_pipeline.py" doctor --deveco-app <DevEco-Studio.app> --python <python-with-ux-deps> --json`
- `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/reference_compat.py" check`
- Source checkout only, when `$HARMONY_NEXT_SKILL_DIR/tests` exists: `python3 -m unittest discover -s "$HARMONY_NEXT_SKILL_DIR/tests"`
3. Preserve structured fields in the issue instead of flattening them into prose:
- `decision`
- `operation`
- `missingConfig`
- `issues`
- `recommendations`
- `hvdRoot`
- `emulator`
- `sdkRoot`
- `imageRoot`
- `imageSubPath`
- `hdc`
- `hdcWait`
- `bootWait`
- `stabilityWait`
- `processExitCode`
- `logPath`
- `feedback`
- `artifacts`
- `commandLedger`
- `layoutSummary`
- `uxService`
- `uxPython`
- `resultCounts`
- `uxSummary`
- `report`
- `traceStreamer`
- `input`
- `outputDir`
- `topCallstack`
- `thresholdHits`
- `frameSlice`
- `failureCode`
- `failureCategory`
- `failureSignal`
- `sockets`
- `staleForwards`
- `fportStatus`
- `httpProbe`
- `coordinateSpace`
4. Redact private data before filing:
- Replace local usernames, absolute private repo paths, app names, bundle IDs, team IDs, account IDs, emails, phone numbers, internal hosts, and private URLs with stable placeholders.
- Keep reproducibility-critical public facts such as DevEco Studio version, Emulator version, HVD type/API version, CLI command shape, error codes, and sanitized JSON field names.
- Do not attach full private logs, screenshots with personal data, HAPs, app source, or raw UI dumps unless the user explicitly asked and redaction is verified.
5. Choose the scenario form from the table above. If a script output includes `feedback.issueTemplate`, prefer that form.
6. Classify the issue:
- `bug`: behavior is broken, unstable, misleading, or inconsistent with documented/script behavior.
- `feature`: user needs a new capability, script command, fixture, or workflow.
- `docs`: documentation, onboarding, examples, routing, or troubleshooting are unclear.
- `question`: only if no concrete repository change is identifiable yet.
7. Create the issue with the matching direct URL, or use `gh issue create --repo linhay/harmony-next.skills --template <form>` when the local GitHub CLI supports the selected issue form.
8. Report the issue URL back to the user with a short summary and local verification result.
## Scenario Template Fields
### DevEco Emulator / HVD
Form: `deveco-emulator-hvd.yml`
Include:
- DevEco Studio path and version.
- `Emulator -version`.
- `Emulator -list -details` redacted summary.
- HVD name/type/API version and `imageSubPath`.
- Whether the path is build SDK root or emulator image root.
- `hdc list targets -v` before and after launch.
- `hvd_manager.py doctor --json` redacted output.
- `launch-preflight` or `launch` JSON result.
- Whether `hdcWait`, `bootWait`, and `stabilityWait` succeeded.
### Command Line Tools
Form: `commandline-tools.yml`
Include:
- OS and shell.
- Existing tools root.
- Whether the user has a direct archive URL or only a Huawei download-center page.
- `commandline_tools_manager.py doctor --tools-root <dir>` output.
- Install/bootstrap command and structured blocked/error output.
### Device Evidence Bundle
Form: `device-evidence-bundle.yml`
Include:
- Command line used for `device_evidence_bundle.py` or `device_ui_action.py`.
- `doctor --json` output with private target labels redacted.
- `capture`, `webview-devtools`, or UI action JSON output, especially `decision`, `failureCode`, `missingConfig`, `layoutSummary`, `coordinateSpace`, `staleForwards`, `httpProbe`, and `artifacts`.
- `command_ledger.json` only after redacting private paths, bundle/app names, and stdout/stderr snippets.
- Whether official CLI fallback was attempted: `hdc list targets -v`, `bm dump`, `aa dump`, bounded `hilog`, `uitest dumpLayout`, `screenCap`, and `file recv`.
Do not attach raw screenshots, raw layout trees, full logs, or app-specific bundle/ability names unless the user explicitly approves and redaction is verified.
### Offline UI/UX Audit
Form: `offline-ux-audit.yml`
Include:
- Command line used for `ux_audit_pipeline.py`.
- `doctor --json` output, including `uxService`, `uxPython`, `connectedTargets`, and `missingConfig`.
- `summary.json`, `ux_summary.json`, and `report.md` after redacting private paths, bundle IDs, and screenshots/layout/log references.
- `resultCounts`, rule codes, `test_state`, `ErrorCode`, `ErrorType`, and short sanitized error snippets.
- Whether `capture-audit` or `audit --evidence-summary` was used.
- If blocked, whether official CLI capture fallback was attempted and whether retrying `audit --layout ... --screenshot ... --bundle ...` changed the result.
Do not attach UxTestService marked images, screenshots, raw `ux_result.json`, raw `layout.json`, or full `hilog` unless the user explicitly approves and redaction is verified.
### Offline Profiler Trace Audit
Form: `profiler-trace-audit.yml`
Include:
- Command line used for `profiler_trace_audit.py`.
- `doctor --json` output, including `traceStreamer`, version, and supported abilities when available.
- `audit` JSON output, especially `decision`, `missingConfig`, `recommendations`, `summary`, `topCallstack`, `thresholdHits`, and `frameSlice`.
- Trace metadata such as file type, `source_type`, `parse_tool`, `tool_version`, `trace_range`, and whether SQLite was created.
- Short sanitized stdout/stderr snippets if `trace_streamer` fails.
Do not attach private raw trace files, private process names, app names, usernames, paths, internal URLs, or account identifiers unless sharing is explicitly approved and redaction is verified.
### Offline Reference / API Lookup
Form: `reference-api-feedback.yml`
Include:
- User query and expected HarmonyOS API/topic.
- Local reference path used.
- Missing/incorrect slug, anchor, API signature, or guide mapping.
- `reference_compat.py check` output when relevant.
### Skill Packaging / Release
Form: `skill-packaging-release.yml`
Include:
- Release tag or nightly run.
- `BUILD_INFO.json` fields from the packaged `.skill.zip`.
- GitHub Actions run URL.
- Expected asset name and actual asset name.
references/INDEX.md
JsEtsAPIReference/api26/hms-js/@hms.health.WearEngineLite.d.ts.md
JsEtsAPIReference/api26/hms-js/@hms.health.service.d.ts.md
JsEtsAPIReference/api26/hms-js/@hms.health.store.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AODNavigationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AREngine.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AccessoryKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AccountKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AgentFrameworkKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AppGalleryKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.AppLinkingKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CallKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CallServiceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CarKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CloudFoundationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ConfidentialSpaceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CoreSpeechKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.CoreVisionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.DataAugmentationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.DeskTopExtensionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.DeviceSecurityKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseDataGuardKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseSpaceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseThreatProtectionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.FASTKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.FileManagerServiceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.GameServiceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.GraphicsAccelerateKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.HealthServiceKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.IAPKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.IntentsKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.LiveViewKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.MapKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.NaturalLanguageKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.NearLinkKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.NetworkBoostKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.OnlineAuthenticationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.PDFKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.PaymentKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.Penkit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.PreviewKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.PushKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ReaderKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.RemoteCommunicationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.RingtoneKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ScanKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ScenarioFusionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ScreenTimeGuardKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ServiceCollaborationKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ServiceSupportKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.ShareKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.SpatialReconKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.SpeechKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.StatusBarExtensionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.StoreKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.UIDesignKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.VisionKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.WalletKit.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.WearEngine.d.ts.md
JsEtsAPIReference/api26/hms-kits/@kit.WeatherServiceKit.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.partnerAgent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.ranging.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodSubtype.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.PiPWindow.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.UiTest.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.WorkSchedulerExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.ability.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.dataUriUtils.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.errorCode.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.featureAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.particleAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.screenLockFileManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ability.wantConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.abilityAccessCtrl.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.GesturePath.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.GesturePoint.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.account.appAccount.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.account.distributedAccount.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.account.osAccount.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.advertising.AdsServiceExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.advertising.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.ai.mindSporeLite.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.animator.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Ability.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityLifecycleCallback.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityStage.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ActionExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AppServiceExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ApplicationStateChangeCallback.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AtomicServiceOptions.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcess.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcessArgs.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcessOptions.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandler.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Configuration.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ConfigurationConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.DriverExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EmbeddableUIAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EnvironmentCallback.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.FenceExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.FenceExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentDecorator.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentEntryExecutor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentExecutor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.OpenLinkOptions.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.PrintExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ShareExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.StartOptions.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIExtensionContentSession.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.VpnExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Want.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.abilityDelegatorRegistry.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.abilityManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appMemoryOptimizer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appRecovery.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.application.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.autoFillManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.autoStartupManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.childProcessManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.common.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.contextConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.continueManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.dataUriUtils.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.dialogRequest.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.errorManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.hyperSnapManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.insightIntent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.insightIntentProvider.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.kioskManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.scriptManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.systemConfiguration.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.wantAgent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.wantConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.AgentExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.AgentUIExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.agentConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupConfig.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupConfigEntry.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupListener.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.startupManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.FormEditExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.FormExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.LiveFormExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formBindingData.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formInfo.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formProvider.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.AccessibilityExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.BackupExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.Configuration.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.ConfigurationConstant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.DistributedExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.DistributedExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.Want.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.abilityDelegatorRegistry.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.appManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.formBindingData.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.formError.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.formInfo.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.formProvider.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.testRunner.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.application.uriPermissionManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcAlphabetIndexer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcList.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcScrollBar.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcSwiper.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.Prefetcher.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.StateManagement.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.UIContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.WithEnv.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.componentSnapshot.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.componentUtils.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkDynamicLayout.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyColumnLayout.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyDynamicLayout.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyWaterFlowLayout.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ContainerReader.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.SelectionContainer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.dragController.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.drawableDescriptor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.inspector.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.layoutAlgorithm.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.lazyLayoutAlgorithm.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.modifier.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.node.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.observer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.shape.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.theme.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.uiExtension.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.uiMaterial.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.backgroundTaskManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.base.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.batteryInfo.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.a2dp.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.access.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.baseProfile.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.ble.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.common.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.connection.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.constant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.hfp.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.hid.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.map.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.opp.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.pan.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.pbap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.socket.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetooth.wearDetection.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bluetoothManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.buffer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.bundleManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.defaultAppManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.launcherBundleManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.overlay.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.pluginBundleManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.shortcutManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundle.skillManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bundleState.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.busManager.serial.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.bytrace.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.calendarManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.commonEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.commonEventManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.connectedTag.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.contact.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.continuation.continuationManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.convertxml.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.curves.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.customization.customConfig.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.ValuesBucket.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.cloudData.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.cloudExtension.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.commonType.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.dataAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.dataShare.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.dataSharePredicates.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.distributedData.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.distributedDataObject.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.distributedKVStore.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.intelligence.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.preferences.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.rdb.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.relationalStore.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.storage.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.unifiedDataChannel.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.uniformDataStruct.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.data.uniformTypeDescriptor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.deviceAttest.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.deviceInfo.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.display.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedDeviceManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedHardware.deviceManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedHardware.mechanicManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedsched.abilityConnectionManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedsched.linkEnhance.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.distributedsched.proxyChannelManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.dlpPermission.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.document.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.driver.deviceManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.effectKit.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.accountManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.adminManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.applicationManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.bluetoothManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.browser.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.bundleManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.common.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.deviceControl.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.deviceInfo.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.deviceSettings.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.locationManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.networkManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.restrictions.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.securityManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.systemManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.telephonyManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.usbManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.enterprise.wifiManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.events.emitter.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.fastbuffer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.faultLogger.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.BackupExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.cloudSync.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.cloudSyncManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.environment.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.fileAccess.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.fileuri.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.fs.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.hash.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.keyManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.photoAccessHelper.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.picker.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.securityLabel.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.statvfs.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.file.storageStatistics.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.fileio.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.fileshare.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.font.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.geoLocationManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.geolocation.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.colorSpaceManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.common2D.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.displaySync.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.drawing.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.hdrCapability.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.scene.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.text.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.graphics.uiEffect.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiAppEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiTraceChain.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiTraceMeter.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hichecker.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hidebug.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hilog.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiviewdfx.hiAppEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiviewdfx.hiRetrieval.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.hiviewdfx.jsLeakWatcher.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.i18n.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.identifier.oaid.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.inputMethod.ExtraConfig.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.inputMethod.Panel.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.inputMethod.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.inputMethodEngine.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.intelligentScene.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.intl.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.matrix4.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.measure.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.mediaquery.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.audio.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.audioHaptic.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.avCastPickerParam.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.avMusicTemplate.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.avsession.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.camera.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.cameraPicker.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.drm.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.image.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.media.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.movingphotoview.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.systemSoundManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.videoProcessing.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimedia.videoProcessingEngine.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalAwareness.deviceStatus.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalAwareness.metadataBinding.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalAwareness.motion.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalAwareness.onScreen.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalAwareness.userStatus.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.gestureEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.infraredEmitter.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.inputConsumer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.inputDevice.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.inputDeviceCooperate.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.inputEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.inputEventClient.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.intentionCode.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.keyCode.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.keyEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.mouseEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.pointer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.multimodalInput.touchEvent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.advertising.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.cdsm.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.constant.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.dataTransfer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.manager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.remoteDevice.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.scan.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nearlink.ssap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.connection.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.eap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.ethernet.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.http.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.mdns.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.netFirewall.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.networkSecurity.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.policy.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.sharing.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.socket.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.statistics.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.vpn.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.vpnExtension.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.net.webSocket.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nfc.cardEmulation.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nfc.controller.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.nfc.tag.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.notification.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.notificationExtensionSubscription.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.notificationManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.pasteboard.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.pluginComponent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.power.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.print.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.privacyManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.process.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.prompt.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.promptAction.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.reminderAgent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.reminderAgentManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.request.cacheDownload.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.request.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.backgroundProcessManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.backgroundTaskManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.deviceStandby.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.systemload.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.usageStatistics.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.resourceschedule.workScheduler.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.router.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.rpc.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.runningLock.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.screenLock.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.screenshot.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.secureElement.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.CryptoExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.asset.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.cert.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.certManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.certManagerDialog.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.cryptoFramework.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.huks.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.huksExternalCrypto.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.security.identifySensitiveContent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.selectionInput.SelectionExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.selectionInput.SelectionExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.selectionInput.SelectionPanel.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.selectionInput.selectionManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.sensor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.settings.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.settingsLite.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.statfs.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.stationary.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.systemDateTime.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.systemTime.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.taskpool.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.call.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.data.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.esim.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.observer.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.radio.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.sim.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.sms.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.telephony.vcard.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.test.PerfTest.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.thermal.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.uiAppearance.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.uri.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.url.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.usb.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.usbManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.usbManager.serial.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.userIAM.faceAuth.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.userIAM.userAccessCtrl.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.userIAM.userAuth.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.ArrayList.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.Deque.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.HashMap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.HashSet.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.LightWeightMap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.LightWeightSet.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.LinkedList.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.List.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.PlainArray.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.Queue.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.Stack.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.TreeMap.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.TreeSet.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.Vector.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.json.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.util.stream.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.vibrator.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wallpaper.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wantAgent.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.web.WebNativeMessagingExtensionAbility.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.web.WebNativeMessagingExtensionContext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.web.netErrorList.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.web.webNativeMessagingExtensionManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.web.webview.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wifi.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wifiManager.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wifiManagerExt.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.wifiext.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.window.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.window.floatView.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.window.floatingBall.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.worker.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.xml.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@ohos.zlib.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.app.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.battery.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.bluetooth.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.brightness.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.cipher.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.configuration.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.device.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.fetch.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.file.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.geolocation.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.mediaquery.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.network.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.notification.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.package.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.prompt.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.request.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.router.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.sensor.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.storage.d.ts.md
JsEtsAPIReference/api26/openharmony-js/@system.vibrator.d.ts.md
JsEtsAPIReference/api26/openharmony-js/permissions.d.ts.md
JsEtsAPIReference/errors/API错误码.md
JsEtsAPIReference/errors/AR Engine错误码.md
JsEtsAPIReference/errors/AntifraudPicker(反诈选择器).md
JsEtsAPIReference/errors/ArkTS API 错误码.md
JsEtsAPIReference/errors/ArkTS API错误码.md
JsEtsAPIReference/errors/ArkTS 错误码.md
JsEtsAPIReference/errors/ArkTS组件错误码.md
JsEtsAPIReference/errors/ArkTS错误码.md
JsEtsAPIReference/errors/Audio错误码.md
JsEtsAPIReference/errors/BusinessRiskIntelligentDetection(业务风险检测).md
JsEtsAPIReference/errors/C API错误码.md
JsEtsAPIReference/errors/Camera错误码.md
JsEtsAPIReference/errors/Canvas组件错误码.md
JsEtsAPIReference/errors/Contacts错误码.md
JsEtsAPIReference/errors/DLP服务错误码.md
JsEtsAPIReference/errors/DRM错误码.md
JsEtsAPIReference/errors/DeviceVerify(应用设备状态检测).md
JsEtsAPIReference/errors/DistributedSchedule错误码.md
JsEtsAPIReference/errors/DlpAntiPeep(防窥保护).md
JsEtsAPIReference/errors/DrawableDescriptor错误码.md
JsEtsAPIReference/errors/Es2abc 编译器错误码.md
JsEtsAPIReference/errors/FIDO.md
JsEtsAPIReference/errors/Faultlogger 错误码.md
JsEtsAPIReference/errors/HTTP错误码.md
JsEtsAPIReference/errors/HUKS错误码.md
JsEtsAPIReference/errors/HiCollie错误码.md
JsEtsAPIReference/errors/HiDebug CpuUsage错误码.md
JsEtsAPIReference/errors/HiDebug Trace错误码.md
JsEtsAPIReference/errors/HiDebug错误码.md
JsEtsAPIReference/errors/I18n错误码.md
JsEtsAPIReference/errors/Image错误码.md
JsEtsAPIReference/errors/JsLeakWatcher错误码.md
JsEtsAPIReference/errors/MDNS错误码.md
JsEtsAPIReference/errors/Media错误码.md
JsEtsAPIReference/errors/NFC错误码.md
JsEtsAPIReference/errors/NodeAdapter错误码.md
JsEtsAPIReference/errors/OHIPCErrorCode.md
JsEtsAPIReference/errors/REST API错误码.md
JsEtsAPIReference/errors/RPC错误码.md
JsEtsAPIReference/errors/RunningLock锁错误码.md
JsEtsAPIReference/errors/SE(secureElement)错误码.md
JsEtsAPIReference/errors/SOCKET 错误码.md
JsEtsAPIReference/errors/SOTER.md
JsEtsAPIReference/errors/SafetyDetect(安全检测).md
JsEtsAPIReference/errors/SecurityAudit(安全审计).md
JsEtsAPIReference/errors/SuperPrivacyMode(超级隐私模式).md
JsEtsAPIReference/errors/TrustedAppService(可信应用服务).md
JsEtsAPIReference/errors/TrustedAuthentication (数字盾服务).md
JsEtsAPIReference/errors/Typescript Compiler错误码介绍.md
JsEtsAPIReference/errors/UIExtension错误码.md
JsEtsAPIReference/errors/UI上下文错误码.md
JsEtsAPIReference/errors/UI界面.md
JsEtsAPIReference/errors/UI编译.md
JsEtsAPIReference/errors/USB服务错误码.md
JsEtsAPIReference/errors/VPN错误码.md
JsEtsAPIReference/errors/Video组件错误码.md
JsEtsAPIReference/errors/WIFI错误码.md
JsEtsAPIReference/errors/Webview错误码.md
JsEtsAPIReference/errors/XComponent组件错误码.md
JsEtsAPIReference/errors/backgroundProcessManager错误码.md
JsEtsAPIReference/errors/backgroundTaskManager错误码.md
JsEtsAPIReference/errors/crypto framework错误码.md
JsEtsAPIReference/errors/perftest错误码.md
JsEtsAPIReference/errors/reminderAgentManager错误码.md
JsEtsAPIReference/errors/uitest错误码.md
JsEtsAPIReference/errors/webSocket错误码.md
JsEtsAPIReference/errors/workScheduler错误码.md
JsEtsAPIReference/errors/zlib子系统错误码.md
JsEtsAPIReference/errors/上传下载错误码.md
JsEtsAPIReference/errors/事件错误码.md
JsEtsAPIReference/errors/交互事件错误码.md
JsEtsAPIReference/errors/代理通道管理错误码.md
JsEtsAPIReference/errors/以太网连接错误码.md
JsEtsAPIReference/errors/企业设备管理错误码.md
JsEtsAPIReference/errors/传感器错误码.md
JsEtsAPIReference/errors/位置服务错误码.md
JsEtsAPIReference/errors/元能力子系统错误码.md
JsEtsAPIReference/errors/全局快捷键管理错误码.md
JsEtsAPIReference/errors/关系型数据库错误码.md
JsEtsAPIReference/errors/关键资产存储服务错误码.md
JsEtsAPIReference/errors/内核错误码.md
JsEtsAPIReference/errors/分布式数据对象错误码.md
JsEtsAPIReference/errors/分布式键值数据库错误码.md
JsEtsAPIReference/errors/划词服务错误码.md
JsEtsAPIReference/errors/剪贴板错误码.md
JsEtsAPIReference/errors/动作感知错误码.md
JsEtsAPIReference/errors/包管理子系统通用错误码.md
JsEtsAPIReference/errors/半模态错误码.md
JsEtsAPIReference/errors/卡片错误码.md
JsEtsAPIReference/errors/反色能力错误码.md
JsEtsAPIReference/errors/图像AI分析错误码.md
JsEtsAPIReference/errors/图形图像.md
JsEtsAPIReference/errors/图形绘制与显示错误码.md
JsEtsAPIReference/errors/增强连接错误码.md
JsEtsAPIReference/errors/媒体会话管理错误码.md
JsEtsAPIReference/errors/媒体库错误码.md
JsEtsAPIReference/errors/屏幕错误码.md
JsEtsAPIReference/errors/属性字符串错误码.md
JsEtsAPIReference/errors/广告服务框架错误码.md
JsEtsAPIReference/errors/应用事件打点错误码.md
JsEtsAPIReference/errors/开放匿名设备标识服务错误码.md
JsEtsAPIReference/errors/弹窗错误码.md
JsEtsAPIReference/errors/截图错误码.md
JsEtsAPIReference/errors/打印服务错误码.md
JsEtsAPIReference/errors/扩展认证错误码.md
JsEtsAPIReference/errors/拖拽事件错误码.md
JsEtsAPIReference/errors/振动错误码.md
JsEtsAPIReference/errors/接口调用异常错误码.md
JsEtsAPIReference/errors/数据共享错误码.md
JsEtsAPIReference/errors/文件管理错误码.md
JsEtsAPIReference/errors/无障碍子系统错误码.md
JsEtsAPIReference/errors/日历服务错误码.md
JsEtsAPIReference/errors/时间时区服务错误码.md
JsEtsAPIReference/errors/智慧数据平台错误码.md
JsEtsAPIReference/errors/机械体控制模块错误码.md
JsEtsAPIReference/errors/注册节点渲染状态监听错误码.md
JsEtsAPIReference/errors/流量管理错误码.md
JsEtsAPIReference/errors/渲染节点错误码.md
JsEtsAPIReference/errors/源码混淆错误码.md
JsEtsAPIReference/errors/滚动类组件错误码.md
JsEtsAPIReference/errors/热管理错误码.md
JsEtsAPIReference/errors/焦点错误码.md
JsEtsAPIReference/errors/状态管理错误码.md
JsEtsAPIReference/errors/环境变量错误码.md
JsEtsAPIReference/errors/用户状态感知错误码.md
JsEtsAPIReference/errors/用户界面外观服务错误码.md
JsEtsAPIReference/errors/用户认证错误码.md
JsEtsAPIReference/errors/用户首选项错误码.md
JsEtsAPIReference/errors/电话子系统错误码.md
JsEtsAPIReference/errors/窗口错误码.md
JsEtsAPIReference/errors/策略管理错误码.md
JsEtsAPIReference/errors/系统电源管理错误码.md
JsEtsAPIReference/errors/系统资源错误码.md
JsEtsAPIReference/errors/统一数据管理框架错误码.md
JsEtsAPIReference/errors/编译工具链错误码.md
JsEtsAPIReference/errors/编译错误码.md
JsEtsAPIReference/errors/网络共享错误码.md
JsEtsAPIReference/errors/网络安全校验错误码.md
JsEtsAPIReference/errors/网络连接管理错误码.md
JsEtsAPIReference/errors/自定义节点错误码.md
JsEtsAPIReference/errors/色彩管理错误码.md
JsEtsAPIReference/errors/蓝牙服务子系统错误码.md
JsEtsAPIReference/errors/融合短距服务子系统错误码.md
JsEtsAPIReference/errors/视频处理引擎错误码.md
JsEtsAPIReference/errors/记忆链接错误码.md
JsEtsAPIReference/errors/设备状态感知错误码.md
JsEtsAPIReference/errors/设备管理错误码.md
JsEtsAPIReference/errors/设置数据项错误码.md
JsEtsAPIReference/errors/访问控制错误码.md
JsEtsAPIReference/errors/证书管理对话框错误码.md
JsEtsAPIReference/errors/证书管理错误码.md
JsEtsAPIReference/errors/证书错误码.md
JsEtsAPIReference/errors/语言基础类库错误码.md
JsEtsAPIReference/errors/账号管理错误码.md
JsEtsAPIReference/errors/资源管理错误码.md
JsEtsAPIReference/errors/输入法框架错误码.md
JsEtsAPIReference/errors/输入设备错误码.md
JsEtsAPIReference/errors/通用错误码.md
JsEtsAPIReference/errors/通知错误码.md
JsEtsAPIReference/errors/通行密钥.md
JsEtsAPIReference/errors/锁屏敏感数据管理错误码.md
JsEtsAPIReference/errors/错误码.md
JsEtsAPIReference/errors/防火墙错误码.md
JsEtsAPIReference/errors/附属节点错误码.md
JsEtsAPIReference/errors/页面路由错误码.md
JsEtsAPIReference/errors/驱动错误码.md
JsEtsAPIReference/errors/鼠标光标错误码.md
JsEtsAPIReference/guides/!!语法:双向绑定.md
JsEtsAPIReference/guides/$$语法:系统组件双向同步.md
JsEtsAPIReference/guides/@Builder装饰器:自定义构建函数.md
JsEtsAPIReference/guides/@ObservedV2与@Trace:类属性变化观测.md
JsEtsAPIReference/guides/@Observed与@ObjectLink:V1数据对象观测.md
JsEtsAPIReference/guides/@Reusable装饰器:V1组件复用.md
JsEtsAPIReference/guides/Ability Kit术语.md
JsEtsAPIReference/guides/AppStorageV2(应用全局的UI状态存储).md
JsEtsAPIReference/guides/Connectivity Kit术语.md
JsEtsAPIReference/guides/Environment:设备环境查询.md
JsEtsAPIReference/guides/ExtensionAbility组件.md
JsEtsAPIReference/guides/MDM Kit开发指南.md
JsEtsAPIReference/guides/MDM Kit术语.md
JsEtsAPIReference/guides/NFC标签读写开发指南.md
JsEtsAPIReference/guides/PersistenceV2(持久化存储UI状态).md
JsEtsAPIReference/guides/Sendable对象简介.md
JsEtsAPIReference/guides/UIAbility备份恢复.md
JsEtsAPIReference/guides/UIAbility组件启动模式.md
JsEtsAPIReference/guides/UIAbility组件基本用法.md
JsEtsAPIReference/guides/UI国际化.md
JsEtsAPIReference/guides/User-Agent开发指导.md
JsEtsAPIReference/guides/Worker简介.md
JsEtsAPIReference/guides/addMonitor与clearMonitor开发指南.md
JsEtsAPIReference/guides/app.json5配置文件.md
JsEtsAPIReference/guides/applySync与flushUpdates与flushUIUpdates接口:同步刷新.md
JsEtsAPIReference/guides/bm工具.md
JsEtsAPIReference/guides/if-else:条件渲染.md
JsEtsAPIReference/guides/makeObserved接口:将非观察数据变为可观察数据.md
JsEtsAPIReference/guides/module.json5配置文件.md
JsEtsAPIReference/guides/wrapBuilder:封装全局@Builder.md
JsEtsAPIReference/guides/云侧服务准备.md
JsEtsAPIReference/guides/交互基础机制说明.md
JsEtsAPIReference/guides/代理提醒(ArkTS).md
JsEtsAPIReference/guides/使用Picker选择媒体库资源.md
JsEtsAPIReference/guides/使用RSA密钥对分段签名验签(PKCS1模式).md
JsEtsAPIReference/guides/使用RSA密钥对(PKCS1模式)签名验签.md
JsEtsAPIReference/guides/使用Web组件上传文件.md
JsEtsAPIReference/guides/保存媒体库资源.md
JsEtsAPIReference/guides/华为账号一键登录(获取手机号和UnionID-OpenID).md
JsEtsAPIReference/guides/单元测试框架使用指导.md
JsEtsAPIReference/guides/受限开放权限.md
JsEtsAPIReference/guides/向用户申请授权.md
JsEtsAPIReference/guides/启动应用内的UIAbility组件.md
JsEtsAPIReference/guides/图片解码内存优化.md
JsEtsAPIReference/guides/基于服务账号生成鉴权令牌.md
JsEtsAPIReference/guides/基于服务账号生成鉴权令牌(Device Security).md
JsEtsAPIReference/guides/声明权限.md
JsEtsAPIReference/guides/多应用管控.md
JsEtsAPIReference/guides/安全控件概述.md
JsEtsAPIReference/guides/应用上下文Context.md
JsEtsAPIReference/guides/应用启动框架AppStartup.md
JsEtsAPIReference/guides/应用沙箱目录.md
JsEtsAPIReference/guides/开发准备(媒体库).md
JsEtsAPIReference/guides/开放权限(用户授权).md
JsEtsAPIReference/guides/开通Device Security服务.md
JsEtsAPIReference/guides/支持单复数.md
JsEtsAPIReference/guides/支持的语言.md
JsEtsAPIReference/guides/支持键盘输入事件.md
JsEtsAPIReference/guides/数据库备份与恢复.md
JsEtsAPIReference/guides/日志分析.md
JsEtsAPIReference/guides/智能填充服务.md
JsEtsAPIReference/guides/查询当前状态场景.md
JsEtsAPIReference/guides/栅格布局 (GridRow-GridCol).md
JsEtsAPIReference/guides/消息认证码计算HMAC.md
JsEtsAPIReference/guides/状态管理V1-V2迁移指导.md
JsEtsAPIReference/guides/状态管理V1和V2混用指导(API version 19及之后).md
JsEtsAPIReference/guides/状态管理概述.md
JsEtsAPIReference/guides/用户文件URI介绍.md
JsEtsAPIReference/guides/申请受限权限.md
JsEtsAPIReference/guides/申请推送场景化消息权益.md
JsEtsAPIReference/guides/申请访问剪贴板权限.md
JsEtsAPIReference/guides/窗口开发术语.md
JsEtsAPIReference/guides/线程间通信对象概述.md
JsEtsAPIReference/guides/组件启动规则(FA模型).md
JsEtsAPIReference/guides/组件启动规则(Stage模型).md
JsEtsAPIReference/guides/耗时任务并发场景简介.md
JsEtsAPIReference/guides/自定义渲染(XComponent).md
JsEtsAPIReference/guides/自定义节点概述.md
JsEtsAPIReference/guides/获取Push Token.md
JsEtsAPIReference/guides/获取支持的编解码能力.md
JsEtsAPIReference/guides/设置页签栏的悬浮样式.md
JsEtsAPIReference/guides/资源分类与访问.md
JsEtsAPIReference/guides/通过用户首选项实现数据持久化.md
JsEtsAPIReference/guides/通过键值型数据库实现数据持久化.md
JsEtsAPIReference/guides/配置ArkTS卡片的配置文件.md
JsEtsAPIReference/guides/非对称密钥生成和转换规格.md
JsEtsAPIReference/guides/预览流二次处理(C-C++).md
JsEtsAPIReference/guides/(可选)开发消息回执.md
JsEtsAPIReference/guides/(可选)配置应用内购买服务参数.md
JsEtsAPIReference/modules/ohos/@ohos.FusionConnectivity.PartnerAgentExtensionAbility (支持设备状态通知的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.FusionConnectivity.PartnerAgentExtensionContext (设备状态通知能力上下文).md
JsEtsAPIReference/modules/ohos/@ohos.FusionConnectivity.partnerAgent(设备状态通知模块).md
JsEtsAPIReference/modules/ohos/@ohos.InputMethodExtensionAbility (InputMethodExtensionAbility).md
JsEtsAPIReference/modules/ohos/@ohos.InputMethodExtensionContext (InputMethodExtensionContext).md
JsEtsAPIReference/modules/ohos/@ohos.InputMethodSubtype (输入法子类型).md
JsEtsAPIReference/modules/ohos/@ohos.PiPWindow (画中画窗口).md
JsEtsAPIReference/modules/ohos/@ohos.UiTest.md
JsEtsAPIReference/modules/ohos/@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调).md
JsEtsAPIReference/modules/ohos/@ohos.ability.ability (Ability模块).md
JsEtsAPIReference/modules/ohos/@ohos.ability.dataUriUtils (DataUriUtils模块).md
JsEtsAPIReference/modules/ohos/@ohos.ability.errorCode (ErrorCode).md
JsEtsAPIReference/modules/ohos/@ohos.ability.featureAbility (FeatureAbility模块).md
JsEtsAPIReference/modules/ohos/@ohos.ability.particleAbility (ParticleAbility模块).md
JsEtsAPIReference/modules/ohos/@ohos.ability.screenLockFileManager (锁屏敏感数据管理).md
JsEtsAPIReference/modules/ohos/@ohos.ability.wantConstant (wantConstant).md
JsEtsAPIReference/modules/ohos/@ohos.abilityAccessCtrl (程序访问控制管理).md
JsEtsAPIReference/modules/ohos/@ohos.accessibility (辅助应用).md
JsEtsAPIReference/modules/ohos/@ohos.accessibility.GesturePath (手势路径).md
JsEtsAPIReference/modules/ohos/@ohos.accessibility.GesturePoint (手势触摸点).md
JsEtsAPIReference/modules/ohos/@ohos.account.appAccount (应用账号管理).md
JsEtsAPIReference/modules/ohos/@ohos.account.distributedAccount (分布式账号管理).md
JsEtsAPIReference/modules/ohos/@ohos.account.osAccount (系统账号管理).md
JsEtsAPIReference/modules/ohos/@ohos.advertising (广告服务框架).md
JsEtsAPIReference/modules/ohos/@ohos.advertising.AdComponent (广告展示组件).md
JsEtsAPIReference/modules/ohos/@ohos.advertising.AdsServiceExtensionAbility(广告扩展服务).md
JsEtsAPIReference/modules/ohos/@ohos.advertising.AutoAdComponent (轮播广告展示组件).md
JsEtsAPIReference/modules/ohos/@ohos.ai.mindSporeLite (端侧AI框架).md
JsEtsAPIReference/modules/ohos/@ohos.animator (动画).md
JsEtsAPIReference/modules/ohos/@ohos.annotation (注解).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.Ability (Ability基类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.AbilityConstant (Ability相关常量).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.AbilityStage (AbilityStage组件管理器).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ActionExtensionAbility (支持业务操作自定义的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.AppServiceExtensionAbility (应用后台服务扩展组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ApplicationStateChangeCallback (应用进程状态变化监听器).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.AtomicServiceOptions (openAtomicService可选参数).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ChildProcess (子进程基类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ChildProcessArgs (子进程参数).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ChildProcessOptions (子进程启动选项).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.CompletionHandler (拉起应用结果的操作类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.CompletionHandlerForAbilityStartCallback (拉起应用结果回调的操作类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.CompletionHandlerForAtomicService (打开元服务结果的操作类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.Configuration (环境变量).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ConfigurationConstant (环境变量相关的常量定义).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.DriverExtensionAbility (驱动程序扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.EmbeddableUIAbility (可嵌入式UIAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.EmbeddedUIExtensionAbility (支持跨进程界面嵌入的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.EnvironmentCallback (系统环境变化监听器).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ExtensionAbility (扩展能力基类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.FenceExtensionAbility (FenceExtensionAbility).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.FenceExtensionContext (FenceExtensionContext).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.InsightIntentContext (意图执行上下文).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.InsightIntentDecorator (意图装饰器定义).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.InsightIntentEntryExecutor (@InsightIntentEntry的意图执行基类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.InsightIntentExecutor (意图执行基类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.OpenLinkOptions (openLink的可选参数).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.PhotoEditorExtensionAbility (支持图片编辑能力的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.PrintExtensionAbility (打印扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.ShareExtensionAbility (支持分享详情页接入的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.StartOptions (startAbility的可选参数).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.UIAbility (带界面的应用组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.UIExtensionAbility (带界面的ExtensionAbility组件).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.UIExtensionContentSession (UIExtensionAbility界面操作类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.VpnExtensionAbility (三方VPN能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.Want (Want).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.abilityDelegatorRegistry (AbilityDelegatorRegistry).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.abilityLifecycleCallback (UIAbility生命周期回调监听器).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.abilityManager (Ability信息管理).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.appManager (应用管理).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.appRecovery (应用故障恢复).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.application (应用工具类).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.autoFillManager (自动填充框架).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.autoStartupManager (开机自启管理能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.childProcessManager (子进程管理).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.common (Ability公共模块).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.contextConstant (Context相关常量).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.continueManager (跨端迁移).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.dataUriUtils (DataUriUtils模块).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.dialogRequest (dialogRequest模块).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.errorManager (错误管理模块).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.insightIntent (意图框架基础定义).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.insightIntentProvider (意图提供方管理能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.kioskManager (Kiosk模式管理).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.sendableContextManager (sendable上下文管理).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.wantAgent (WantAgent模块).md
JsEtsAPIReference/modules/ohos/@ohos.app.ability.wantConstant (Want常量).md
JsEtsAPIReference/modules/ohos/@ohos.app.appstartup.StartupConfig (启动框架配置信息).md
JsEtsAPIReference/modules/ohos/@ohos.app.appstartup.StartupConfigEntry (启动框架配置).md
JsEtsAPIReference/modules/ohos/@ohos.app.appstartup.StartupListener (启动框架任务监听器).md
JsEtsAPIReference/modules/ohos/@ohos.app.appstartup.StartupTask (启动框架任务).md
JsEtsAPIReference/modules/ohos/@ohos.app.appstartup.startupManager (启动框架管理能力).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.FormEditExtensionAbility (FormEditExtensionAbility).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.FormExtensionAbility (FormExtensionAbility).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.LiveFormExtensionAbility (LiveFormExtensionAbility).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.formBindingData (卡片数据绑定类).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.formInfo (formInfo).md
JsEtsAPIReference/modules/ohos/@ohos.app.form.formProvider (formProvider).md
JsEtsAPIReference/modules/ohos/@ohos.application.AccessibilityExtensionAbility (辅助功能扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.application.BackupExtensionAbility (备份恢复扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.application.Configuration (Configuration).md
JsEtsAPIReference/modules/ohos/@ohos.application.ConfigurationConstant (ConfigurationConstant).md
JsEtsAPIReference/modules/ohos/@ohos.application.DistributedExtensionAbility (协同Extension).md
JsEtsAPIReference/modules/ohos/@ohos.application.NotificationSubscriberExtensionAbility (通知订阅扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.application.NotificationSubscriberExtensionContext (通知订阅扩展上下文).md
JsEtsAPIReference/modules/ohos/@ohos.application.Want (Want).md
JsEtsAPIReference/modules/ohos/@ohos.application.abilityDelegatorRegistry (AbilityDelegatorRegistry).md
JsEtsAPIReference/modules/ohos/@ohos.application.appManager (appManager).md
JsEtsAPIReference/modules/ohos/@ohos.application.formBindingData (卡片数据绑定类).md
JsEtsAPIReference/modules/ohos/@ohos.application.formError (formError).md
JsEtsAPIReference/modules/ohos/@ohos.application.formInfo (formInfo).md
JsEtsAPIReference/modules/ohos/@ohos.application.formProvider (formProvider).md
JsEtsAPIReference/modules/ohos/@ohos.application.testRunner (TestRunner).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.Prefetcher (Prefetching).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.StateManagement (状态管理).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.UIContext (UIContext).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.componentSnapshot (组件截图).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.componentUtils (componentUtils).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.dragController (DragController).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.drawableDescriptor (DrawableDescriptor).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.inspector (布局回调).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.node.md
JsEtsAPIReference/modules/ohos/@ohos.arkui.observer (无感监听).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.shape (形状).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.theme(主题换肤).md
JsEtsAPIReference/modules/ohos/@ohos.arkui.uiExtension (uiExtension).md
JsEtsAPIReference/modules/ohos/@ohos.backgroundTaskManager (后台任务管理).md
JsEtsAPIReference/modules/ohos/@ohos.base (公共回调信息).md
JsEtsAPIReference/modules/ohos/@ohos.batteryInfo (电量信息).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth (蓝牙).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.a2dp (蓝牙a2dp模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.access (蓝牙access模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.baseProfile (蓝牙baseProfile模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.ble (蓝牙ble模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.common (蓝牙common模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.connection (蓝牙connection模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.constant (蓝牙constant模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.hfp (蓝牙hfp模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.hid (蓝牙hid模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.map (蓝牙map模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.pan (蓝牙pan模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.pbap (蓝牙pbap模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetooth.socket (蓝牙socket模块).md
JsEtsAPIReference/modules/ohos/@ohos.bluetoothManager (蓝牙).md
JsEtsAPIReference/modules/ohos/@ohos.buffer (Buffer).md
JsEtsAPIReference/modules/ohos/@ohos.bundle (Bundle模块).md
JsEtsAPIReference/modules/ohos/@ohos.bundle.bundleManager (应用程序包管理模块).md
JsEtsAPIReference/modules/ohos/@ohos.bundle.defaultAppManager (默认应用管理).md
JsEtsAPIReference/modules/ohos/@ohos.bundle.launcherBundleManager (launcherBundleManager模块).md
JsEtsAPIReference/modules/ohos/@ohos.bundle.overlay (overlay模块).md
JsEtsAPIReference/modules/ohos/@ohos.bundle.shortcutManager (shortcutManager模块).md
JsEtsAPIReference/modules/ohos/@ohos.bundleState (设备使用信息统计).md
JsEtsAPIReference/modules/ohos/@ohos.bytrace (性能打点).md
JsEtsAPIReference/modules/ohos/@ohos.calendarManager (日程管理能力).md
JsEtsAPIReference/modules/ohos/@ohos.commonEvent (公共事件模块).md
JsEtsAPIReference/modules/ohos/@ohos.commonEventManager (公共事件模块).md
JsEtsAPIReference/modules/ohos/@ohos.connectedTag (有源标签).md
JsEtsAPIReference/modules/ohos/@ohos.contact (联系人).md
JsEtsAPIReference/modules/ohos/@ohos.continuation.continuationManager (流转_协同管理).md
JsEtsAPIReference/modules/ohos/@ohos.convertxml (xml转换JavaScript).md
JsEtsAPIReference/modules/ohos/@ohos.curves (插值计算).md
JsEtsAPIReference/modules/ohos/@ohos.customization.customConfig (定制配置).md
JsEtsAPIReference/modules/ohos/@ohos.data.UdmfComponents(内容卡片).md
JsEtsAPIReference/modules/ohos/@ohos.data.ValuesBucket (数据集).md
JsEtsAPIReference/modules/ohos/@ohos.data.cloudData (端云服务).md
JsEtsAPIReference/modules/ohos/@ohos.data.commonType (数据通用类型).md
JsEtsAPIReference/modules/ohos/@ohos.data.dataAbility (DataAbility谓词).md
JsEtsAPIReference/modules/ohos/@ohos.data.dataShare (数据共享).md
JsEtsAPIReference/modules/ohos/@ohos.data.dataSharePredicates (数据共享谓词).md
JsEtsAPIReference/modules/ohos/@ohos.data.distributedData (分布式数据管理).md
JsEtsAPIReference/modules/ohos/@ohos.data.distributedDataObject (分布式数据对象).md
JsEtsAPIReference/modules/ohos/@ohos.data.distributedKVStore (分布式键值数据库).md
JsEtsAPIReference/modules/ohos/@ohos.data.intelligence (智慧数据平台).md
JsEtsAPIReference/modules/ohos/@ohos.data.preferences (用户首选项).md
JsEtsAPIReference/modules/ohos/@ohos.data.rdb (关系型数据库).md
JsEtsAPIReference/modules/ohos/@ohos.data.relationalStore (关系型数据库).md
JsEtsAPIReference/modules/ohos/@ohos.data.sendablePreferences (共享用户首选项).md
JsEtsAPIReference/modules/ohos/@ohos.data.sendableRelationalStore (共享关系型数据库).md
JsEtsAPIReference/modules/ohos/@ohos.data.storage (轻量级存储).md
JsEtsAPIReference/modules/ohos/@ohos.data.unifiedDataChannel (标准化数据通路).md
JsEtsAPIReference/modules/ohos/@ohos.data.uniformDataStruct (标准化数据结构).md
JsEtsAPIReference/modules/ohos/@ohos.data.uniformTypeDescriptor (标准化数据定义与描述).md
JsEtsAPIReference/modules/ohos/@ohos.deviceInfo (设备信息).md
JsEtsAPIReference/modules/ohos/@ohos.display (屏幕属性).md
JsEtsAPIReference/modules/ohos/@ohos.distributedDeviceManager (设备管理).md
JsEtsAPIReference/modules/ohos/@ohos.distributedHardware.mechanicManager (机械体控制模块).md
JsEtsAPIReference/modules/ohos/@ohos.distributedsched.abilityConnectionManager (应用多端协同管理).md
JsEtsAPIReference/modules/ohos/@ohos.distributedsched.linkEnhance (增强连接).md
JsEtsAPIReference/modules/ohos/@ohos.distributedsched.proxyChannelManager (代理通道管理).md
JsEtsAPIReference/modules/ohos/@ohos.dlpPermission (数据防泄漏).md
JsEtsAPIReference/modules/ohos/@ohos.document (文件交互).md
JsEtsAPIReference/modules/ohos/@ohos.driver.deviceManager (外设管理).md
JsEtsAPIReference/modules/ohos/@ohos.effectKit (图像效果).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.EnterpriseAdminExtensionAbility(企业设备管理扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.accountManager(账户管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.adminManager(admin权限管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.applicationManager(应用管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.bluetoothManager(蓝牙管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.browser(浏览器管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.bundleManager(包管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.common(Enterprise公共模块).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.deviceControl(设备控制管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.deviceInfo(设备信息管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.deviceSettings (设备设置管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.locationManager(位置服务管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.networkManager(网络管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.restrictions (限制类策略).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.securityManager(安全管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.systemManager (系统管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.telephonyManager(通话管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.usbManager(USB管理).md
JsEtsAPIReference/modules/ohos/@ohos.enterprise.wifiManager(Wi-Fi管理).md
JsEtsAPIReference/modules/ohos/@ohos.events.emitter (Emitter).md
JsEtsAPIReference/modules/ohos/@ohos.fastbuffer (FastBuffer).md
JsEtsAPIReference/modules/ohos/@ohos.faultLogger (故障日志获取).md
JsEtsAPIReference/modules/ohos/@ohos.file.AlbumPickerComponent (Album Picker组件).md
JsEtsAPIReference/modules/ohos/@ohos.file.BackupExtensionContext (备份恢复扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.file.PhotoPickerComponent (PhotoPicker组件).md
JsEtsAPIReference/modules/ohos/@ohos.file.RecentPhotoComponent (最近图片组件).md
JsEtsAPIReference/modules/ohos/@ohos.file.cloudSync (端云同步能力).md
JsEtsAPIReference/modules/ohos/@ohos.file.cloudSyncManager (端云同步管理能力).md
JsEtsAPIReference/modules/ohos/@ohos.file.environment (目录环境能力).md
JsEtsAPIReference/modules/ohos/@ohos.file.fileuri (文件URI).md
JsEtsAPIReference/modules/ohos/@ohos.file.fs (文件管理).md
JsEtsAPIReference/modules/ohos/@ohos.file.hash (文件哈希处理).md
JsEtsAPIReference/modules/ohos/@ohos.file.photoAccessHelper (相册管理模块).md
JsEtsAPIReference/modules/ohos/@ohos.file.picker (选择器).md
JsEtsAPIReference/modules/ohos/@ohos.file.securityLabel (数据标签).md
JsEtsAPIReference/modules/ohos/@ohos.file.sendablePhotoAccessHelper (基于Sendable对象的相册管理模块).md
JsEtsAPIReference/modules/ohos/@ohos.file.statvfs (文件系统空间统计).md
JsEtsAPIReference/modules/ohos/@ohos.file.storageStatistics (应用空间统计).md
JsEtsAPIReference/modules/ohos/@ohos.fileio (文件管理).md
JsEtsAPIReference/modules/ohos/@ohos.fileshare (文件分享).md
JsEtsAPIReference/modules/ohos/@ohos.font (注册自定义字体).md
JsEtsAPIReference/modules/ohos/@ohos.geoLocationManager (位置服务).md
JsEtsAPIReference/modules/ohos/@ohos.geolocation (位置服务).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.colorSpaceManager (色彩管理).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.common2D (2D图形通用数据类型).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.displaySync (可变帧率).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.drawing (绘制模块).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.hdrCapability (HDR能力).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.scene (ArkGraphics 3D模块).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.sendableColorSpaceManager (可共享的色彩管理).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.text (文本模块).md
JsEtsAPIReference/modules/ohos/@ohos.graphics.uiEffect (效果级联).md
JsEtsAPIReference/modules/ohos/@ohos.hiAppEvent (应用打点).md
JsEtsAPIReference/modules/ohos/@ohos.hiTraceChain (分布式跟踪).md
JsEtsAPIReference/modules/ohos/@ohos.hiTraceMeter (性能打点).md
JsEtsAPIReference/modules/ohos/@ohos.hichecker (检测模式).md
JsEtsAPIReference/modules/ohos/@ohos.hidebug (Debug调试).md
JsEtsAPIReference/modules/ohos/@ohos.hilog (HiLog日志打印).md
JsEtsAPIReference/modules/ohos/@ohos.hiviewdfx.FaultLogExtensionAbility (故障延迟通知).md
JsEtsAPIReference/modules/ohos/@ohos.hiviewdfx.FaultLogExtensionContext (故障延迟通知上下文).md
JsEtsAPIReference/modules/ohos/@ohos.hiviewdfx.hiAppEvent (应用事件打点).md
JsEtsAPIReference/modules/ohos/@ohos.hiviewdfx.jsLeakWatcher (js泄漏检测).md
JsEtsAPIReference/modules/ohos/@ohos.i18n (国际化-I18n).md
JsEtsAPIReference/modules/ohos/@ohos.identifier.oaid (开放匿名设备标识服务).md
JsEtsAPIReference/modules/ohos/@ohos.inputMethod (输入法框架).md
JsEtsAPIReference/modules/ohos/@ohos.inputMethod.ExtraConfig (输入法扩展信息).md
JsEtsAPIReference/modules/ohos/@ohos.inputMethod.Panel (输入法面板).md
JsEtsAPIReference/modules/ohos/@ohos.inputMethodEngine (输入法服务).md
JsEtsAPIReference/modules/ohos/@ohos.inputMethodList (输入法切换列表控件).md
JsEtsAPIReference/modules/ohos/@ohos.intl (国际化-Intl).md
JsEtsAPIReference/modules/ohos/@ohos.matrix4 (矩阵变换).md
JsEtsAPIReference/modules/ohos/@ohos.measure (文本计算).md
JsEtsAPIReference/modules/ohos/@ohos.mediaquery (媒体查询).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.audio (音频管理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.audioHaptic (音振协同).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.avCastPicker (投播组件).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.avCastPickerParam (投播组件参数).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.avInputCastPicker (录音设备选择组件).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.avVolumePanel (音量面板).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.avsession (媒体会话管理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.camera (相机管理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.cameraPicker (相机选择器).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.drm (数字版权保护).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.image (图片处理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.media (媒体服务).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.movingphotoview (动态照片).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.sendableImage (基于Sendable对象的图片处理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.systemSoundManager (系统声音管理).md
JsEtsAPIReference/modules/ohos/@ohos.multimedia.videoProcessingEngine (视频处理引擎).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalAwareness.deviceStatus(设备状态感知).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalAwareness.metadataBinding (记忆链接).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalAwareness.motion (动作感知能力).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalAwareness.userStatus (用户状态感知).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.gestureEvent (手势事件).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.infraredEmitter (红外管理).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.inputConsumer (全局快捷键).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.inputDevice (输入设备).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.inputEvent (输入事件).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.intentionCode (意图事件).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.keyCode (键值).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.keyEvent (按键输入事件).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.mouseEvent (鼠标输入事件).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.pointer (鼠标光标).md
JsEtsAPIReference/modules/ohos/@ohos.multimodalInput.touchEvent (触屏输入事件).md
JsEtsAPIReference/modules/ohos/@ohos.net.connection (网络连接管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.eap (扩展认证).md
JsEtsAPIReference/modules/ohos/@ohos.net.ethernet (以太网连接管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.http (数据请求).md
JsEtsAPIReference/modules/ohos/@ohos.net.mdns (MDNS管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.netFirewall (网络防火墙).md
JsEtsAPIReference/modules/ohos/@ohos.net.networkSecurity (网络安全校验).md
JsEtsAPIReference/modules/ohos/@ohos.net.policy (网络策略管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.sharing (网络共享管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.socket (Socket连接).md
JsEtsAPIReference/modules/ohos/@ohos.net.statistics (流量管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.vpn (VPN 管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.vpnExtension (VPN 增强管理).md
JsEtsAPIReference/modules/ohos/@ohos.net.webSocket (WebSocket连接).md
JsEtsAPIReference/modules/ohos/@ohos.nfc.cardEmulation (标准NFC-cardEmulation).md
JsEtsAPIReference/modules/ohos/@ohos.nfc.controller (标准NFC).md
JsEtsAPIReference/modules/ohos/@ohos.nfc.tag (标准NFC-Tag).md
JsEtsAPIReference/modules/ohos/@ohos.notification (Notification模块).md
JsEtsAPIReference/modules/ohos/@ohos.notificationExtensionSubscription (notificationExtensionSubscription模块).md
JsEtsAPIReference/modules/ohos/@ohos.notificationManager (NotificationManager模块).md
JsEtsAPIReference/modules/ohos/@ohos.pasteboard (剪贴板).md
JsEtsAPIReference/modules/ohos/@ohos.pluginComponent (PluginComponentManager).md
JsEtsAPIReference/modules/ohos/@ohos.power (系统电源管理).md
JsEtsAPIReference/modules/ohos/@ohos.print (打印).md
JsEtsAPIReference/modules/ohos/@ohos.process (获取进程相关的信息).md
JsEtsAPIReference/modules/ohos/@ohos.prompt (弹窗).md
JsEtsAPIReference/modules/ohos/@ohos.promptAction (弹窗).md
JsEtsAPIReference/modules/ohos/@ohos.reminderAgent (后台代理提醒).md
JsEtsAPIReference/modules/ohos/@ohos.reminderAgentManager (后台代理提醒).md
JsEtsAPIReference/modules/ohos/@ohos.request (上传下载).md
JsEtsAPIReference/modules/ohos/@ohos.request.cacheDownload (缓存下载).md
JsEtsAPIReference/modules/ohos/@ohos.resourceManager (资源管理).md
JsEtsAPIReference/modules/ohos/@ohos.resourceschedule.backgroundProcessManager (后台子进程管控).md
JsEtsAPIReference/modules/ohos/@ohos.resourceschedule.backgroundTaskManager (后台任务管理).md
JsEtsAPIReference/modules/ohos/@ohos.resourceschedule.systemload (性能功耗热融合档位).md
JsEtsAPIReference/modules/ohos/@ohos.resourceschedule.workScheduler (延迟任务调度).md
JsEtsAPIReference/modules/ohos/@ohos.router (页面路由)(不推荐).md
JsEtsAPIReference/modules/ohos/@ohos.rpc (RPC通信).md
JsEtsAPIReference/modules/ohos/@ohos.runningLock (RunningLock锁).md
JsEtsAPIReference/modules/ohos/@ohos.scan (扫描).md
JsEtsAPIReference/modules/ohos/@ohos.screenLock (锁屏管理).md
JsEtsAPIReference/modules/ohos/@ohos.screenshot (屏幕截图).md
JsEtsAPIReference/modules/ohos/@ohos.secureElement (安全单元的通道管理).md
JsEtsAPIReference/modules/ohos/@ohos.security.CryptoExtensionAbility (密钥扩展能力).md
JsEtsAPIReference/modules/ohos/@ohos.security.asset (关键资产存储服务).md
JsEtsAPIReference/modules/ohos/@ohos.security.cert (证书模块).md
JsEtsAPIReference/modules/ohos/@ohos.security.certManager (证书管理模块).md
JsEtsAPIReference/modules/ohos/@ohos.security.certManagerDialog (证书管理对话框模块).md
JsEtsAPIReference/modules/ohos/@ohos.security.cryptoFramework (加解密算法库框架).md
JsEtsAPIReference/modules/ohos/@ohos.security.huks (通用密钥库系统).md
JsEtsAPIReference/modules/ohos/@ohos.security.huksExternalCrypto(外部密钥管理).md
JsEtsAPIReference/modules/ohos/@ohos.security.identifySensitiveContent (识别敏感内容).md
JsEtsAPIReference/modules/ohos/@ohos.sendableResourceManager (资源管理).md
JsEtsAPIReference/modules/ohos/@ohos.sensor (传感器).md
JsEtsAPIReference/modules/ohos/@ohos.settings (设置数据项名称).md
JsEtsAPIReference/modules/ohos/@ohos.statfs (statfs).md
JsEtsAPIReference/modules/ohos/@ohos.stationary (设备状态感知框架).md
JsEtsAPIReference/modules/ohos/@ohos.systemDateTime (系统时间、时区).md
JsEtsAPIReference/modules/ohos/@ohos.systemTime (系统时间、时区).md
JsEtsAPIReference/modules/ohos/@ohos.taskpool(启动任务池).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.call (拨打电话).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.data (蜂窝数据).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.esim (eSIM卡管理).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.observer (observer).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.radio (网络搜索).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.sim (SIM卡管理).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.sms (短信服务).md
JsEtsAPIReference/modules/ohos/@ohos.telephony.vcard (VCard模块).md
JsEtsAPIReference/modules/ohos/@ohos.test.PerfTest.md
JsEtsAPIReference/modules/ohos/@ohos.thermal (热管理).md
JsEtsAPIReference/modules/ohos/@ohos.uiAppearance (用户界面外观).md
JsEtsAPIReference/modules/ohos/@ohos.uri (URI字符串解析).md
JsEtsAPIReference/modules/ohos/@ohos.url (URL字符串解析).md
JsEtsAPIReference/modules/ohos/@ohos.usb (USB管理)(已停止维护).md
JsEtsAPIReference/modules/ohos/@ohos.usbManager (USB管理).md
JsEtsAPIReference/modules/ohos/@ohos.usbManager.serial (串口管理).md
JsEtsAPIReference/modules/ohos/@ohos.userIAM.userAuth (用户认证).md
JsEtsAPIReference/modules/ohos/@ohos.userIAM.userAuthIcon (嵌入式用户身份认证控件).md
JsEtsAPIReference/modules/ohos/@ohos.util (util工具函数).md
JsEtsAPIReference/modules/ohos/@ohos.util.ArrayList (线性容器ArrayList).md
JsEtsAPIReference/modules/ohos/@ohos.util.Deque (线性容器Deque).md
JsEtsAPIReference/modules/ohos/@ohos.util.HashMap (非线性容器HashMap).md
JsEtsAPIReference/modules/ohos/@ohos.util.HashSet (非线性容器HashSet).md
JsEtsAPIReference/modules/ohos/@ohos.util.LightWeightMap (非线性容器LightWeightMap).md
JsEtsAPIReference/modules/ohos/@ohos.util.LightWeightSet (非线性容器LightWeightSet).md
JsEtsAPIReference/modules/ohos/@ohos.util.LinkedList (线性容器LinkedList).md
JsEtsAPIReference/modules/ohos/@ohos.util.List (线性容器List).md
JsEtsAPIReference/modules/ohos/@ohos.util.PlainArray (非线性容器PlainArray).md
JsEtsAPIReference/modules/ohos/@ohos.util.Queue (线性容器Queue).md
JsEtsAPIReference/modules/ohos/@ohos.util.Stack (线性容器Stack).md
JsEtsAPIReference/modules/ohos/@ohos.util.TreeMap (非线性容器TreeMap).md
JsEtsAPIReference/modules/ohos/@ohos.util.TreeSet (非线性容器TreeSet).md
JsEtsAPIReference/modules/ohos/@ohos.util.Vector (线性容器Vector).md
JsEtsAPIReference/modules/ohos/@ohos.util.json (JSON解析与生成).md
JsEtsAPIReference/modules/ohos/@ohos.util.stream (数据流基类stream).md
JsEtsAPIReference/modules/ohos/@ohos.vibrator (振动).md
JsEtsAPIReference/modules/ohos/@ohos.wallpaper (壁纸).md
JsEtsAPIReference/modules/ohos/@ohos.wantAgent (WantAgent模块).md
JsEtsAPIReference/modules/ohos/@ohos.web.WebNativeMessagingExtensionAbility (Web Native Messaging Extension Ability).md
JsEtsAPIReference/modules/ohos/@ohos.web.WebNativeMessagingExtensionContext (Web Native Messaging Extension Context).md
JsEtsAPIReference/modules/ohos/@ohos.web.netErrorList (ArkWeb网络协议栈错误列表).md
JsEtsAPIReference/modules/ohos/@ohos.web.webNativeMessagingExtensionManager (Web Native Messaging Extension Manager).md
JsEtsAPIReference/modules/ohos/@ohos.web.webview (Webview).md
JsEtsAPIReference/modules/ohos/@ohos.wifi (WLAN).md
JsEtsAPIReference/modules/ohos/@ohos.wifiManager (WLAN).md
JsEtsAPIReference/modules/ohos/@ohos.wifiManagerExt (WLAN扩展接口).md
JsEtsAPIReference/modules/ohos/@ohos.wifiext (WLAN扩展接口).md
JsEtsAPIReference/modules/ohos/@ohos.window (窗口).md
JsEtsAPIReference/modules/ohos/@ohos.window.floatingBall (闪控球窗口).md
JsEtsAPIReference/modules/ohos/@ohos.worker (启动一个Worker).md
JsEtsAPIReference/modules/ohos/@ohos.xml (XML解析与生成).md
JsEtsAPIReference/modules/ohos/@ohos.zlib (Zip模块).md
JsEtsAPIReference/modules/other/@arkts.collections (ArkTS容器集).md
JsEtsAPIReference/modules/other/@arkts.lang (ArkTS语言基础能力).md
JsEtsAPIReference/modules/other/@arkts.math.Decimal (高精度数学库Decimal).md
JsEtsAPIReference/modules/other/@arkts.utils (ArkTS工具库).md
JsEtsAPIReference/modules/system/@system.app (应用上下文).md
JsEtsAPIReference/modules/system/@system.battery (电量信息).md
JsEtsAPIReference/modules/system/@system.bluetooth (蓝牙).md
JsEtsAPIReference/modules/system/@system.brightness (屏幕亮度).md
JsEtsAPIReference/modules/system/@system.cipher (加密算法).md
JsEtsAPIReference/modules/system/@system.configuration (应用配置).md
JsEtsAPIReference/modules/system/@system.device (设备信息).md
JsEtsAPIReference/modules/system/@system.fetch (数据请求).md
JsEtsAPIReference/modules/system/@system.file (文件存储).md
JsEtsAPIReference/modules/system/@system.geolocation (地理位置).md
JsEtsAPIReference/modules/system/@system.mediaquery (媒体查询).md
JsEtsAPIReference/modules/system/@system.network (网络状态).md
JsEtsAPIReference/modules/system/@system.notification (通知消息).md
JsEtsAPIReference/modules/system/@system.package (应用管理).md
JsEtsAPIReference/modules/system/@system.prompt (弹窗).md
JsEtsAPIReference/modules/system/@system.request (上传下载).md
JsEtsAPIReference/modules/system/@system.router (页面路由).md
JsEtsAPIReference/modules/system/@system.sensor (传感器).md
JsEtsAPIReference/modules/system/@system.storage (数据存储).md
JsEtsAPIReference/modules/system/@system.vibrator (振动).md
JsEtsAPIReference/topics/components/@Entry:页面入口.md
JsEtsAPIReference/topics/components/@Env:环境变量.md
JsEtsAPIReference/topics/components/AICaptionComponent(AI字幕组件).md
JsEtsAPIReference/topics/components/ARView(AR场景可视化).md
JsEtsAPIReference/topics/components/AlphabetIndexer.md
JsEtsAPIReference/topics/components/ArcAlphabetIndexer.md
JsEtsAPIReference/topics/components/ArcButton.md
JsEtsAPIReference/topics/components/ArcList.md
JsEtsAPIReference/topics/components/ArcListItem.md
JsEtsAPIReference/topics/components/ArcScrollBar.md
JsEtsAPIReference/topics/components/ArcSlider.md
JsEtsAPIReference/topics/components/ArcSwiper.md
JsEtsAPIReference/topics/components/ArkTS组件.md
JsEtsAPIReference/topics/components/AtomicService.md
JsEtsAPIReference/topics/components/AtomicServiceNavigation.md
JsEtsAPIReference/topics/components/AtomicServiceSearch.md
JsEtsAPIReference/topics/components/AtomicServiceTabs.md
JsEtsAPIReference/topics/components/AtomicServiceWeb.md
JsEtsAPIReference/topics/components/Badge.md
JsEtsAPIReference/topics/components/Blank.md
JsEtsAPIReference/topics/components/Button.md
JsEtsAPIReference/topics/components/CalendarPicker.md
JsEtsAPIReference/topics/components/Canvas.md
JsEtsAPIReference/topics/components/CanvasGradient.md
JsEtsAPIReference/topics/components/CanvasPattern.md
JsEtsAPIReference/topics/components/CanvasRenderingContext2D.md
JsEtsAPIReference/topics/components/CardRecognition(卡证识别控件).md
JsEtsAPIReference/topics/components/CashierComponent (iap嵌入式收银台组件).md
JsEtsAPIReference/topics/components/Checkbox.md
JsEtsAPIReference/topics/components/CheckboxGroup.md
JsEtsAPIReference/topics/components/Chip.md
JsEtsAPIReference/topics/components/ChipGroup.md
JsEtsAPIReference/topics/components/Circle.md
JsEtsAPIReference/topics/components/Column.md
JsEtsAPIReference/topics/components/ColumnSplit.md
JsEtsAPIReference/topics/components/Component3D.md
JsEtsAPIReference/topics/components/ComposeListItem.md
JsEtsAPIReference/topics/components/ComposeTitleBar.md
JsEtsAPIReference/topics/components/ContainerSpan.md
JsEtsAPIReference/topics/components/ContentSlot.md
JsEtsAPIReference/topics/components/ContextMenu.md
JsEtsAPIReference/topics/components/Counter.md
JsEtsAPIReference/topics/components/DataPanel.md
JsEtsAPIReference/topics/components/DatePicker.md
JsEtsAPIReference/topics/components/DialogV2.md
JsEtsAPIReference/topics/components/Divider.md
JsEtsAPIReference/topics/components/DocumentScanner(文档扫描控件).md
JsEtsAPIReference/topics/components/DownloadFileButton.md
JsEtsAPIReference/topics/components/DrawingRenderingContext.md
JsEtsAPIReference/topics/components/EditableTitleBar.md
JsEtsAPIReference/topics/components/Ellipse.md
JsEtsAPIReference/topics/components/EmbeddedComponent.md
JsEtsAPIReference/topics/components/ExceptionPrompt.md
JsEtsAPIReference/topics/components/Filter.md
JsEtsAPIReference/topics/components/Flex.md
JsEtsAPIReference/topics/components/Flex布局.md
JsEtsAPIReference/topics/components/FlowItem.md
JsEtsAPIReference/topics/components/FoldSplitContainer.md
JsEtsAPIReference/topics/components/FolderStack.md
JsEtsAPIReference/topics/components/ForEach.md
JsEtsAPIReference/topics/components/FormLink.md
JsEtsAPIReference/topics/components/FormMenu.md
JsEtsAPIReference/topics/components/FullScreenLaunchComponent.md
JsEtsAPIReference/topics/components/FunctionComponent(功能组件).md
JsEtsAPIReference/topics/components/FunctionalButton(Button组件).md
JsEtsAPIReference/topics/components/FunctionalInput(Input组件).md
JsEtsAPIReference/topics/components/Gauge.md
JsEtsAPIReference/topics/components/Grid.md
JsEtsAPIReference/topics/components/GridCol.md
JsEtsAPIReference/topics/components/GridContainer.md
JsEtsAPIReference/topics/components/GridItem.md
JsEtsAPIReference/topics/components/GridObjectSortComponent.md
JsEtsAPIReference/topics/components/GridRow.md
JsEtsAPIReference/topics/components/HalfScreenLaunchComponent.md
JsEtsAPIReference/topics/components/HandwriteComponent(手写套件组件).md
JsEtsAPIReference/topics/components/HdsActionBar.md
JsEtsAPIReference/topics/components/HdsListItem.md
JsEtsAPIReference/topics/components/HdsListItemCard.md
JsEtsAPIReference/topics/components/HdsNavDestination.md
JsEtsAPIReference/topics/components/HdsNavigation.md
JsEtsAPIReference/topics/components/HdsSideBar.md
JsEtsAPIReference/topics/components/HdsSideMenu.md
JsEtsAPIReference/topics/components/HdsSnackBar.md
JsEtsAPIReference/topics/components/HdsTabs.md
JsEtsAPIReference/topics/components/HdsVisualComponent.md
JsEtsAPIReference/topics/components/Hyperlink.md
JsEtsAPIReference/topics/components/LazyForEach.md
JsEtsAPIReference/topics/components/LazyVGridLayout.md
JsEtsAPIReference/topics/components/Line.md
JsEtsAPIReference/topics/components/List.md
JsEtsAPIReference/topics/components/ListItem.md
JsEtsAPIReference/topics/components/ListItemGroup.md
JsEtsAPIReference/topics/components/LoadingProgress.md
JsEtsAPIReference/topics/components/LoginPanel (华为账号Panel登录组件).md
JsEtsAPIReference/topics/components/LoginWithHuaweiIDButton (华为账号Button登录组件).md
JsEtsAPIReference/topics/components/LongPressGesture.md
JsEtsAPIReference/topics/components/MapComponent(地图组件).md
JsEtsAPIReference/topics/components/Marquee.md
JsEtsAPIReference/topics/components/Matrix2D.md
JsEtsAPIReference/topics/components/Menu.md
JsEtsAPIReference/topics/components/MenuItem.md
JsEtsAPIReference/topics/components/MenuItemGroup.md
JsEtsAPIReference/topics/components/MultiNavigation.md
JsEtsAPIReference/topics/components/MultiWindowEntryInAPP.md
JsEtsAPIReference/topics/components/NavDestination.md
JsEtsAPIReference/topics/components/NavPushPathHelper.md
JsEtsAPIReference/topics/components/NavRouter.md
JsEtsAPIReference/topics/components/Navigation.md
JsEtsAPIReference/topics/components/Navigator.md
JsEtsAPIReference/topics/components/NodeContainer.md
JsEtsAPIReference/topics/components/OffscreenCanvas.md
JsEtsAPIReference/topics/components/OffscreenCanvasRenderingContext2D.md
JsEtsAPIReference/topics/components/PanGesture.md
JsEtsAPIReference/topics/components/Panel.md
JsEtsAPIReference/topics/components/PasteButton.md
JsEtsAPIReference/topics/components/Path.md
JsEtsAPIReference/topics/components/Path2D.md
JsEtsAPIReference/topics/components/PatternLock.md
JsEtsAPIReference/topics/components/PdfView(PDF预览组件).md
JsEtsAPIReference/topics/components/PinchGesture.md
JsEtsAPIReference/topics/components/Polygon.md
JsEtsAPIReference/topics/components/Polyline.md
JsEtsAPIReference/topics/components/Popup.md
JsEtsAPIReference/topics/components/Popup控制.md
JsEtsAPIReference/topics/components/Progress.md
JsEtsAPIReference/topics/components/ProgressButton.md
JsEtsAPIReference/topics/components/ProgressButtonV2.md
JsEtsAPIReference/topics/components/QRCode.md
JsEtsAPIReference/topics/components/Radio.md
JsEtsAPIReference/topics/components/Rating.md
JsEtsAPIReference/topics/components/ReadPageComponent(阅读页组件).md
JsEtsAPIReference/topics/components/Rect.md
JsEtsAPIReference/topics/components/Refresh.md
JsEtsAPIReference/topics/components/RelativeContainer.md
JsEtsAPIReference/topics/components/Repeat.md
JsEtsAPIReference/topics/components/RichEditor.md
JsEtsAPIReference/topics/components/RichText.md
JsEtsAPIReference/topics/components/RotationGesture.md
JsEtsAPIReference/topics/components/Row.md
JsEtsAPIReference/topics/components/RowSplit.md
JsEtsAPIReference/topics/components/SVG标签解析能力增强.md
JsEtsAPIReference/topics/components/SVG标签说明.md
JsEtsAPIReference/topics/components/SaveButton.md
JsEtsAPIReference/topics/components/Scroll.md
JsEtsAPIReference/topics/components/ScrollBar.md
JsEtsAPIReference/topics/components/Search.md
JsEtsAPIReference/topics/components/SegmentButton.md
JsEtsAPIReference/topics/components/SegmentButtonV2.md
JsEtsAPIReference/topics/components/Select.md
JsEtsAPIReference/topics/components/SelectTitleBar.md
JsEtsAPIReference/topics/components/SelectionMenu.md
JsEtsAPIReference/topics/components/Shape.md
JsEtsAPIReference/topics/components/SideBarContainer.md
JsEtsAPIReference/topics/components/Slider.md
JsEtsAPIReference/topics/components/Span.md
JsEtsAPIReference/topics/components/SplitLayout.md
JsEtsAPIReference/topics/components/Stack.md
JsEtsAPIReference/topics/components/Stepper.md
JsEtsAPIReference/topics/components/StepperItem.md
JsEtsAPIReference/topics/components/SubHeader.md
JsEtsAPIReference/topics/components/SubHeaderV2.md
JsEtsAPIReference/topics/components/SwipeGesture.md
JsEtsAPIReference/topics/components/SwipeRefresher.md
JsEtsAPIReference/topics/components/Swiper.md
JsEtsAPIReference/topics/components/SymbolGlyph.md
JsEtsAPIReference/topics/components/SymbolSpan.md
JsEtsAPIReference/topics/components/TabContent.md
JsEtsAPIReference/topics/components/TabTitleBar.md
JsEtsAPIReference/topics/components/Tabs.md
JsEtsAPIReference/topics/components/TapGesture.md
JsEtsAPIReference/topics/components/Text.md
JsEtsAPIReference/topics/components/TextArea.md
JsEtsAPIReference/topics/components/TextClock.md
JsEtsAPIReference/topics/components/TextInput.md
JsEtsAPIReference/topics/components/TextPicker.md
JsEtsAPIReference/topics/components/TextReaderIcon(朗读听筒图标).md
JsEtsAPIReference/topics/components/TextTimer.md
JsEtsAPIReference/topics/components/TimePicker.md
JsEtsAPIReference/topics/components/Tips控制.md
JsEtsAPIReference/topics/components/Toggle.md
JsEtsAPIReference/topics/components/ToolBar.md
JsEtsAPIReference/topics/components/ToolBarItem.md
JsEtsAPIReference/topics/components/ToolBarV2.md
JsEtsAPIReference/topics/components/TreeView.md
JsEtsAPIReference/topics/components/UIPickerComponent.md
JsEtsAPIReference/topics/components/Video.md
JsEtsAPIReference/topics/components/WaterFlow.md
JsEtsAPIReference/topics/components/WithTheme.md
JsEtsAPIReference/topics/components/XComponent.md
JsEtsAPIReference/topics/components/Z序控制.md
JsEtsAPIReference/topics/components/advanced.Counter.md
JsEtsAPIReference/topics/components/cashierComponentManager (iap嵌入式收银台组件管理).md
JsEtsAPIReference/topics/components/functionalButtonComponentManager(场景化融合Button组件管理).md
JsEtsAPIReference/topics/components/functionalInputComponentManager(场景化融合Input组件管理).md
JsEtsAPIReference/topics/components/loginComponentManager (华为账号登录组件管理).md
JsEtsAPIReference/topics/components/mutableBuilder.md
JsEtsAPIReference/topics/components/wrapBuilder.md
JsEtsAPIReference/topics/components/主题.md
JsEtsAPIReference/topics/components/事件独占控制.md
JsEtsAPIReference/topics/components/交互事件分发控制.md
JsEtsAPIReference/topics/components/交互响应事件.md
JsEtsAPIReference/topics/components/交互属性.md
JsEtsAPIReference/topics/components/位置设置.md
JsEtsAPIReference/topics/components/信息展示.md
JsEtsAPIReference/topics/components/信息展示公共接口.md
JsEtsAPIReference/topics/components/像素单位.md
JsEtsAPIReference/topics/components/全屏模态转场.md
JsEtsAPIReference/topics/components/公共定义.md
JsEtsAPIReference/topics/components/共享元素转场 (sharedTransition).md
JsEtsAPIReference/topics/components/关键帧动画 (keyframeAnimateTo).md
JsEtsAPIReference/topics/components/其他.md
JsEtsAPIReference/topics/components/内置环境变量说明.md
JsEtsAPIReference/topics/components/分布式迁移标识.md
JsEtsAPIReference/topics/components/列表选择弹窗 (ActionSheet).md
JsEtsAPIReference/topics/components/前景属性设置.md
JsEtsAPIReference/topics/components/前景色设置.md
JsEtsAPIReference/topics/components/动态SymbolGlyphModifier属性设置.md
JsEtsAPIReference/topics/components/动态属性与自定义.md
JsEtsAPIReference/topics/components/动态属性设置.md
JsEtsAPIReference/topics/components/动态手势设置.md
JsEtsAPIReference/topics/components/动画.md
JsEtsAPIReference/topics/components/半模态转场.md
JsEtsAPIReference/topics/components/卡片.md
JsEtsAPIReference/topics/components/响应式环境变量.md
JsEtsAPIReference/topics/components/图像效果.md
JsEtsAPIReference/topics/components/图像类型定义.md
JsEtsAPIReference/topics/components/图形变换.md
JsEtsAPIReference/topics/components/图形绘制.md
JsEtsAPIReference/topics/components/图片与视频.md
JsEtsAPIReference/topics/components/图片边框设置.md
JsEtsAPIReference/topics/components/基础属性.md
JsEtsAPIReference/topics/components/基础手势.md
JsEtsAPIReference/topics/components/基础类型定义.md
JsEtsAPIReference/topics/components/基础输入事件.md
JsEtsAPIReference/topics/components/复用标识.md
JsEtsAPIReference/topics/components/复用选项.md
JsEtsAPIReference/topics/components/外描边设置.md
JsEtsAPIReference/topics/components/多态样式.md
JsEtsAPIReference/topics/components/安全.md
JsEtsAPIReference/topics/components/安全区域.md
JsEtsAPIReference/topics/components/安全控件通用属性.md
JsEtsAPIReference/topics/components/定义可动画属性 (@AnimatableExtend).md
JsEtsAPIReference/topics/components/导航与切换.md
JsEtsAPIReference/topics/components/尺寸设置.md
JsEtsAPIReference/topics/components/属性动画 (animation).md
JsEtsAPIReference/topics/components/属性字符串.md
JsEtsAPIReference/topics/components/工具栏设置.md
JsEtsAPIReference/topics/components/已停止维护的组件与接口.md
JsEtsAPIReference/topics/components/布局与边框.md
JsEtsAPIReference/topics/components/布局约束.md
JsEtsAPIReference/topics/components/应用级变量的状态管理.md
JsEtsAPIReference/topics/components/弹出框 (Dialog).md
JsEtsAPIReference/topics/components/弹窗.md
JsEtsAPIReference/topics/components/弹窗控制.md
JsEtsAPIReference/topics/components/形状裁剪.md
JsEtsAPIReference/topics/components/悬浮事件.md
JsEtsAPIReference/topics/components/悬浮态效果.md
JsEtsAPIReference/topics/components/手势公共接口.md
JsEtsAPIReference/topics/components/手势处理.md
JsEtsAPIReference/topics/components/手势处理器.md
JsEtsAPIReference/topics/components/手势拦截增强.md
JsEtsAPIReference/topics/components/手势控制.md
JsEtsAPIReference/topics/components/拖拽事件.md
JsEtsAPIReference/topics/components/拖拽排序.md
JsEtsAPIReference/topics/components/拖拽控制.md
JsEtsAPIReference/topics/components/挂载卸载事件.md
JsEtsAPIReference/topics/components/按钮与选择.md
JsEtsAPIReference/topics/components/按键事件.md
JsEtsAPIReference/topics/components/文本与输入.md
JsEtsAPIReference/topics/components/文本滑动选择器弹窗 (TextPickerDialog).md
JsEtsAPIReference/topics/components/文本组件公共接口.md
JsEtsAPIReference/topics/components/无障碍属性.md
JsEtsAPIReference/topics/components/无障碍悬浮事件.md
JsEtsAPIReference/topics/components/无障碍控制操作.md
JsEtsAPIReference/topics/components/无障碍相关.md
JsEtsAPIReference/topics/components/日历选择器弹窗 (CalendarPickerDialog).md
JsEtsAPIReference/topics/components/日期滑动选择器弹窗 (DatePickerDialog).md
JsEtsAPIReference/topics/components/时间滑动选择器弹窗 (TimePickerDialog).md
JsEtsAPIReference/topics/components/显式动画 (animateTo).md
JsEtsAPIReference/topics/components/显式动画立即下发 (animateToImmediately).md
JsEtsAPIReference/topics/components/显隐控制.md
JsEtsAPIReference/topics/components/枚举说明.md
JsEtsAPIReference/topics/components/栅格与分栏.md
JsEtsAPIReference/topics/components/栅格设置.md
JsEtsAPIReference/topics/components/模态转场设置.md
JsEtsAPIReference/topics/components/浮层.md
JsEtsAPIReference/topics/components/渲染绘制.md
JsEtsAPIReference/topics/components/滚动与滑动.md
JsEtsAPIReference/topics/components/滚动组件通用接口.md
JsEtsAPIReference/topics/components/点击事件.md
JsEtsAPIReference/topics/components/点击回弹效果.md
JsEtsAPIReference/topics/components/点击控制.md
JsEtsAPIReference/topics/components/焦点事件.md
JsEtsAPIReference/topics/components/焦点控制.md
JsEtsAPIReference/topics/components/焦点轴事件.md
JsEtsAPIReference/topics/components/特效绘制合并.md
JsEtsAPIReference/topics/components/状态变量变化监听.md
JsEtsAPIReference/topics/components/状态管理V1装饰器参数.md
JsEtsAPIReference/topics/components/状态管理与渲染控制.md
JsEtsAPIReference/topics/components/画布绘制.md
JsEtsAPIReference/topics/components/禁用反色能力.md
JsEtsAPIReference/topics/components/禁用控制.md
JsEtsAPIReference/topics/components/空白与分隔.md
JsEtsAPIReference/topics/components/粒子动画 (Particle).md
JsEtsAPIReference/topics/components/系统预置UI组件库.md
JsEtsAPIReference/topics/components/组件内容填充方式.md
JsEtsAPIReference/topics/components/组件内容模糊.md
JsEtsAPIReference/topics/components/组件内转场 (transition).md
JsEtsAPIReference/topics/components/组件内隐式共享元素转场 (geometryTransition).md
JsEtsAPIReference/topics/components/组件区域变化事件.md
JsEtsAPIReference/topics/components/组件变化事件.md
JsEtsAPIReference/topics/components/组件可见区域变化事件.md
JsEtsAPIReference/topics/components/组件尺寸变化事件.md
JsEtsAPIReference/topics/components/组件快捷键事件.md
JsEtsAPIReference/topics/components/组件扩展装饰器.md
JsEtsAPIReference/topics/components/组件标识.md
JsEtsAPIReference/topics/components/组件级像素取整.md
JsEtsAPIReference/topics/components/组件预览.md
JsEtsAPIReference/topics/components/组合手势.md
JsEtsAPIReference/topics/components/绑定手势.md
JsEtsAPIReference/topics/components/绑定手势方法.md
JsEtsAPIReference/topics/components/背景设置.md
JsEtsAPIReference/topics/components/自定义事件分发.md
JsEtsAPIReference/topics/components/自定义事件拦截.md
JsEtsAPIReference/topics/components/自定义内容.md
JsEtsAPIReference/topics/components/自定义占位组件.md
JsEtsAPIReference/topics/components/自定义属性设置.md
JsEtsAPIReference/topics/components/自定义弹窗 (CustomDialog).md
JsEtsAPIReference/topics/components/自定义手势判定.md
JsEtsAPIReference/topics/components/自定义组件.md
JsEtsAPIReference/topics/components/自定义组件内置方法.md
JsEtsAPIReference/topics/components/自定义组件参数.md
JsEtsAPIReference/topics/components/自定义组件的生命周期.md
JsEtsAPIReference/topics/components/自定义组件的生命周期(推荐).md
JsEtsAPIReference/topics/components/自定义组件的自定义布局.md
JsEtsAPIReference/topics/components/自定义绘制设置.md
JsEtsAPIReference/topics/components/菜单.md
JsEtsAPIReference/topics/components/菜单控制.md
JsEtsAPIReference/topics/components/行列与堆叠.md
JsEtsAPIReference/topics/components/表冠事件.md
JsEtsAPIReference/topics/components/视效与模糊.md
JsEtsAPIReference/topics/components/视效设置.md
JsEtsAPIReference/topics/components/触摸事件.md
JsEtsAPIReference/topics/components/触摸交互控制.md
JsEtsAPIReference/topics/components/触摸测试控制.md
JsEtsAPIReference/topics/components/触摸热区设置.md
JsEtsAPIReference/topics/components/警告弹窗 (AlertDialog).md
JsEtsAPIReference/topics/components/设置事件回调.md
JsEtsAPIReference/topics/components/设置组件绑定的手势.md
JsEtsAPIReference/topics/components/路径动画 (motionPath).md
JsEtsAPIReference/topics/components/轴事件.md
JsEtsAPIReference/topics/components/输入框类组件通用接口.md
JsEtsAPIReference/topics/components/边框设置.md
JsEtsAPIReference/topics/components/运动模糊.md
JsEtsAPIReference/topics/components/选择器(Picker)公共接口.md
JsEtsAPIReference/topics/components/透明度设置.md
JsEtsAPIReference/topics/components/通用事件.md
JsEtsAPIReference/topics/components/通用属性.md
JsEtsAPIReference/topics/components/隐私遮罩.md
JsEtsAPIReference/topics/components/页面级像素取整.md
JsEtsAPIReference/topics/components/页面间转场 (pageTransition).md
JsEtsAPIReference/topics/components/颜色渐变.md
JsEtsAPIReference/topics/components/鼠标事件.md
JsEtsAPIReference/topics/components/鼠标光标控制.md
JsEtsAPIReference/topics/graphics/ArkGraphics 2D(方舟2D图形服务).md
JsEtsAPIReference/topics/graphics/ArkGraphics 3D(方舟3D图形).md
JsEtsAPIReference/topics/graphics/ArkTS API.md
JsEtsAPIReference/topics/graphics/BufferHandle.md
JsEtsAPIReference/topics/graphics/C API.md
JsEtsAPIReference/topics/graphics/ColorSpacePrimaries.md
JsEtsAPIReference/topics/graphics/DisplaySoloist_ExpectedRateRange.md
JsEtsAPIReference/topics/graphics/Drawing.md
JsEtsAPIReference/topics/graphics/NativeColorSpaceManager.md
JsEtsAPIReference/topics/graphics/NativeDisplaySoloist.md
JsEtsAPIReference/topics/graphics/NativeFence.md
JsEtsAPIReference/topics/graphics/NativePixelMap_.md
JsEtsAPIReference/topics/graphics/NativeVsync.md
JsEtsAPIReference/topics/graphics/NativeWindow.md
JsEtsAPIReference/topics/graphics/NativeWindowBuffer.md
JsEtsAPIReference/topics/graphics/OHExtDataHandle.md
JsEtsAPIReference/topics/graphics/OHHDRMetaData.md
JsEtsAPIReference/topics/graphics/OHIPCParcel.md
JsEtsAPIReference/topics/graphics/OH_DisplaySoloist.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Array.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Bitmap.md
JsEtsAPIReference/topics/graphics/OH_Drawing_BitmapFormat.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Brush.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Canvas.md
JsEtsAPIReference/topics/graphics/OH_Drawing_ColorFilter.md
JsEtsAPIReference/topics/graphics/OH_Drawing_ColorSpace.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Filter.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Font.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontAdjustInfo.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontAliasInfo.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontArguments.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontCollection.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontConfigInfo.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontDescriptor.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontFallbackGroup.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontFallbackInfo.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontFeature.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontFeatures.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontFullDescriptor.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontGenericInfo.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontMgr.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontParser.md
JsEtsAPIReference/topics/graphics/OH_Drawing_FontStyleSet.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Font_Metrics.md
JsEtsAPIReference/topics/graphics/OH_Drawing_GpuContext.md
JsEtsAPIReference/topics/graphics/OH_Drawing_GpuContextOptions.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Image.md
JsEtsAPIReference/topics/graphics/OH_Drawing_ImageFilter.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Image_Info.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Lattice.md
JsEtsAPIReference/topics/graphics/OH_Drawing_LineMetrics.md
JsEtsAPIReference/topics/graphics/OH_Drawing_LineTypography.md
JsEtsAPIReference/topics/graphics/OH_Drawing_MaskFilter.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Matrix.md
JsEtsAPIReference/topics/graphics/OH_Drawing_MemoryStream.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Path.md
JsEtsAPIReference/topics/graphics/OH_Drawing_PathEffect.md
JsEtsAPIReference/topics/graphics/OH_Drawing_PathIterator.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Pen.md
JsEtsAPIReference/topics/graphics/OH_Drawing_PixelMap.md
JsEtsAPIReference/topics/graphics/OH_Drawing_PlaceholderSpan.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Point.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Point2D.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Point3D.md
JsEtsAPIReference/topics/graphics/OH_Drawing_PositionAndAffinity.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Range.md
JsEtsAPIReference/topics/graphics/OH_Drawing_RecordCmd.md
JsEtsAPIReference/topics/graphics/OH_Drawing_RecordCmdUtils.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Rect.md
JsEtsAPIReference/topics/graphics/OH_Drawing_RectStyle_Info.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Region.md
JsEtsAPIReference/topics/graphics/OH_Drawing_RoundRect.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Run.md
JsEtsAPIReference/topics/graphics/OH_Drawing_RunBuffer.md
JsEtsAPIReference/topics/graphics/OH_Drawing_SamplingOptions.md
JsEtsAPIReference/topics/graphics/OH_Drawing_ShaderEffect.md
JsEtsAPIReference/topics/graphics/OH_Drawing_ShadowLayer.md
JsEtsAPIReference/topics/graphics/OH_Drawing_String.md
JsEtsAPIReference/topics/graphics/OH_Drawing_StrutStyle.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Surface.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextBlob.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextBlobBuilder.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextBox.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextLine.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextShadow.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextStyle.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TextTab.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Typeface.md
JsEtsAPIReference/topics/graphics/OH_Drawing_Typography.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TypographyCreate.md
JsEtsAPIReference/topics/graphics/OH_Drawing_TypographyStyle.md
JsEtsAPIReference/topics/graphics/OH_Filter.md
JsEtsAPIReference/topics/graphics/OH_Filter_ColorMatrix.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_ColorXY.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_Config.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_Cta861.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_Plane.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_Planes.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_Smpte2086.md
JsEtsAPIReference/topics/graphics/OH_NativeBuffer_StaticMetadata.md
JsEtsAPIReference/topics/graphics/OH_NativeColorSpaceManager.md
JsEtsAPIReference/topics/graphics/OH_NativeImage.md
JsEtsAPIReference/topics/graphics/OH_NativeVSync.md
JsEtsAPIReference/topics/graphics/OH_NativeVSync_ExpectedRateRange.md
JsEtsAPIReference/topics/graphics/OH_OnFrameAvailableListener.md
JsEtsAPIReference/topics/graphics/OH_PixelmapNative.md
JsEtsAPIReference/topics/graphics/Rect.md
JsEtsAPIReference/topics/graphics/Region.md
JsEtsAPIReference/topics/graphics/Scene.md
JsEtsAPIReference/topics/graphics/SceneNode.md
JsEtsAPIReference/topics/graphics/ScenePostProcessSettings.md
JsEtsAPIReference/topics/graphics/SceneResource.md
JsEtsAPIReference/topics/graphics/SceneType.md
JsEtsAPIReference/topics/graphics/WhitePointArray.md
JsEtsAPIReference/topics/graphics/buffer_common.h.md
JsEtsAPIReference/topics/graphics/buffer_handle.h.md
JsEtsAPIReference/topics/graphics/drawing_bitmap.h.md
JsEtsAPIReference/topics/graphics/drawing_brush.h.md
JsEtsAPIReference/topics/graphics/drawing_canvas.h.md
JsEtsAPIReference/topics/graphics/drawing_color.h.md
JsEtsAPIReference/topics/graphics/drawing_color_filter.h.md
JsEtsAPIReference/topics/graphics/drawing_color_space.h.md
JsEtsAPIReference/topics/graphics/drawing_error_code.h.md
JsEtsAPIReference/topics/graphics/drawing_filter.h.md
JsEtsAPIReference/topics/graphics/drawing_font.h.md
JsEtsAPIReference/topics/graphics/drawing_font_collection.h.md
JsEtsAPIReference/topics/graphics/drawing_font_mgr.h.md
JsEtsAPIReference/topics/graphics/drawing_gpu_context.h.md
JsEtsAPIReference/topics/graphics/drawing_image.h.md
JsEtsAPIReference/topics/graphics/drawing_image_filter.h.md
JsEtsAPIReference/topics/graphics/drawing_lattice.h.md
JsEtsAPIReference/topics/graphics/drawing_mask_filter.h.md
JsEtsAPIReference/topics/graphics/drawing_matrix.h.md
JsEtsAPIReference/topics/graphics/drawing_memory_stream.h.md
JsEtsAPIReference/topics/graphics/drawing_path.h.md
JsEtsAPIReference/topics/graphics/drawing_path_effect.h.md
JsEtsAPIReference/topics/graphics/drawing_path_iterator.h.md
JsEtsAPIReference/topics/graphics/drawing_pen.h.md
JsEtsAPIReference/topics/graphics/drawing_pixel_map.h.md
JsEtsAPIReference/topics/graphics/drawing_point.h.md
JsEtsAPIReference/topics/graphics/drawing_record_cmd.h.md
JsEtsAPIReference/topics/graphics/drawing_rect.h.md
JsEtsAPIReference/topics/graphics/drawing_region.h.md
JsEtsAPIReference/topics/graphics/drawing_register_font.h.md
JsEtsAPIReference/topics/graphics/drawing_round_rect.h.md
JsEtsAPIReference/topics/graphics/drawing_sampling_options.h.md
JsEtsAPIReference/topics/graphics/drawing_shader_effect.h.md
JsEtsAPIReference/topics/graphics/drawing_shadow_layer.h.md
JsEtsAPIReference/topics/graphics/drawing_surface.h.md
JsEtsAPIReference/topics/graphics/drawing_text_blob.h.md
JsEtsAPIReference/topics/graphics/drawing_text_declaration.h.md
JsEtsAPIReference/topics/graphics/drawing_text_font_descriptor.h.md
JsEtsAPIReference/topics/graphics/drawing_text_global.h.md
JsEtsAPIReference/topics/graphics/drawing_text_line.h.md
JsEtsAPIReference/topics/graphics/drawing_text_lineTypography.h.md
JsEtsAPIReference/topics/graphics/drawing_text_run.h.md
JsEtsAPIReference/topics/graphics/drawing_text_typography.h.md
JsEtsAPIReference/topics/graphics/drawing_typeface.h.md
JsEtsAPIReference/topics/graphics/drawing_types.h.md
JsEtsAPIReference/topics/graphics/effectKit.md
JsEtsAPIReference/topics/graphics/effect_filter.h.md
JsEtsAPIReference/topics/graphics/effect_types.h.md
JsEtsAPIReference/topics/graphics/external_window.h.md
JsEtsAPIReference/topics/graphics/graphic_error_code.h.md
JsEtsAPIReference/topics/graphics/graphics3d.md
JsEtsAPIReference/topics/graphics/native_buffer.h.md
JsEtsAPIReference/topics/graphics/native_color_space_manager.h.md
JsEtsAPIReference/topics/graphics/native_display_soloist.h.md
JsEtsAPIReference/topics/graphics/native_fence.h.md
JsEtsAPIReference/topics/graphics/native_image.h.md
JsEtsAPIReference/topics/graphics/native_vsync.h.md
JsEtsAPIReference/topics/graphics/头文件.md
JsEtsAPIReference/topics/graphics/模块.md
JsEtsAPIReference/topics/graphics/模块描述.md
JsEtsAPIReference/topics/input/ArkTS API.md
JsEtsAPIReference/topics/input/C API.md
JsEtsAPIReference/topics/input/OH_PixelmapNative.md
JsEtsAPIReference/topics/input/input.md
JsEtsAPIReference/topics/input/oh_axis_type.h.md
JsEtsAPIReference/topics/input/oh_input_manager.h.md
JsEtsAPIReference/topics/input/oh_key_code.h.md
JsEtsAPIReference/topics/input/oh_pointer_style.h.md
JsEtsAPIReference/topics/input/头文件.md
JsEtsAPIReference/topics/input/模块.md
JsEtsAPIReference/topics/media/AVCapability.md
JsEtsAPIReference/topics/media/AVCodec Kit(音视频编解码服务).md
JsEtsAPIReference/topics/media/AVDemuxer.md
JsEtsAPIReference/topics/media/AVImageGenerator.md
JsEtsAPIReference/topics/media/AVMediaBase.md
JsEtsAPIReference/topics/media/AVMetadataExtractor.md
JsEtsAPIReference/topics/media/AVMuxer.md
JsEtsAPIReference/topics/media/AVPlayer.md
JsEtsAPIReference/topics/media/AVPlayerCallback.md
JsEtsAPIReference/topics/media/AVRecorder.md
JsEtsAPIReference/topics/media/AVScreenCapture.md
JsEtsAPIReference/topics/media/AVSession Kit(音视频播控服务).md
JsEtsAPIReference/topics/media/AVSession_DeviceInfo.md
JsEtsAPIReference/topics/media/AVSession_OutputDeviceInfo.md
JsEtsAPIReference/topics/media/AVSession_PlaybackPosition.md
JsEtsAPIReference/topics/media/AVSinkBase.md
JsEtsAPIReference/topics/media/AVSource.md
JsEtsAPIReference/topics/media/AVTranscoder.md
JsEtsAPIReference/topics/media/ArkTS API.md
JsEtsAPIReference/topics/media/Audio Kit(音频服务).md
JsEtsAPIReference/topics/media/AudioCodec.md
JsEtsAPIReference/topics/media/AudioDecoder.md
JsEtsAPIReference/topics/media/AudioEncoder.md
JsEtsAPIReference/topics/media/C API.md
JsEtsAPIReference/topics/media/Camera Kit(相机服务).md
JsEtsAPIReference/topics/media/CameraInput_Callbacks.md
JsEtsAPIReference/topics/media/CameraManager_Callbacks.md
JsEtsAPIReference/topics/media/Camera_AutoDeviceSwitchStatusInfo.md
JsEtsAPIReference/topics/media/Camera_CaptureEndInfo.md
JsEtsAPIReference/topics/media/Camera_CaptureSession.md
JsEtsAPIReference/topics/media/Camera_CaptureStartInfo.md
JsEtsAPIReference/topics/media/Camera_ConcurrentInfo.md
JsEtsAPIReference/topics/media/Camera_ControlCenterStatusInfo.md
JsEtsAPIReference/topics/media/Camera_Device.md
JsEtsAPIReference/topics/media/Camera_DeviceQueryInfo.md
JsEtsAPIReference/topics/media/Camera_FoldStatusInfo.md
JsEtsAPIReference/topics/media/Camera_FrameRateRange.md
JsEtsAPIReference/topics/media/Camera_FrameShutterEndInfo.md
JsEtsAPIReference/topics/media/Camera_FrameShutterInfo.md
JsEtsAPIReference/topics/media/Camera_Input.md
JsEtsAPIReference/topics/media/Camera_Location.md
JsEtsAPIReference/topics/media/Camera_Manager.md
JsEtsAPIReference/topics/media/Camera_MetadataObject.md
JsEtsAPIReference/topics/media/Camera_MetadataOutput.md
JsEtsAPIReference/topics/media/Camera_OcclusionDetectionResult.md
JsEtsAPIReference/topics/media/Camera_OutputCapability.md
JsEtsAPIReference/topics/media/Camera_PhotoCaptureSetting.md
JsEtsAPIReference/topics/media/Camera_PhotoOutput.md
JsEtsAPIReference/topics/media/Camera_Point.md
JsEtsAPIReference/topics/media/Camera_PreviewOutput.md
JsEtsAPIReference/topics/media/Camera_Profile.md
JsEtsAPIReference/topics/media/Camera_Rect.md
JsEtsAPIReference/topics/media/Camera_Size.md
JsEtsAPIReference/topics/media/Camera_SmoothZoomInfo.md
JsEtsAPIReference/topics/media/Camera_StatusInfo.md
JsEtsAPIReference/topics/media/Camera_TorchStatusInfo.md
JsEtsAPIReference/topics/media/Camera_VideoOutput.md
JsEtsAPIReference/topics/media/Camera_VideoProfile.md
JsEtsAPIReference/topics/media/CaptureSession_Callbacks.md
JsEtsAPIReference/topics/media/CodecBase.md
JsEtsAPIReference/topics/media/Constants.md
JsEtsAPIReference/topics/media/Core.md
JsEtsAPIReference/topics/media/DRM Kit(数字版权保护服务).md
JsEtsAPIReference/topics/media/DRM_KeysInfo.md
JsEtsAPIReference/topics/media/DRM_MediaKeyRequest.md
JsEtsAPIReference/topics/media/DRM_MediaKeyRequestInfo.md
JsEtsAPIReference/topics/media/DRM_MediaKeyStatus.md
JsEtsAPIReference/topics/media/DRM_MediaKeySystemDescription.md
JsEtsAPIReference/topics/media/DRM_MediaKeySystemInfo.md
JsEtsAPIReference/topics/media/DRM_OfflineMediakeyIdArray.md
JsEtsAPIReference/topics/media/DRM_PsshInfo.md
JsEtsAPIReference/topics/media/DRM_Statistics.md
JsEtsAPIReference/topics/media/Drm.md
JsEtsAPIReference/topics/media/DrmSubsample.md
JsEtsAPIReference/topics/media/Functions.md
JsEtsAPIReference/topics/media/LowPowerAudioSink.md
JsEtsAPIReference/topics/media/LowPowerVideoSink.md
JsEtsAPIReference/topics/media/Media Kit(媒体服务).md
JsEtsAPIReference/topics/media/Media Library Kit(媒体文件管理服务).md
JsEtsAPIReference/topics/media/MediaAssetManager.md
JsEtsAPIReference/topics/media/MediaKeySession.md
JsEtsAPIReference/topics/media/MediaKeySession_Callback.md
JsEtsAPIReference/topics/media/MediaKeySystem.md
JsEtsAPIReference/topics/media/MediaLibrary_RequestId.md
JsEtsAPIReference/topics/media/MediaLibrary_RequestOptions.md
JsEtsAPIReference/topics/media/MetadataOutput_Callbacks.md
JsEtsAPIReference/topics/media/Multimedia_Drm.md
JsEtsAPIReference/topics/media/NativePixelMap_.md
JsEtsAPIReference/topics/media/NativeWindow.md
JsEtsAPIReference/topics/media/OHAVSession.md
JsEtsAPIReference/topics/media/OHAudio.md
JsEtsAPIReference/topics/media/OHAudioSuite.md
JsEtsAPIReference/topics/media/OH_AVBuffer.md
JsEtsAPIReference/topics/media/OH_AVCapability.md
JsEtsAPIReference/topics/media/OH_AVCastController.md
JsEtsAPIReference/topics/media/OH_AVCencInfo.md
JsEtsAPIReference/topics/media/OH_AVCodec.md
JsEtsAPIReference/topics/media/OH_AVCodecAsyncCallback.md
JsEtsAPIReference/topics/media/OH_AVCodecBufferAttr.md
JsEtsAPIReference/topics/media/OH_AVCodecCallback.md
JsEtsAPIReference/topics/media/OH_AVDataSource.md
JsEtsAPIReference/topics/media/OH_AVDataSourceExt.md
JsEtsAPIReference/topics/media/OH_AVDemuxer.md
JsEtsAPIReference/topics/media/OH_AVFormat.md
JsEtsAPIReference/topics/media/OH_AVHttpHeader.md
JsEtsAPIReference/topics/media/OH_AVImageGenerator.md
JsEtsAPIReference/topics/media/OH_AVMediaSource.md
JsEtsAPIReference/topics/media/OH_AVMediaSourceLoader.md
JsEtsAPIReference/topics/media/OH_AVMediaSourceLoadingRequest.md
JsEtsAPIReference/topics/media/OH_AVMemory.md
JsEtsAPIReference/topics/media/OH_AVMetadataExtractor.md
JsEtsAPIReference/topics/media/OH_AVMetadataExtractor_FrameInfo.md
JsEtsAPIReference/topics/media/OH_AVMetadataExtractor_OutputParam.md
JsEtsAPIReference/topics/media/OH_AVMuxer.md
JsEtsAPIReference/topics/media/OH_AVPlaybackStrategy.md
JsEtsAPIReference/topics/media/OH_AVPlayer.md
JsEtsAPIReference/topics/media/OH_AVRange.md
JsEtsAPIReference/topics/media/OH_AVRecorder.md
JsEtsAPIReference/topics/media/OH_AVRecorder_Config.md
JsEtsAPIReference/topics/media/OH_AVRecorder_EncoderInfo.md
JsEtsAPIReference/topics/media/OH_AVRecorder_Location.md
JsEtsAPIReference/topics/media/OH_AVRecorder_Metadata.md
JsEtsAPIReference/topics/media/OH_AVRecorder_MetadataTemplate.md
JsEtsAPIReference/topics/media/OH_AVRecorder_Profile.md
JsEtsAPIReference/topics/media/OH_AVRecorder_Range.md
JsEtsAPIReference/topics/media/OH_AVSamplesBuffer.md
JsEtsAPIReference/topics/media/OH_AVScreenCapture.md
JsEtsAPIReference/topics/media/OH_AVScreenCaptureCallback.md
JsEtsAPIReference/topics/media/OH_AVScreenCaptureConfig.md
JsEtsAPIReference/topics/media/OH_AVScreenCaptureHighlightConfig.md
JsEtsAPIReference/topics/media/OH_AVScreenCapture_CaptureStrategy.md
JsEtsAPIReference/topics/media/OH_AVScreenCapture_ContentFilter.md
JsEtsAPIReference/topics/media/OH_AVScreenCapture_UserSelectionInfo.md
JsEtsAPIReference/topics/media/OH_AVSeiMessageArray.md
JsEtsAPIReference/topics/media/OH_AVSession.md
JsEtsAPIReference/topics/media/OH_AVSession_AVMediaDescription.md
JsEtsAPIReference/topics/media/OH_AVSession_AVMediaDescriptionBuilder.md
JsEtsAPIReference/topics/media/OH_AVSession_AVPlaybackState.md
JsEtsAPIReference/topics/media/OH_AVSession_AVQueueItem.md
JsEtsAPIReference/topics/media/OH_AVSource.md
JsEtsAPIReference/topics/media/OH_AVTranscoder.md
JsEtsAPIReference/topics/media/OH_AVTranscoder_Config.md
JsEtsAPIReference/topics/media/OH_AudioBuffer.md
JsEtsAPIReference/topics/media/OH_AudioCaptureInfo.md
JsEtsAPIReference/topics/media/OH_AudioDataArray.md
JsEtsAPIReference/topics/media/OH_AudioDeviceDescriptor.md
JsEtsAPIReference/topics/media/OH_AudioDeviceDescriptorArray.md
JsEtsAPIReference/topics/media/OH_AudioEncInfo.md
JsEtsAPIReference/topics/media/OH_AudioFormat.md
JsEtsAPIReference/topics/media/OH_AudioInfo.md
JsEtsAPIReference/topics/media/OH_AudioManager.md
JsEtsAPIReference/topics/media/OH_AudioResourceManager.md
JsEtsAPIReference/topics/media/OH_AudioRoutingManager.md
JsEtsAPIReference/topics/media/OH_AudioSessionManager.md
JsEtsAPIReference/topics/media/OH_AudioSession_DeactivatedEvent.md
JsEtsAPIReference/topics/media/OH_AudioSession_StateChangedEvent.md
JsEtsAPIReference/topics/media/OH_AudioSession_Strategy.md
JsEtsAPIReference/topics/media/OH_AudioStreamInfo.md
JsEtsAPIReference/topics/media/OH_AudioStreamManager.md
JsEtsAPIReference/topics/media/OH_AudioSuite_PureVoiceChangeOption.md
JsEtsAPIReference/topics/media/OH_AudioSuite_SpaceRenderExtensionParams.md
JsEtsAPIReference/topics/media/OH_AudioSuite_SpaceRenderPositionParams.md
JsEtsAPIReference/topics/media/OH_AudioSuite_SpaceRenderRotationParams.md
JsEtsAPIReference/topics/media/OH_AudioVolumeManager.md
JsEtsAPIReference/topics/media/OH_AudioWorkgroup.md
JsEtsAPIReference/topics/media/OH_AuxiliaryPictureInfo.md
JsEtsAPIReference/topics/media/OH_AuxiliaryPictureNative.md
JsEtsAPIReference/topics/media/OH_Camera.md
JsEtsAPIReference/topics/media/OH_ComposeOptions.md
JsEtsAPIReference/topics/media/OH_DecodingOptions.md
JsEtsAPIReference/topics/media/OH_DecodingOptionsForPicture.md
JsEtsAPIReference/topics/media/OH_EffectBufferInfo.md
JsEtsAPIReference/topics/media/OH_EffectFilter.md
JsEtsAPIReference/topics/media/OH_EffectFilterInfo.md
JsEtsAPIReference/topics/media/OH_EqualizerFrequencyBandGains.md
JsEtsAPIReference/topics/media/OH_ImageBufferData.md
JsEtsAPIReference/topics/media/OH_ImageEffect.md
JsEtsAPIReference/topics/media/OH_ImageNative.md
JsEtsAPIReference/topics/media/OH_ImagePackerNative.md
JsEtsAPIReference/topics/media/OH_ImageProcessing.md
JsEtsAPIReference/topics/media/OH_ImageReceiverNative.md
JsEtsAPIReference/topics/media/OH_ImageReceiverOptions.md
JsEtsAPIReference/topics/media/OH_ImageSourceNative.md
JsEtsAPIReference/topics/media/OH_ImageSource_Info.md
JsEtsAPIReference/topics/media/OH_LowPowerAudioSink.md
JsEtsAPIReference/topics/media/OH_LowPowerAudioSinkCallback.md
JsEtsAPIReference/topics/media/OH_LowPowerVideoSink.md
JsEtsAPIReference/topics/media/OH_LowPowerVideoSinkCallback.md
JsEtsAPIReference/topics/media/OH_MediaAsset.md
JsEtsAPIReference/topics/media/OH_MediaAssetChangeRequest.md
JsEtsAPIReference/topics/media/OH_MediaAssetManager.md
JsEtsAPIReference/topics/media/OH_MediaKeySession_Callback.md
JsEtsAPIReference/topics/media/OH_MovingPhoto.md
JsEtsAPIReference/topics/media/OH_NativeBuffer.md
JsEtsAPIReference/topics/media/OH_NativeColorSpaceManager.md
JsEtsAPIReference/topics/media/OH_PackingOptions.md
JsEtsAPIReference/topics/media/OH_PackingOptionsForSequence.md
JsEtsAPIReference/topics/media/OH_PhotoNative.md
JsEtsAPIReference/topics/media/OH_PictureMetadata.md
JsEtsAPIReference/topics/media/OH_PictureNative.md
JsEtsAPIReference/topics/media/OH_PixelmapNative.md
JsEtsAPIReference/topics/media/OH_Pixelmap_HdrDynamicMetadata.md
JsEtsAPIReference/topics/media/OH_Pixelmap_HdrGainmapMetadata.md
JsEtsAPIReference/topics/media/OH_Pixelmap_HdrMetadataValue.md
JsEtsAPIReference/topics/media/OH_Pixelmap_HdrStaticMetadata.md
JsEtsAPIReference/topics/media/OH_Pixelmap_ImageInfo.md
JsEtsAPIReference/topics/media/OH_Pixelmap_InitializationOptions.md
JsEtsAPIReference/topics/media/OH_RecorderInfo.md
JsEtsAPIReference/topics/media/OH_Rect.md
JsEtsAPIReference/topics/media/OH_VideoCaptureInfo.md
JsEtsAPIReference/topics/media/OH_VideoEncInfo.md
JsEtsAPIReference/topics/media/OH_VideoInfo.md
JsEtsAPIReference/topics/media/OH_VideoProcessing.md
JsEtsAPIReference/topics/media/OhosImageComponent.md
JsEtsAPIReference/topics/media/OhosImageDecodingOps.md
JsEtsAPIReference/topics/media/OhosImageReceiverInfo.md
JsEtsAPIReference/topics/media/OhosImageRect.md
JsEtsAPIReference/topics/media/OhosImageRegion.md
JsEtsAPIReference/topics/media/OhosImageSize.md
JsEtsAPIReference/topics/media/OhosImageSource.md
JsEtsAPIReference/topics/media/OhosImageSourceDelayTimeList.md
JsEtsAPIReference/topics/media/OhosImageSourceInfo.md
JsEtsAPIReference/topics/media/OhosImageSourceOps.md
JsEtsAPIReference/topics/media/OhosImageSourceProperty.md
JsEtsAPIReference/topics/media/OhosImageSourceSupportedFormat.md
JsEtsAPIReference/topics/media/OhosImageSourceSupportedFormatList.md
JsEtsAPIReference/topics/media/OhosImageSourceUpdateData.md
JsEtsAPIReference/topics/media/OhosPixelMapCreateOps.md
JsEtsAPIReference/topics/media/OhosPixelMapInfo.md
JsEtsAPIReference/topics/media/OhosPixelMapInfos.md
JsEtsAPIReference/topics/media/PhotoOutput_Callbacks.md
JsEtsAPIReference/topics/media/PreviewOutput_Callbacks.md
JsEtsAPIReference/topics/media/Ringtone Kit(铃声服务).md
JsEtsAPIReference/topics/media/Scan Kit(统一扫码服务).md
JsEtsAPIReference/topics/media/SoundPool (音频池).md
JsEtsAPIReference/topics/media/SystemSoundPlayer (音效播放器).md
JsEtsAPIReference/topics/media/Types.md
JsEtsAPIReference/topics/media/VideoDecoder.md
JsEtsAPIReference/topics/media/VideoEncoder.md
JsEtsAPIReference/topics/media/VideoOutput_Callbacks.md
JsEtsAPIReference/topics/media/VideoProcessing.md
JsEtsAPIReference/topics/media/VideoProcessing_Callback.md
JsEtsAPIReference/topics/media/VideoProcessing_ColorSpaceInfo.md
JsEtsAPIReference/topics/media/avcodec_audio_channel_layout.h.md
JsEtsAPIReference/topics/media/avimage_generator.h.md
JsEtsAPIReference/topics/media/avimage_generator_base.h.md
JsEtsAPIReference/topics/media/avmedia_base.h.md
JsEtsAPIReference/topics/media/avmedia_source.h.md
JsEtsAPIReference/topics/media/avmedia_source.md
JsEtsAPIReference/topics/media/avmetadata_extractor.h.md
JsEtsAPIReference/topics/media/avmetadata_extractor_base.h.md
JsEtsAPIReference/topics/media/avmetakeys.h.md
JsEtsAPIReference/topics/media/avplayer.h.md
JsEtsAPIReference/topics/media/avplayer_base.h.md
JsEtsAPIReference/topics/media/avrecorder.h.md
JsEtsAPIReference/topics/media/avrecorder_base.h.md
JsEtsAPIReference/topics/media/avtranscoder.h.md
JsEtsAPIReference/topics/media/avtranscoder_base.h.md
JsEtsAPIReference/topics/media/camera.h.md
JsEtsAPIReference/topics/media/camera_device.h.md
JsEtsAPIReference/topics/media/camera_input.h.md
JsEtsAPIReference/topics/media/camera_manager.h.md
JsEtsAPIReference/topics/media/capture_session.h.md
JsEtsAPIReference/topics/media/class (ExifMetadata).md
JsEtsAPIReference/topics/media/class (HeifsMetadata).md
JsEtsAPIReference/topics/media/class (MakerNoteHuaweiMetadata).md
JsEtsAPIReference/topics/media/customScan (自定义界面扫码).md
JsEtsAPIReference/topics/media/detectBarcode (图像识码).md
JsEtsAPIReference/topics/media/generateBarcode (码图生成).md
JsEtsAPIReference/topics/media/image_common.h.md
JsEtsAPIReference/topics/media/image_effect.h.md
JsEtsAPIReference/topics/media/image_effect_errors.h.md
JsEtsAPIReference/topics/media/image_effect_filter.h.md
JsEtsAPIReference/topics/media/image_mdk.h.md
JsEtsAPIReference/topics/media/image_mdk_common.h.md
JsEtsAPIReference/topics/media/image_native.h.md
JsEtsAPIReference/topics/media/image_packer_mdk.h.md
JsEtsAPIReference/topics/media/image_packer_native.h.md
JsEtsAPIReference/topics/media/image_pixel_map_mdk.h.md
JsEtsAPIReference/topics/media/image_pixel_map_napi.h.md
JsEtsAPIReference/topics/media/image_processing.h.md
JsEtsAPIReference/topics/media/image_processing_types.h.md
JsEtsAPIReference/topics/media/image_receiver_mdk.h.md
JsEtsAPIReference/topics/media/image_receiver_native.h.md
JsEtsAPIReference/topics/media/image_source_mdk.h.md
JsEtsAPIReference/topics/media/image_source_native.h.md
JsEtsAPIReference/topics/media/lowpower_audio_sink.h.md
JsEtsAPIReference/topics/media/lowpower_audio_sink_base.h.md
JsEtsAPIReference/topics/media/lowpower_avsink_base.h.md
JsEtsAPIReference/topics/media/lowpower_video_sink.h.md
JsEtsAPIReference/topics/media/lowpower_video_sink_base.h.md
JsEtsAPIReference/topics/media/media_access_helper_capi.h.md
JsEtsAPIReference/topics/media/media_asset_base_capi.h.md
JsEtsAPIReference/topics/media/media_asset_capi.h.md
JsEtsAPIReference/topics/media/media_asset_change_request_capi.h.md
JsEtsAPIReference/topics/media/media_asset_manager_capi.h.md
JsEtsAPIReference/topics/media/media_types.h.md
JsEtsAPIReference/topics/media/metadata_output.h.md
JsEtsAPIReference/topics/media/moving_photo_capi.h.md
JsEtsAPIReference/topics/media/multimedia.md
JsEtsAPIReference/topics/media/native_audio_channel_layout.h.md
JsEtsAPIReference/topics/media/native_audio_common.h.md
JsEtsAPIReference/topics/media/native_audio_device_base.h.md
JsEtsAPIReference/topics/media/native_audio_manager.h.md
JsEtsAPIReference/topics/media/native_audio_resource_manager.h.md
JsEtsAPIReference/topics/media/native_audio_routing_manager.h.md
JsEtsAPIReference/topics/media/native_audio_session_manager.h.md
JsEtsAPIReference/topics/media/native_audio_stream_manager.h.md
JsEtsAPIReference/topics/media/native_audio_suite_base.h.md
JsEtsAPIReference/topics/media/native_audio_suite_engine.h.md
JsEtsAPIReference/topics/media/native_audio_volume_manager.h.md
JsEtsAPIReference/topics/media/native_audiocapturer.h.md
JsEtsAPIReference/topics/media/native_audiorenderer.h.md
JsEtsAPIReference/topics/media/native_audiostream_base.h.md
JsEtsAPIReference/topics/media/native_audiostreambuilder.h.md
JsEtsAPIReference/topics/media/native_avbuffer.h.md
JsEtsAPIReference/topics/media/native_avbuffer_info.h.md
JsEtsAPIReference/topics/media/native_avcapability.h.md
JsEtsAPIReference/topics/media/native_avcastcontroller.h.md
JsEtsAPIReference/topics/media/native_avcodec_audiocodec.h.md
JsEtsAPIReference/topics/media/native_avcodec_audiodecoder.h.md
JsEtsAPIReference/topics/media/native_avcodec_audioencoder.h.md
JsEtsAPIReference/topics/media/native_avcodec_base.h.md
JsEtsAPIReference/topics/media/native_avcodec_videodecoder.h.md
JsEtsAPIReference/topics/media/native_avcodec_videoencoder.h.md
JsEtsAPIReference/topics/media/native_avdemuxer.h.md
JsEtsAPIReference/topics/media/native_averrors.h.md
JsEtsAPIReference/topics/media/native_avformat.h.md
JsEtsAPIReference/topics/media/native_avmemory.h.md
JsEtsAPIReference/topics/media/native_avmetadata.h.md
JsEtsAPIReference/topics/media/native_avmuxer.h.md
JsEtsAPIReference/topics/media/native_avplaybackstate.h.md
JsEtsAPIReference/topics/media/native_avqueueitem.h.md
JsEtsAPIReference/topics/media/native_avscreen_capture.h.md
JsEtsAPIReference/topics/media/native_avscreen_capture_base.h.md
JsEtsAPIReference/topics/media/native_avscreen_capture_errors.h.md
JsEtsAPIReference/topics/media/native_avsession.h.md
JsEtsAPIReference/topics/media/native_avsession_base.h.md
JsEtsAPIReference/topics/media/native_avsession_errors.h.md
JsEtsAPIReference/topics/media/native_avsource.h.md
JsEtsAPIReference/topics/media/native_cencinfo.h.md
JsEtsAPIReference/topics/media/native_deviceinfo.h.md
JsEtsAPIReference/topics/media/native_drm_common.h.md
JsEtsAPIReference/topics/media/native_drm_err.h.md
JsEtsAPIReference/topics/media/native_mediakeysession.h.md
JsEtsAPIReference/topics/media/native_mediakeysystem.h.md
JsEtsAPIReference/topics/media/photo_native.h.md
JsEtsAPIReference/topics/media/photo_output.h.md
JsEtsAPIReference/topics/media/picture_native.h.md
JsEtsAPIReference/topics/media/pixelmap_native.h.md
JsEtsAPIReference/topics/media/preview_output.h.md
JsEtsAPIReference/topics/media/ringtone(铃声服务).md
JsEtsAPIReference/topics/media/scanBarcode (默认界面扫码).md
JsEtsAPIReference/topics/media/scanCore (扫码公共信息).md
JsEtsAPIReference/topics/media/video.md
JsEtsAPIReference/topics/media/video_output.h.md
JsEtsAPIReference/topics/media/video_processing.h.md
JsEtsAPIReference/topics/media/video_processing_types.h.md
JsEtsAPIReference/topics/media/头文件.md
JsEtsAPIReference/topics/media/媒体.md
JsEtsAPIReference/topics/media/媒体查询.md
JsEtsAPIReference/topics/media/媒体组件.md
JsEtsAPIReference/topics/media/已停止维护的接口.md
JsEtsAPIReference/topics/media/模块.md
JsEtsAPIReference/topics/media/模块描述.md
JsEtsAPIReference/topics/misc/AAID(应用匿名标识符).md
JsEtsAPIReference/topics/misc/ABR_CameraData.md
JsEtsAPIReference/topics/misc/ABR_Vector3.md
JsEtsAPIReference/topics/misc/AI.md
JsEtsAPIReference/topics/misc/AIP.md
JsEtsAPIReference/topics/misc/AR Engine.md
JsEtsAPIReference/topics/misc/AR Engine(AR引擎服务).md
JsEtsAPIReference/topics/misc/AREngine_ARAugmentedImageSource.md
JsEtsAPIReference/topics/misc/AREngine_ARFrame.md
JsEtsAPIReference/topics/misc/AREngine_ARSemanticDenseCubeData.md
JsEtsAPIReference/topics/misc/AREngine_ARSemanticDensePointData.md
JsEtsAPIReference/topics/misc/AREngine_ARSession.md
JsEtsAPIReference/topics/misc/AREngine_ClipPlaneDistance.md
JsEtsAPIReference/topics/misc/ARKUI_TextPickerCascadeRangeContent.md
JsEtsAPIReference/topics/misc/ARKUI_TextPickerRangeContent.md
JsEtsAPIReference/topics/misc/Ability Kit(程序框架服务).md
JsEtsAPIReference/topics/misc/AbilityAccessControl.md
JsEtsAPIReference/topics/misc/AbilityBase.md
JsEtsAPIReference/topics/misc/AbilityBase_Element.md
JsEtsAPIReference/topics/misc/AbilityBase_Want.md
JsEtsAPIReference/topics/misc/AbilityDelegator.md
JsEtsAPIReference/topics/misc/AbilityDelegatorArgs.md
JsEtsAPIReference/topics/misc/AbilityInfo.md
JsEtsAPIReference/topics/misc/AbilityMonitor.md
JsEtsAPIReference/topics/misc/AbilityResult.md
JsEtsAPIReference/topics/misc/AbilityRunningInfo.md
JsEtsAPIReference/topics/misc/AbilityRuntime.md
JsEtsAPIReference/topics/misc/AbilityRuntime_StartOptions.md
JsEtsAPIReference/topics/misc/AbilityStageContext.md
JsEtsAPIReference/topics/misc/AbilityStageMonitor.md
JsEtsAPIReference/topics/misc/AbilityStartCallback.md
JsEtsAPIReference/topics/misc/AbilityStateData.md
JsEtsAPIReference/topics/misc/Ability_ChildProcessConfigs.md
JsEtsAPIReference/topics/misc/Accessibility Kit(无障碍服务).md
JsEtsAPIReference/topics/misc/AccessibilityExtensionContext (辅助功能扩展上下文).md
JsEtsAPIReference/topics/misc/Account Kit(华为账号服务).md
JsEtsAPIReference/topics/misc/Ads Kit(广告服务).md
JsEtsAPIReference/topics/misc/Agent Framework Kit(智能体框架服务).md
JsEtsAPIReference/topics/misc/AlphaAnimation.md
JsEtsAPIReference/topics/misc/AnimateResult.md
JsEtsAPIReference/topics/misc/Animation.md
JsEtsAPIReference/topics/misc/AnimationFillMode.md
JsEtsAPIReference/topics/misc/AnimationRepeatMode.md
JsEtsAPIReference/topics/misc/AnimationSet.md
JsEtsAPIReference/topics/misc/AnnualTimeZoneRule.md
JsEtsAPIReference/topics/misc/App Linking Kit(应用链接服务).md
JsEtsAPIReference/topics/misc/AppGallery Kit(应用市场服务).md
JsEtsAPIReference/topics/misc/AppPicker(应用选择页).md
JsEtsAPIReference/topics/misc/AppServiceExtensionContext (应用后台服务扩展组件上下文).md
JsEtsAPIReference/topics/misc/AppStateData.md
JsEtsAPIReference/topics/misc/AppVersionInfo.md
JsEtsAPIReference/topics/misc/ApplicationContext (应用上下文).md
JsEtsAPIReference/topics/misc/ApplicationInfo.md
JsEtsAPIReference/topics/misc/ApplicationStateObserver.md
JsEtsAPIReference/topics/misc/ArkData(方舟数据管理).md
JsEtsAPIReference/topics/misc/ArkTS API.md
JsEtsAPIReference/topics/misc/ArkTS API参考.md
JsEtsAPIReference/topics/misc/ArkTS 组件.md
JsEtsAPIReference/topics/misc/ArkTSUtils.ASON.md
JsEtsAPIReference/topics/misc/ArkTSUtils.locks.md
JsEtsAPIReference/topics/misc/ArkTS(方舟编程语言).md
JsEtsAPIReference/topics/misc/ArkUI_Accessibility.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityActionArguments.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityElementInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityElementInfoList.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityEventInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityProvider.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityProviderCallbacks.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityProviderCallbacksWithInstance.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityState.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibilityValue.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibleAction.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibleGridInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibleGridItemInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibleRangeInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AccessibleRect.md
JsEtsAPIReference/topics/misc/ArkUI_ActiveChildrenInfo.md
JsEtsAPIReference/topics/misc/ArkUI_AlignmentRuleOption.md
JsEtsAPIReference/topics/misc/ArkUI_AnimateCompleteCallback.md
JsEtsAPIReference/topics/misc/ArkUI_AnimateOption.md
JsEtsAPIReference/topics/misc/ArkUI_AnimatorEvent.md
JsEtsAPIReference/topics/misc/ArkUI_AnimatorOnFrameEvent.md
JsEtsAPIReference/topics/misc/ArkUI_AnimatorOption.md
JsEtsAPIReference/topics/misc/ArkUI_Animator_.md
JsEtsAPIReference/topics/misc/ArkUI_AttributeItem.md
JsEtsAPIReference/topics/misc/ArkUI_BarrierOption.md
JsEtsAPIReference/topics/misc/ArkUI_CircleShapeOption.md
JsEtsAPIReference/topics/misc/ArkUI_CoastingAxisEvent.md
JsEtsAPIReference/topics/misc/ArkUI_ColorAnimatablePropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_ColorPropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_ColorStop.md
JsEtsAPIReference/topics/misc/ArkUI_CommandPathOption.md
JsEtsAPIReference/topics/misc/ArkUI_ContentTransitionEffect.md
JsEtsAPIReference/topics/misc/ArkUI_Context.md
JsEtsAPIReference/topics/misc/ArkUI_ContextCallback.md
JsEtsAPIReference/topics/misc/ArkUI_Context_.md
JsEtsAPIReference/topics/misc/ArkUI_CrossLanguageOption.md
JsEtsAPIReference/topics/misc/ArkUI_Curve.md
JsEtsAPIReference/topics/misc/ArkUI_Curve_.md
JsEtsAPIReference/topics/misc/ArkUI_CustomDialogOptions.md
JsEtsAPIReference/topics/misc/ArkUI_CustomProperty.md
JsEtsAPIReference/topics/misc/ArkUI_CustomSpanDrawInfo.md
JsEtsAPIReference/topics/misc/ArkUI_CustomSpanMeasureInfo.md
JsEtsAPIReference/topics/misc/ArkUI_CustomSpanMetrics.md
JsEtsAPIReference/topics/misc/ArkUI_DialogDismissEvent.md
JsEtsAPIReference/topics/misc/ArkUI_DragAction.md
JsEtsAPIReference/topics/misc/ArkUI_DragAndDropInfo.md
JsEtsAPIReference/topics/misc/ArkUI_DragEvent.md
JsEtsAPIReference/topics/misc/ArkUI_DragPreviewOption.md
JsEtsAPIReference/topics/misc/ArkUI_DrawContext.md
JsEtsAPIReference/topics/misc/ArkUI_DrawableDescriptor.md
JsEtsAPIReference/topics/misc/ArkUI_DrawableDescriptor_AnimationController.md
JsEtsAPIReference/topics/misc/ArkUI_EmbeddedComponentOption.md
JsEtsAPIReference/topics/misc/ArkUI_EventModule.md
JsEtsAPIReference/topics/misc/ArkUI_ExpectedFrameRateRange.md
JsEtsAPIReference/topics/misc/ArkUI_FloatAnimatablePropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_FloatPropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_GestureEvent.md
JsEtsAPIReference/topics/misc/ArkUI_GestureEventTargetInfo.md
JsEtsAPIReference/topics/misc/ArkUI_GestureInterruptInfo.md
JsEtsAPIReference/topics/misc/ArkUI_GestureRecognizer.md
JsEtsAPIReference/topics/misc/ArkUI_GestureRecognizerHandle_.md
JsEtsAPIReference/topics/misc/ArkUI_GestureRecognizer_.md
JsEtsAPIReference/topics/misc/ArkUI_GridItemRect.md
JsEtsAPIReference/topics/misc/ArkUI_GridItemSize.md
JsEtsAPIReference/topics/misc/ArkUI_GridLayoutOptions.md
JsEtsAPIReference/topics/misc/ArkUI_GuidelineOption.md
JsEtsAPIReference/topics/misc/ArkUI_HostWindowInfo.md
JsEtsAPIReference/topics/misc/ArkUI_ImageAnimatorFrameInfo.md
JsEtsAPIReference/topics/misc/ArkUI_IntOffset.md
JsEtsAPIReference/topics/misc/ArkUI_IntSize.md
JsEtsAPIReference/topics/misc/ArkUI_KeyframeAnimateOption.md
JsEtsAPIReference/topics/misc/ArkUI_LayoutConstraint.md
JsEtsAPIReference/topics/misc/ArkUI_ListChildrenMainSize.md
JsEtsAPIReference/topics/misc/ArkUI_ListItemSwipeActionItem.md
JsEtsAPIReference/topics/misc/ArkUI_ListItemSwipeActionOption.md
JsEtsAPIReference/topics/misc/ArkUI_Margin.md
JsEtsAPIReference/topics/misc/ArkUI_MotionPathOptions.md
JsEtsAPIReference/topics/misc/ArkUI_NativeAnimateAPI_1.md
JsEtsAPIReference/topics/misc/ArkUI_NativeDialog.md
JsEtsAPIReference/topics/misc/ArkUI_NativeDialogAPI_1.md
JsEtsAPIReference/topics/misc/ArkUI_NativeDialogAPI_2.md
JsEtsAPIReference/topics/misc/ArkUI_NativeDialogAPI_3.md
JsEtsAPIReference/topics/misc/ArkUI_NativeDialog_.md
JsEtsAPIReference/topics/misc/ArkUI_NativeGestureAPI_1.md
JsEtsAPIReference/topics/misc/ArkUI_NativeGestureAPI_2.md
JsEtsAPIReference/topics/misc/ArkUI_NativeModule.md
JsEtsAPIReference/topics/misc/ArkUI_NativeNodeAPI_1.md
JsEtsAPIReference/topics/misc/ArkUI_Node.md
JsEtsAPIReference/topics/misc/ArkUI_NodeAdapterEvent.md
JsEtsAPIReference/topics/misc/ArkUI_NodeAdapter_.md
JsEtsAPIReference/topics/misc/ArkUI_NodeBorderColorOption.md
JsEtsAPIReference/topics/misc/ArkUI_NodeBorderRadiusOption.md
JsEtsAPIReference/topics/misc/ArkUI_NodeBorderStyleOption.md
JsEtsAPIReference/topics/misc/ArkUI_NodeBorderWidthOption.md
JsEtsAPIReference/topics/misc/ArkUI_NodeComponentEvent.md
JsEtsAPIReference/topics/misc/ArkUI_NodeContentEvent.md
JsEtsAPIReference/topics/misc/ArkUI_NodeContent_.md
JsEtsAPIReference/topics/misc/ArkUI_NodeCustomEvent.md
JsEtsAPIReference/topics/misc/ArkUI_NodeEvent.md
JsEtsAPIReference/topics/misc/ArkUI_Node_.md
JsEtsAPIReference/topics/misc/ArkUI_NumberValue.md
JsEtsAPIReference/topics/misc/ArkUI_ParallelInnerGestureEvent.md
JsEtsAPIReference/topics/misc/ArkUI_PickerIndicatorBackground.md
JsEtsAPIReference/topics/misc/ArkUI_PickerIndicatorDivider.md
JsEtsAPIReference/topics/misc/ArkUI_PickerIndicatorStyle.md
JsEtsAPIReference/topics/misc/ArkUI_PixelRoundPolicy.md
JsEtsAPIReference/topics/misc/ArkUI_PositionEdges.md
JsEtsAPIReference/topics/misc/ArkUI_ProgressLinearStyleOption.md
JsEtsAPIReference/topics/misc/ArkUI_Rect.md
JsEtsAPIReference/topics/misc/ArkUI_RectShapeOption.md
JsEtsAPIReference/topics/misc/ArkUI_RenderContentModifierHandle.md
JsEtsAPIReference/topics/misc/ArkUI_RenderNodeClipOption.md
JsEtsAPIReference/topics/misc/ArkUI_RenderNodeHandle.md
JsEtsAPIReference/topics/misc/ArkUI_RenderNodeMaskOption.md
JsEtsAPIReference/topics/misc/ArkUI_RenderNodeUtils.md
JsEtsAPIReference/topics/misc/ArkUI_RotationOptions.md
JsEtsAPIReference/topics/misc/ArkUI_RoundRectShapeOption.md
JsEtsAPIReference/topics/misc/ArkUI_ScaleOptions.md
JsEtsAPIReference/topics/misc/ArkUI_SelectedDragPreviewStyle.md
JsEtsAPIReference/topics/misc/ArkUI_SelectionOptions.md
JsEtsAPIReference/topics/misc/ArkUI_ShowCounterConfig.md
JsEtsAPIReference/topics/misc/ArkUI_SnapshotOptions.md
JsEtsAPIReference/topics/misc/ArkUI_StringAsyncEvent.md
JsEtsAPIReference/topics/misc/ArkUI_StyledString.md
JsEtsAPIReference/topics/misc/ArkUI_StyledString_Descriptor.md
JsEtsAPIReference/topics/misc/ArkUI_SwiperArrowStyle.md
JsEtsAPIReference/topics/misc/ArkUI_SwiperDigitIndicator.md
JsEtsAPIReference/topics/misc/ArkUI_SwiperIndicator.md
JsEtsAPIReference/topics/misc/ArkUI_SystemFontStyleEvent.md
JsEtsAPIReference/topics/misc/ArkUI_TextCascadePickerRangeContentArray.md
JsEtsAPIReference/topics/misc/ArkUI_TextChangeEvent.md
JsEtsAPIReference/topics/misc/ArkUI_TextContentBaseController.md
JsEtsAPIReference/topics/misc/ArkUI_TextEditMenuOptions.md
JsEtsAPIReference/topics/misc/ArkUI_TextLayoutManager.md
JsEtsAPIReference/topics/misc/ArkUI_TextMarqueeOptions.md
JsEtsAPIReference/topics/misc/ArkUI_TextMenuItem.md
JsEtsAPIReference/topics/misc/ArkUI_TextMenuItemArray.md
JsEtsAPIReference/topics/misc/ArkUI_TextPickerRangeContentArray.md
JsEtsAPIReference/topics/misc/ArkUI_TextSelectionMenuOptions.md
JsEtsAPIReference/topics/misc/ArkUI_TouchRecognizer.md
JsEtsAPIReference/topics/misc/ArkUI_TouchRecognizerHandle_.md
JsEtsAPIReference/topics/misc/ArkUI_TouchRecognizer_.md
JsEtsAPIReference/topics/misc/ArkUI_TouchTestInfo.md
JsEtsAPIReference/topics/misc/ArkUI_TouchTestInfoItem.md
JsEtsAPIReference/topics/misc/ArkUI_TouchTestInfoItemHandle_.md
JsEtsAPIReference/topics/misc/ArkUI_TouchTestInfoItem_.md
JsEtsAPIReference/topics/misc/ArkUI_TransitionEffect.md
JsEtsAPIReference/topics/misc/ArkUI_TranslationOptions.md
JsEtsAPIReference/topics/misc/ArkUI_UIInputEvent.md
JsEtsAPIReference/topics/misc/ArkUI_Vector2AnimatablePropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_Vector2PropertyHandle.md
JsEtsAPIReference/topics/misc/ArkUI_VisibleAreaEventOptions.md
JsEtsAPIReference/topics/misc/ArkUI_WaterFlowSectionOption.md
JsEtsAPIReference/topics/misc/ArkUI_XComponentSurfaceConfig.md
JsEtsAPIReference/topics/misc/ArkUI(方舟UI框架).md
JsEtsAPIReference/topics/misc/ArkWeb_AnyNativeAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_BlanklessInfo.md
JsEtsAPIReference/topics/misc/ArkWeb_ComponentAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_ControllerAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_CookieManagerAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_HttpBodyStream_.md
JsEtsAPIReference/topics/misc/ArkWeb_JavaScriptBridgeData.md
JsEtsAPIReference/topics/misc/ArkWeb_JavaScriptObject.md
JsEtsAPIReference/topics/misc/ArkWeb_JavaScriptValueAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_JavaScriptValue_.md
JsEtsAPIReference/topics/misc/ArkWeb_ProxyMethod.md
JsEtsAPIReference/topics/misc/ArkWeb_ProxyMethodWithResult.md
JsEtsAPIReference/topics/misc/ArkWeb_ProxyObject.md
JsEtsAPIReference/topics/misc/ArkWeb_ProxyObjectWithResult.md
JsEtsAPIReference/topics/misc/ArkWeb_RequestHeaderList_.md
JsEtsAPIReference/topics/misc/ArkWeb_ResourceHandler_.md
JsEtsAPIReference/topics/misc/ArkWeb_ResourceRequest_.md
JsEtsAPIReference/topics/misc/ArkWeb_Response_.md
JsEtsAPIReference/topics/misc/ArkWeb_SchemeHandler_.md
JsEtsAPIReference/topics/misc/ArkWeb_WebMessageAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_WebMessagePortAPI.md
JsEtsAPIReference/topics/misc/ArkWeb_WebMessagePort_.md
JsEtsAPIReference/topics/misc/ArkWeb_WebMessage_.md
JsEtsAPIReference/topics/misc/ArkWeb(方舟Web).md
JsEtsAPIReference/topics/misc/AssetAccelerationExtensionAbility(资源加速ExtensionAbility).md
JsEtsAPIReference/topics/misc/AssetAccelerationExtensionContext(资源加速ExtensionContext).md
JsEtsAPIReference/topics/misc/AttributeUpdater.md
JsEtsAPIReference/topics/misc/Background Tasks Kit(后台任务开发服务).md
JsEtsAPIReference/topics/misc/BackgroundProcessManager.md
JsEtsAPIReference/topics/misc/BaseContext.md
JsEtsAPIReference/topics/misc/BaseDdk.md
JsEtsAPIReference/topics/misc/BaseOverlay.md
JsEtsAPIReference/topics/misc/BasePriorityOverlay.md
JsEtsAPIReference/topics/misc/Basic Services Kit(基础服务).md
JsEtsAPIReference/topics/misc/Bubble.md
JsEtsAPIReference/topics/misc/BuilderNode.md
JsEtsAPIReference/topics/misc/BuildingOverlay.md
JsEtsAPIReference/topics/misc/BundleInfo.md
JsEtsAPIReference/topics/misc/C API.md
JsEtsAPIReference/topics/misc/CANN Kit(CANN 服务).md
JsEtsAPIReference/topics/misc/CANN.md
JsEtsAPIReference/topics/misc/CSS语法参考.md
JsEtsAPIReference/topics/misc/Calendar Kit(日历服务).md
JsEtsAPIReference/topics/misc/Call Service Kit(通话服务).md
JsEtsAPIReference/topics/misc/CallerInfoQueryExtensionAbility (来去电信息查询扩展Ability).md
JsEtsAPIReference/topics/misc/CallerInfoQueryExtensionContext (来去电信息查询扩展Context).md
JsEtsAPIReference/topics/misc/CameraUpdate.md
JsEtsAPIReference/topics/misc/CanvasGradient对象.md
JsEtsAPIReference/topics/misc/CanvasRenderingContext2D对象.md
JsEtsAPIReference/topics/misc/Car Kit(车服务).md
JsEtsAPIReference/topics/misc/ChildProcess.md
JsEtsAPIReference/topics/misc/Cloud Foundation Kit(云开发服务).md
JsEtsAPIReference/topics/misc/CloudDisk.md
JsEtsAPIReference/topics/misc/CloudDisk_ChangeData.md
JsEtsAPIReference/topics/misc/CloudDisk_ChangesResult.md
JsEtsAPIReference/topics/misc/CloudDisk_DisplayNameInfo.md
JsEtsAPIReference/topics/misc/CloudDisk_FailedList.md
JsEtsAPIReference/topics/misc/CloudDisk_FileSyncState.md
JsEtsAPIReference/topics/misc/CloudDisk_PathInfo.md
JsEtsAPIReference/topics/misc/CloudDisk_ResultList.md
JsEtsAPIReference/topics/misc/CloudDisk_SyncFolder.md
JsEtsAPIReference/topics/misc/ClusterOverlay.md
JsEtsAPIReference/topics/misc/CommonEventData.md
JsEtsAPIReference/topics/misc/CommonEventPublishData.md
JsEtsAPIReference/topics/misc/CommonEventSubscribeInfo.md
JsEtsAPIReference/topics/misc/CommonEvent_PublishInfo.md
JsEtsAPIReference/topics/misc/CommonEvent_RcvData.md
JsEtsAPIReference/topics/misc/CommonEvent_SubscribeInfo.md
JsEtsAPIReference/topics/misc/ComponentContent.md
JsEtsAPIReference/topics/misc/ConnectOptions.md
JsEtsAPIReference/topics/misc/Console (控制台).md
JsEtsAPIReference/topics/misc/Contacts Kit(联系人服务).md
JsEtsAPIReference/topics/misc/Content.md
JsEtsAPIReference/topics/misc/Context (FA模型的上下文基类).md
JsEtsAPIReference/topics/misc/Context (Stage模型的上下文基类).md
JsEtsAPIReference/topics/misc/ContinuationExtraParams.md
JsEtsAPIReference/topics/misc/ContinuationResult.md
JsEtsAPIReference/topics/misc/Core File Kit(文件基础服务).md
JsEtsAPIReference/topics/misc/Core Speech Kit(基础语音服务).md
JsEtsAPIReference/topics/misc/Core Vision Kit(基础视觉服务).md
JsEtsAPIReference/topics/misc/CustomizeData.md
JsEtsAPIReference/topics/misc/DDK_Ashmem.md
JsEtsAPIReference/topics/misc/Data Augmentation Kit(数据增强服务).md
JsEtsAPIReference/topics/misc/DataAbilityHelper.md
JsEtsAPIReference/topics/misc/DataAbilityOperation.md
JsEtsAPIReference/topics/misc/DataAbilityResult.md
JsEtsAPIReference/topics/misc/Data_Asset.md
JsEtsAPIReference/topics/misc/DateTimeRule.md
JsEtsAPIReference/topics/misc/Desktop Extension Kit(桌面拓展服务).md
JsEtsAPIReference/topics/misc/DeviceInfo.md
JsEtsAPIReference/topics/misc/Driver Development Kit(驱动开发服务).md
JsEtsAPIReference/topics/misc/DriverExtensionContext.md
JsEtsAPIReference/topics/misc/EGL.md
JsEtsAPIReference/topics/misc/ElementName.md
JsEtsAPIReference/topics/misc/EmbeddableUIAbilityContext.md
JsEtsAPIReference/topics/misc/Enterprise Space Kit(企业数字空间服务).md
JsEtsAPIReference/topics/misc/EnterpriseAdminExtensionContext.md
JsEtsAPIReference/topics/misc/Environment.md
JsEtsAPIReference/topics/misc/ErrorObserver.md
JsEtsAPIReference/topics/misc/EventHub.md
JsEtsAPIReference/topics/misc/ExtensionAbilityInfo.md
JsEtsAPIReference/topics/misc/ExtensionContext.md
JsEtsAPIReference/topics/misc/FAST Kit(算法加速服务).md
JsEtsAPIReference/topics/misc/FAST.md
JsEtsAPIReference/topics/misc/FAST_Rect.md
JsEtsAPIReference/topics/misc/FA模型能力的接口.md
JsEtsAPIReference/topics/misc/FFRT.md
JsEtsAPIReference/topics/misc/FG_AlgorithmModeInfo.md
JsEtsAPIReference/topics/misc/FG_ContextDescription_VK.md
JsEtsAPIReference/topics/misc/FG_Dimension2D.md
JsEtsAPIReference/topics/misc/FG_DispatchDescription_GLES.md
JsEtsAPIReference/topics/misc/FG_DispatchDescription_VK.md
JsEtsAPIReference/topics/misc/FG_ImageFormat_VK.md
JsEtsAPIReference/topics/misc/FG_ImageInfo_VK.md
JsEtsAPIReference/topics/misc/FG_ImageSync_VK.md
JsEtsAPIReference/topics/misc/FG_IntegrationInfo.md
JsEtsAPIReference/topics/misc/FG_Mat4x4.md
JsEtsAPIReference/topics/misc/FG_PerFrameExtendedCameraInfo.md
JsEtsAPIReference/topics/misc/FG_ResolutionInfo.md
JsEtsAPIReference/topics/misc/FG_Vec3D.md
JsEtsAPIReference/topics/misc/File Manager Service Kit(文件管理服务).md
JsEtsAPIReference/topics/misc/FileIO.md
JsEtsAPIReference/topics/misc/FileShare_PolicyErrorResult.md
JsEtsAPIReference/topics/misc/FileShare_PolicyInfo.md
JsEtsAPIReference/topics/misc/FlowFieldOverlay.md
JsEtsAPIReference/topics/misc/FontSizeAnimation.md
JsEtsAPIReference/topics/misc/Form Kit(卡片开发服务).md
JsEtsAPIReference/topics/misc/FormEditExtensionContext.md
JsEtsAPIReference/topics/misc/FormExtensionContext.md
JsEtsAPIReference/topics/misc/FrameNode.md
JsEtsAPIReference/topics/misc/Function Flow Runtime Kit.md
JsEtsAPIReference/topics/misc/Functions.md
JsEtsAPIReference/topics/misc/Game Controller Kit(游戏控制器服务).md
JsEtsAPIReference/topics/misc/Game Service Kit(游戏服务).md
JsEtsAPIReference/topics/misc/GameController.md
JsEtsAPIReference/topics/misc/GamePerformance.md
JsEtsAPIReference/topics/misc/GlobalColorPicker.md
JsEtsAPIReference/topics/misc/Graphics Accelerate Kit(图形加速服务).md
JsEtsAPIReference/topics/misc/Graphics.md
JsEtsAPIReference/topics/misc/GraphicsAccelerate.md
JsEtsAPIReference/topics/misc/GuardService(屏幕时间守护服务).md
JsEtsAPIReference/topics/misc/HML语法参考.md
JsEtsAPIReference/topics/misc/HMS_GCP_Color.md
JsEtsAPIReference/topics/misc/HMS_GCP_PickedColorInfo.md
JsEtsAPIReference/topics/misc/HMS_SpatialRecon_DataFrame.md
JsEtsAPIReference/topics/misc/HMS_SpatialRecon_ModelWriteInfo.md
JsEtsAPIReference/topics/misc/HMS_SpatialRecon_Session.md
JsEtsAPIReference/topics/misc/HandWrite.md
JsEtsAPIReference/topics/misc/HandWrite_HistoricalPoint.md
JsEtsAPIReference/topics/misc/HandwriteController (手写套件功能).md
JsEtsAPIReference/topics/misc/HapModuleInfo.md
JsEtsAPIReference/topics/misc/Health Service Kit(运动健康服务).md
JsEtsAPIReference/topics/misc/Heatmap.md
JsEtsAPIReference/topics/misc/HiAISingleOpDescriptor_ConvolutionParam.md
JsEtsAPIReference/topics/misc/HiAI_SingleOpExecutorConvolutionParam.md
JsEtsAPIReference/topics/misc/HiAI_SingleOpExecutorFusedConvolutionActivationParam.md
JsEtsAPIReference/topics/misc/HiAppEvent.md
JsEtsAPIReference/topics/misc/HiAppEvent_AppEventGroup.md
JsEtsAPIReference/topics/misc/HiAppEvent_AppEventInfo.md
JsEtsAPIReference/topics/misc/HiAppEvent_Config.md
JsEtsAPIReference/topics/misc/HiAppEvent_Processor.md
JsEtsAPIReference/topics/misc/HiAppEvent_Watcher.md
JsEtsAPIReference/topics/misc/HiCollie.md
JsEtsAPIReference/topics/misc/HiCollie_DetectionParam.md
JsEtsAPIReference/topics/misc/HiCollie_SetTimerParam.md
JsEtsAPIReference/topics/misc/HiDebug.md
JsEtsAPIReference/topics/misc/HiDebug_Backtrace_Object___.md
JsEtsAPIReference/topics/misc/HiDebug_GraphicsMemorySummary.md
JsEtsAPIReference/topics/misc/HiDebug_JsStackFrame.md
JsEtsAPIReference/topics/misc/HiDebug_MallocDispatch.md
JsEtsAPIReference/topics/misc/HiDebug_MemoryLimit.md
JsEtsAPIReference/topics/misc/HiDebug_NativeMemInfo.md
JsEtsAPIReference/topics/misc/HiDebug_NativeStackFrame.md
JsEtsAPIReference/topics/misc/HiDebug_ProcessSamplerConfig.md
JsEtsAPIReference/topics/misc/HiDebug_StackFrame.md
JsEtsAPIReference/topics/misc/HiDebug_SystemMemInfo.md
JsEtsAPIReference/topics/misc/HiDebug_ThreadCpuUsage.md
JsEtsAPIReference/topics/misc/HiLog.md
JsEtsAPIReference/topics/misc/HiTrace.md
JsEtsAPIReference/topics/misc/HiTraceId.md
JsEtsAPIReference/topics/misc/HidDdk.md
JsEtsAPIReference/topics/misc/Hid_AbsAxesArray.md
JsEtsAPIReference/topics/misc/Hid_Device.md
JsEtsAPIReference/topics/misc/Hid_DeviceHandle.md
JsEtsAPIReference/topics/misc/Hid_EmitItem.md
JsEtsAPIReference/topics/misc/Hid_EventProperties.md
JsEtsAPIReference/topics/misc/Hid_EventTypeArray.md
JsEtsAPIReference/topics/misc/Hid_KeyCodeArray.md
JsEtsAPIReference/topics/misc/Hid_MscEventArray.md
JsEtsAPIReference/topics/misc/Hid_RawDevInfo.md
JsEtsAPIReference/topics/misc/Hid_RelAxesArray.md
JsEtsAPIReference/topics/misc/JSVM.md
JsEtsAPIReference/topics/misc/JSVM_CallbackInfo___.md
JsEtsAPIReference/topics/misc/JSVM_CodeCache.md
JsEtsAPIReference/topics/misc/JSVM_CompileOptions.md
JsEtsAPIReference/topics/misc/JSVM_CompileProfile.md
JsEtsAPIReference/topics/misc/JSVM_CpuProfiler___.md
JsEtsAPIReference/topics/misc/JSVM_CreateVMOptions.md
JsEtsAPIReference/topics/misc/JSVM_Data___.md
JsEtsAPIReference/topics/misc/JSVM_Deferred___.md
JsEtsAPIReference/topics/misc/JSVM_EnvScope___.md
JsEtsAPIReference/topics/misc/JSVM_Env___.md
JsEtsAPIReference/topics/misc/JSVM_EscapableHandleScope___.md
JsEtsAPIReference/topics/misc/JSVM_ExtendedErrorInfo.md
JsEtsAPIReference/topics/misc/JSVM_HandleScope___.md
JsEtsAPIReference/topics/misc/JSVM_HeapStatistics.md
JsEtsAPIReference/topics/misc/JSVM_InitOptions.md
JsEtsAPIReference/topics/misc/JSVM_PropertyDescriptor.md
JsEtsAPIReference/topics/misc/JSVM_PropertyHandler.md
JsEtsAPIReference/topics/misc/JSVM_Ref___.md
JsEtsAPIReference/topics/misc/JSVM_ScriptOrigin.md
JsEtsAPIReference/topics/misc/JSVM_Script___.md
JsEtsAPIReference/topics/misc/JSVM_TypeTag.md
JsEtsAPIReference/topics/misc/JSVM_VMInfo.md
JsEtsAPIReference/topics/misc/JSVM_VMScope___.md
JsEtsAPIReference/topics/misc/JSVM_VM___.md
JsEtsAPIReference/topics/misc/JSVM_Value___.md
JsEtsAPIReference/topics/misc/JS服务卡片UI组件.md
JsEtsAPIReference/topics/misc/JS组件.md
JsEtsAPIReference/topics/misc/JS语法参考.md
JsEtsAPIReference/topics/misc/Kernel Enhance Kit(内核增强能力).md
JsEtsAPIReference/topics/misc/KioskStatus (Kiosk状态信息).md
JsEtsAPIReference/topics/misc/LatLngBoundsUtils.md
JsEtsAPIReference/topics/misc/LauncherAbilityInfo.md
JsEtsAPIReference/topics/misc/Live View Kit(实况窗服务).md
JsEtsAPIReference/topics/misc/LiveFormExtensionContext.md
JsEtsAPIReference/topics/misc/LiveViewLockScreenExtensionAbility.md
JsEtsAPIReference/topics/misc/LiveViewLockScreenExtensionContext.md
JsEtsAPIReference/topics/misc/Localization Kit(本地化开发服务).md
JsEtsAPIReference/topics/misc/Location Kit(位置服务).md
JsEtsAPIReference/topics/misc/Location.md
JsEtsAPIReference/topics/misc/Location_BasicInfo.md
JsEtsAPIReference/topics/misc/Location_Info.md
JsEtsAPIReference/topics/misc/Location_RequestConfig.md
JsEtsAPIReference/topics/misc/LoopObserver.md
JsEtsAPIReference/topics/misc/MDM Kit(企业设备管理服务).md
JsEtsAPIReference/topics/misc/Map Kit(地图服务).md
JsEtsAPIReference/topics/misc/MapArc.md
JsEtsAPIReference/topics/misc/MapCircle.md
JsEtsAPIReference/topics/misc/MapComponentController.md
JsEtsAPIReference/topics/misc/MapEventManager.md
JsEtsAPIReference/topics/misc/MapPolygon.md
JsEtsAPIReference/topics/misc/MapPolyline.md
JsEtsAPIReference/topics/misc/Marker.md
JsEtsAPIReference/topics/misc/MarkerClusterInfo.md
JsEtsAPIReference/topics/misc/MarkerDelegate.md
JsEtsAPIReference/topics/misc/MassPointOverlay.md
JsEtsAPIReference/topics/misc/MassPointOverlayCallback.md
JsEtsAPIReference/topics/misc/Mechanic Kit(机械设备管理服务).md
JsEtsAPIReference/topics/misc/Metadata.md
JsEtsAPIReference/topics/misc/MindSpore Lite Kit(昇思推理框架服务).md
JsEtsAPIReference/topics/misc/MindSpore.md
JsEtsAPIReference/topics/misc/ModuleInfo.md
JsEtsAPIReference/topics/misc/ModuleInstall.md
JsEtsAPIReference/topics/misc/Multimodal Awareness Kit(多模态融合感知服务).md
JsEtsAPIReference/topics/misc/MvtOverlay.md
JsEtsAPIReference/topics/misc/NDK涉及的musl libc接口使用限制的说明.md
JsEtsAPIReference/topics/misc/NNRTDeviceDesc.md
JsEtsAPIReference/topics/misc/NN_QuantParam.md
JsEtsAPIReference/topics/misc/NN_Tensor.md
JsEtsAPIReference/topics/misc/NN_TensorDesc.md
JsEtsAPIReference/topics/misc/Native api中导出的EGL符号列表.md
JsEtsAPIReference/topics/misc/Native api中导出的ICU4C符号列表.md
JsEtsAPIReference/topics/misc/Native api中导出的OpenGL ES 3.2符号列表.md
JsEtsAPIReference/topics/misc/Native api中没有导出的符号列表.md
JsEtsAPIReference/topics/misc/NativeChildProcess_Args.md
JsEtsAPIReference/topics/misc/NativeChildProcess_Fd.md
JsEtsAPIReference/topics/misc/NativeChildProcess_FdList.md
JsEtsAPIReference/topics/misc/NativeChildProcess_Options.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_CutoutInfo.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_DisplayColorSpace.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_DisplayHdrFormat.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_DisplayInfo.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_DisplaysInfo.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_Rect.md
JsEtsAPIReference/topics/misc/NativeDisplayManager_WaterfallDisplayAreaRects.md
JsEtsAPIReference/topics/misc/NativeResourceManager.md
JsEtsAPIReference/topics/misc/NativeWindow.md
JsEtsAPIReference/topics/misc/Native_Bundle.md
JsEtsAPIReference/topics/misc/Natural Language Kit(自然语言理解服务).md
JsEtsAPIReference/topics/misc/Neural Network Runtime Kit(Neural Network运行时服务).md
JsEtsAPIReference/topics/misc/NeuralNetworkRuntime.md
JsEtsAPIReference/topics/misc/Node-API.md
JsEtsAPIReference/topics/misc/NodeContent.md
JsEtsAPIReference/topics/misc/NodeController.md
JsEtsAPIReference/topics/misc/Notification Kit(用户通知服务).md
JsEtsAPIReference/topics/misc/NotificationActionButton.md
JsEtsAPIReference/topics/misc/NotificationCommonDef.md
JsEtsAPIReference/topics/misc/NotificationContent.md
JsEtsAPIReference/topics/misc/NotificationExtensionContent.md
JsEtsAPIReference/topics/misc/NotificationExtensionSubscriptionInfo.md
JsEtsAPIReference/topics/misc/NotificationFlags.md
JsEtsAPIReference/topics/misc/NotificationInfo.md
JsEtsAPIReference/topics/misc/NotificationRequest.md
JsEtsAPIReference/topics/misc/NotificationSlot.md
JsEtsAPIReference/topics/misc/NotificationTemplate.md
JsEtsAPIReference/topics/misc/NotificationUserInput.md
JsEtsAPIReference/topics/misc/OHBufferHandle.md
JsEtsAPIReference/topics/misc/OHIPCDeathRecipient.md
JsEtsAPIReference/topics/misc/OHIPCParcel.md
JsEtsAPIReference/topics/misc/OHIPCRemoteObject.md
JsEtsAPIReference/topics/misc/OHIPCRemoteProxy.md
JsEtsAPIReference/topics/misc/OHIPCRemoteStub.md
JsEtsAPIReference/topics/misc/OHIPCSkeleton.md
JsEtsAPIReference/topics/misc/OH_AI_AllocatorHandle.md
JsEtsAPIReference/topics/misc/OH_AI_CallBackParam.md
JsEtsAPIReference/topics/misc/OH_AI_ContextHandle.md
JsEtsAPIReference/topics/misc/OH_AI_DeviceInfoHandle.md
JsEtsAPIReference/topics/misc/OH_AI_ModelHandle.md
JsEtsAPIReference/topics/misc/OH_AI_ShapeInfo.md
JsEtsAPIReference/topics/misc/OH_AI_TensorHandle.md
JsEtsAPIReference/topics/misc/OH_AI_TensorHandleArray.md
JsEtsAPIReference/topics/misc/OH_AI_TrainCfgHandle.md
JsEtsAPIReference/topics/misc/OH_ArkUI_SurfaceCallback.md
JsEtsAPIReference/topics/misc/OH_ArkUI_SurfaceHolder.md
JsEtsAPIReference/topics/misc/OH_BatteryInfo.md
JsEtsAPIReference/topics/misc/OH_CommonEvent.md
JsEtsAPIReference/topics/misc/OH_Cursor.md
JsEtsAPIReference/topics/misc/OH_Data_VBuckets.md
JsEtsAPIReference/topics/misc/OH_Data_Value.md
JsEtsAPIReference/topics/misc/OH_Data_Values.md
JsEtsAPIReference/topics/misc/OH_DisplayManager.md
JsEtsAPIReference/topics/misc/OH_IPC_MessageOption.md
JsEtsAPIReference/topics/misc/OH_NNCompilation.md
JsEtsAPIReference/topics/misc/OH_NNExecutor.md
JsEtsAPIReference/topics/misc/OH_NNModel.md
JsEtsAPIReference/topics/misc/OH_NN_Memory.md
JsEtsAPIReference/topics/misc/OH_NN_QuantParam.md
JsEtsAPIReference/topics/misc/OH_NN_Tensor.md
JsEtsAPIReference/topics/misc/OH_NN_UInt32Array.md
JsEtsAPIReference/topics/misc/OH_NativeBuffer.md
JsEtsAPIReference/topics/misc/OH_NativeBundle_AbilityResourceInfo.md
JsEtsAPIReference/topics/misc/OH_NativeBundle_ApplicationInfo.md
JsEtsAPIReference/topics/misc/OH_NativeBundle_ElementName.md
JsEtsAPIReference/topics/misc/OH_NativeBundle_Metadata.md
JsEtsAPIReference/topics/misc/OH_NativeBundle_ModuleMetadata.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent Native XComponent.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_Callback.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_ExpectedRateRange.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_ExtraMouseEventInfo.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_HistoricalPoint.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_KeyEvent.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_MouseEvent.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_MouseEvent_Callback.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_TouchEvent.md
JsEtsAPIReference/topics/misc/OH_NativeXComponent_TouchPoint.md
JsEtsAPIReference/topics/misc/OH_Pasteboard.md
JsEtsAPIReference/topics/misc/OH_PasteboardObserver.md
JsEtsAPIReference/topics/misc/OH_PixelmapNative.md
JsEtsAPIReference/topics/misc/OH_PixelmapNative_.md
JsEtsAPIReference/topics/misc/OH_Predicates.md
JsEtsAPIReference/topics/misc/OH_Preferences.md
JsEtsAPIReference/topics/misc/OH_PreferencesOption.md
JsEtsAPIReference/topics/misc/OH_PreferencesPair.md
JsEtsAPIReference/topics/misc/OH_PreferencesValue.md
JsEtsAPIReference/topics/misc/OH_Print.md
JsEtsAPIReference/topics/misc/OH_QoS_GewuCreateSessionResult.md
JsEtsAPIReference/topics/misc/OH_QoS_GewuSubmitRequestResult.md
JsEtsAPIReference/topics/misc/OH_RDB_ReturningContext.md
JsEtsAPIReference/topics/misc/OH_RDB_TransOptions.md
JsEtsAPIReference/topics/misc/OH_Rdb_Config.md
JsEtsAPIReference/topics/misc/OH_Rdb_ConfigV2.md
JsEtsAPIReference/topics/misc/OH_Rdb_CryptoParam.md
JsEtsAPIReference/topics/misc/OH_Rdb_Store.md
JsEtsAPIReference/topics/misc/OH_Rdb_Transaction.md
JsEtsAPIReference/topics/misc/OH_Scan.md
JsEtsAPIReference/topics/misc/OH_UdmfData.md
JsEtsAPIReference/topics/misc/OH_UdmfDataLoadInfo.md
JsEtsAPIReference/topics/misc/OH_UdmfDataLoadParams.md
JsEtsAPIReference/topics/misc/OH_UdmfGetDataParams.md
JsEtsAPIReference/topics/misc/OH_UdmfOptions.md
JsEtsAPIReference/topics/misc/OH_UdmfProperty.md
JsEtsAPIReference/topics/misc/OH_UdmfRecord.md
JsEtsAPIReference/topics/misc/OH_UdmfRecordProvider.md
JsEtsAPIReference/topics/misc/OH_Udmf_ProgressInfo.md
JsEtsAPIReference/topics/misc/OH_UdsAppItem.md
JsEtsAPIReference/topics/misc/OH_UdsArrayBuffer.md
JsEtsAPIReference/topics/misc/OH_UdsContentForm.md
JsEtsAPIReference/topics/misc/OH_UdsDetails.md
JsEtsAPIReference/topics/misc/OH_UdsFileUri.md
JsEtsAPIReference/topics/misc/OH_UdsHtml.md
JsEtsAPIReference/topics/misc/OH_UdsHyperlink.md
JsEtsAPIReference/topics/misc/OH_UdsPixelMap.md
JsEtsAPIReference/topics/misc/OH_UdsPlainText.md
JsEtsAPIReference/topics/misc/OH_Utd.md
JsEtsAPIReference/topics/misc/OH_VBucket.md
JsEtsAPIReference/topics/misc/OH_VObject.md
JsEtsAPIReference/topics/misc/OffscreenCanvasRenderingContext2D对象.md
JsEtsAPIReference/topics/misc/OffscreenCanvas对象.md
JsEtsAPIReference/topics/misc/OpenGL ES.md
JsEtsAPIReference/topics/misc/OpenGL.md
JsEtsAPIReference/topics/misc/OpenGL符号列表.md
JsEtsAPIReference/topics/misc/OpenGTX_ConfigDescription.md
JsEtsAPIReference/topics/misc/OpenGTX_FrameRenderInfo.md
JsEtsAPIReference/topics/misc/OpenGTX_GameSceneInfo.md
JsEtsAPIReference/topics/misc/OpenGTX_NetworkInfo.md
JsEtsAPIReference/topics/misc/OpenGTX_NetworkLatency.md
JsEtsAPIReference/topics/misc/OpenGTX_ResolutionValue.md
JsEtsAPIReference/topics/misc/OpenGTX_Vector3.md
JsEtsAPIReference/topics/misc/OpenSL ES.md
JsEtsAPIReference/topics/misc/OsAccount.md
JsEtsAPIReference/topics/misc/OverlayModuleInfo.md
JsEtsAPIReference/topics/misc/PDF Kit(PDF服务).md
JsEtsAPIReference/topics/misc/POI类型值.md
JsEtsAPIReference/topics/misc/ParamListNode_.md
JsEtsAPIReference/topics/misc/Pasteboard.md
JsEtsAPIReference/topics/misc/Pasteboard_GetDataParams.md
JsEtsAPIReference/topics/misc/Pasteboard_ProgressInfo.md
JsEtsAPIReference/topics/misc/Path2D对象.md
JsEtsAPIReference/topics/misc/Pen Kit(手写笔服务).md
JsEtsAPIReference/topics/misc/Performance Analysis Kit(性能分析服务).md
JsEtsAPIReference/topics/misc/PermissionRequestResult.md
JsEtsAPIReference/topics/misc/PhotoEditorExtensionContext.md
JsEtsAPIReference/topics/misc/PictureInPicture_PipConfig.md
JsEtsAPIReference/topics/misc/PlayImageAnimation.md
JsEtsAPIReference/topics/misc/PointAnnotation.md
JsEtsAPIReference/topics/misc/PointPredictor(报点预测功能).md
JsEtsAPIReference/topics/misc/Preferences.md
JsEtsAPIReference/topics/misc/Preview Kit(文件预览服务).md
JsEtsAPIReference/topics/misc/Preview.md
JsEtsAPIReference/topics/misc/Print_DefaultValue.md
JsEtsAPIReference/topics/misc/Print_Margin.md
JsEtsAPIReference/topics/misc/Print_PageSize.md
JsEtsAPIReference/topics/misc/Print_PrintAttributes.md
JsEtsAPIReference/topics/misc/Print_PrintDocCallback.md
JsEtsAPIReference/topics/misc/Print_PrintJob.md
JsEtsAPIReference/topics/misc/Print_PrinterCapability.md
JsEtsAPIReference/topics/misc/Print_PrinterInfo.md
JsEtsAPIReference/topics/misc/Print_Property.md
JsEtsAPIReference/topics/misc/Print_PropertyList.md
JsEtsAPIReference/topics/misc/Print_Range.md
JsEtsAPIReference/topics/misc/Print_Resolution.md
JsEtsAPIReference/topics/misc/Print_StringList.md
JsEtsAPIReference/topics/misc/ProcessData.md
JsEtsAPIReference/topics/misc/ProcessInfo.md
JsEtsAPIReference/topics/misc/ProcessInformation.md
JsEtsAPIReference/topics/misc/ProcessRunningInfo.md
JsEtsAPIReference/topics/misc/Projection.md
JsEtsAPIReference/topics/misc/PurgMem.md
JsEtsAPIReference/topics/misc/Push Kit(推送服务).md
JsEtsAPIReference/topics/misc/PushExtensionAbility(推送扩展Ability).md
JsEtsAPIReference/topics/misc/PushExtensionContext(推送扩展Context).md
JsEtsAPIReference/topics/misc/QoS.md
JsEtsAPIReference/topics/misc/RDB.md
JsEtsAPIReference/topics/misc/REST API.md
JsEtsAPIReference/topics/misc/REST API参考.md
JsEtsAPIReference/topics/misc/RawDir.md
JsEtsAPIReference/topics/misc/RawFile64.md
JsEtsAPIReference/topics/misc/RawFileDescriptor.md
JsEtsAPIReference/topics/misc/RawFileDescriptor64.md
JsEtsAPIReference/topics/misc/Rdb_ChangeInfo.md
JsEtsAPIReference/topics/misc/Rdb_DataObserver.md
JsEtsAPIReference/topics/misc/Rdb_DistributedConfig.md
JsEtsAPIReference/topics/misc/Rdb_KeyData.md
JsEtsAPIReference/topics/misc/Rdb_KeyInfo.md
JsEtsAPIReference/topics/misc/Rdb_ProgressDetails.md
JsEtsAPIReference/topics/misc/Rdb_ProgressObserver.md
JsEtsAPIReference/topics/misc/Rdb_Statistic.md
JsEtsAPIReference/topics/misc/Rdb_SubscribeCallback.md
JsEtsAPIReference/topics/misc/Rdb_TableDetails.md
JsEtsAPIReference/topics/misc/ReadStateCode(播报状态).md
JsEtsAPIReference/topics/misc/Reader Kit(阅读服务).md
JsEtsAPIReference/topics/misc/RemoteLocationExtensionAbility(定位扩展Ability).md
JsEtsAPIReference/topics/misc/RemoteLocationExtensionContext(定位扩展Context).md
JsEtsAPIReference/topics/misc/RemoteNotificationExtensionAbility(通知扩展Ability).md
JsEtsAPIReference/topics/misc/RemoteNotificationExtensionContext(通知扩展Context).md
JsEtsAPIReference/topics/misc/RenderNode.md
JsEtsAPIReference/topics/misc/Resource.md
JsEtsAPIReference/topics/misc/ResourceManager_Configuration.md
JsEtsAPIReference/topics/misc/Retrieval.md
JsEtsAPIReference/topics/misc/RotateAnimation.md
JsEtsAPIReference/topics/misc/ScaleAnimation.md
JsEtsAPIReference/topics/misc/Scan_PictureScanProgress.md
JsEtsAPIReference/topics/misc/Scan_ScannerDevice.md
JsEtsAPIReference/topics/misc/Scan_ScannerOptions.md
JsEtsAPIReference/topics/misc/Scenario Fusion Kit(融合场景服务).md
JsEtsAPIReference/topics/misc/Screen Time Guard Kit(屏幕时间守护服务).md
JsEtsAPIReference/topics/misc/ScsiPeripheralDDK.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_BasicSenseInfo.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_CapacityInfo.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_Device.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_DeviceMemMap.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_IORequest.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_InquiryInfo.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_InquiryRequest.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_ReadCapacityRequest.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_Request.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_RequestSenseRequest.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_Response.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_TestUnitReadyRequest.md
JsEtsAPIReference/topics/misc/ScsiPeripheral_VerifyRequest.md
JsEtsAPIReference/topics/misc/SendableContext.md
JsEtsAPIReference/topics/misc/SendableLruCache_K, V_.md
JsEtsAPIReference/topics/misc/SendableResource.md
JsEtsAPIReference/topics/misc/Sensor Service Kit(传感器服务).md
JsEtsAPIReference/topics/misc/Sensor.md
JsEtsAPIReference/topics/misc/Sensor_Event.md
JsEtsAPIReference/topics/misc/Sensor_Info.md
JsEtsAPIReference/topics/misc/Sensor_Subscriber.md
JsEtsAPIReference/topics/misc/Sensor_SubscriptionAttribute.md
JsEtsAPIReference/topics/misc/Sensor_SubscriptionId.md
JsEtsAPIReference/topics/misc/Share Kit(分享服务).md
JsEtsAPIReference/topics/misc/ShellCmdResult.md
JsEtsAPIReference/topics/misc/ShortcutInfo.md
JsEtsAPIReference/topics/misc/Skill.md
JsEtsAPIReference/topics/misc/Spatial Recon Kit(空间建模服务).md
JsEtsAPIReference/topics/misc/SpatialRecon.md
JsEtsAPIReference/topics/misc/SpatialRelationUtil.md
JsEtsAPIReference/topics/misc/Speech Kit(场景化语音服务).md
JsEtsAPIReference/topics/misc/Stage模型能力的接口.md
JsEtsAPIReference/topics/misc/StartAbilityParameter.md
JsEtsAPIReference/topics/misc/StatusBarViewExtensionAbility(状态栏扩展Ability).md
JsEtsAPIReference/topics/misc/SysCap (系统能力).md
JsEtsAPIReference/topics/misc/Test Kit(应用测试服务).md
JsEtsAPIReference/topics/misc/TextReader(朗读控件).md
JsEtsAPIReference/topics/misc/TileOverlay.md
JsEtsAPIReference/topics/misc/TimeArrayTimeZoneRule.md
JsEtsAPIReference/topics/misc/TimeGuardExtensionAbility(屏幕时间守护扩展Ability).md
JsEtsAPIReference/topics/misc/TimeGuardExtensionContext(屏幕时间守护扩展Context).md
JsEtsAPIReference/topics/misc/TimeService.md
JsEtsAPIReference/topics/misc/TimeZoneRuleQuery.md
JsEtsAPIReference/topics/misc/TimeZoneRules.md
JsEtsAPIReference/topics/misc/Timer (定时器).md
JsEtsAPIReference/topics/misc/TraceOverlay.md
JsEtsAPIReference/topics/misc/TransientTask.md
JsEtsAPIReference/topics/misc/TransientTask_DelaySuspendInfo.md
JsEtsAPIReference/topics/misc/TransientTask_TransientTaskInfo.md
JsEtsAPIReference/topics/misc/TranslateAnimation.md
JsEtsAPIReference/topics/misc/TriggerInfo.md
JsEtsAPIReference/topics/misc/Types.md
JsEtsAPIReference/topics/misc/UDMF.md
JsEtsAPIReference/topics/misc/UI Design Kit(UI设计套件).md
JsEtsAPIReference/topics/misc/UIAbilityContext.md
JsEtsAPIReference/topics/misc/UIExtensionContext.md
JsEtsAPIReference/topics/misc/UIServiceExtensionConnectCallback.md
JsEtsAPIReference/topics/misc/UIServiceProxy.md
JsEtsAPIReference/topics/misc/UI界面.md
JsEtsAPIReference/topics/misc/USBSerialDDK.md
JsEtsAPIReference/topics/misc/UsbConfigDescriptor.md
JsEtsAPIReference/topics/misc/UsbControlRequestSetup.md
JsEtsAPIReference/topics/misc/UsbDdk.md
JsEtsAPIReference/topics/misc/UsbDdkConfigDescriptor.md
JsEtsAPIReference/topics/misc/UsbDdkEndpointDescriptor.md
JsEtsAPIReference/topics/misc/UsbDeviceDescriptor.md
JsEtsAPIReference/topics/misc/UsbDeviceMemMap.md
JsEtsAPIReference/topics/misc/UsbEndpointDescriptor.md
JsEtsAPIReference/topics/misc/UsbRequestPipe.md
JsEtsAPIReference/topics/misc/UsbSerial_Device.md
JsEtsAPIReference/topics/misc/UsbSerial_Params.md
JsEtsAPIReference/topics/misc/Usb_DeviceArray.md
JsEtsAPIReference/topics/misc/Vibrator.md
JsEtsAPIReference/topics/misc/Vibrator_Attribute.md
JsEtsAPIReference/topics/misc/Vibrator_FileDescription.md
JsEtsAPIReference/topics/misc/Vision Kit(场景化视觉服务).md
JsEtsAPIReference/topics/misc/VisionBase(Core Vision Kit基类).md
JsEtsAPIReference/topics/misc/VkExternalFormatOHOS.md
JsEtsAPIReference/topics/misc/VkImportNativeBufferInfoOHOS.md
JsEtsAPIReference/topics/misc/VkMemoryGetNativeBufferInfoOHOS.md
JsEtsAPIReference/topics/misc/VkNativeBufferFormatPropertiesOHOS.md
JsEtsAPIReference/topics/misc/VkNativeBufferOHOS.md
JsEtsAPIReference/topics/misc/VkNativeBufferPropertiesOHOS.md
JsEtsAPIReference/topics/misc/VkNativeBufferUsageOHOS.md
JsEtsAPIReference/topics/misc/VkPhysicalDevicePresentationPropertiesOHOS.md
JsEtsAPIReference/topics/misc/VkSurfaceCreateInfoOHOS.md
JsEtsAPIReference/topics/misc/VkSwapchainImageCreateInfoOHOS.md
JsEtsAPIReference/topics/misc/VoIPExtensionAbility(应用内通话消息扩展Ability).md
JsEtsAPIReference/topics/misc/VoIPExtensionContext(应用内通话消息扩展Context).md
JsEtsAPIReference/topics/misc/Vulkan External Memory开发指导.md
JsEtsAPIReference/topics/misc/Vulkan Surface开发指导.md
JsEtsAPIReference/topics/misc/Vulkan.md
JsEtsAPIReference/topics/misc/Vulkan开发指导.md
JsEtsAPIReference/topics/misc/Vulkan开发概述.md
JsEtsAPIReference/topics/misc/Vulkan扩展能力.md
JsEtsAPIReference/topics/misc/Vulkan支持能力.md
JsEtsAPIReference/topics/misc/Wallet Kit(钱包服务).md
JsEtsAPIReference/topics/misc/Want.md
JsEtsAPIReference/topics/misc/WantAgentInfo.md
JsEtsAPIReference/topics/misc/Wear Engine Kit(穿戴服务).md
JsEtsAPIReference/topics/misc/Weather Service Kit(天气服务).md
JsEtsAPIReference/topics/misc/WindowManager.md
JsEtsAPIReference/topics/misc/WindowManager_AvoidArea.md
JsEtsAPIReference/topics/misc/WindowManager_MainWindowInfo.md
JsEtsAPIReference/topics/misc/WindowManager_Rect.md
JsEtsAPIReference/topics/misc/WindowManager_WindowProperties.md
JsEtsAPIReference/topics/misc/WindowManager_WindowSnapshotConfig.md
JsEtsAPIReference/topics/misc/WindowManager(窗口管理).md
JsEtsAPIReference/topics/misc/WorkSchedulerExtensionContext.md
JsEtsAPIReference/topics/misc/XComponentNode.md
JsEtsAPIReference/topics/misc/XEG_AdaptiveVRSCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_AdaptiveVRSDescription.md
JsEtsAPIReference/topics/misc/XEG_DDGICreateInfo.md
JsEtsAPIReference/topics/misc/XEG_DDGIDescription.md
JsEtsAPIReference/topics/misc/XEG_DDGIVolumeEntryParameters.md
JsEtsAPIReference/topics/misc/XEG_ExtensionProperties.md
JsEtsAPIReference/topics/misc/XEG_HPSCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_HPSRadixSort.md
JsEtsAPIReference/topics/misc/XEG_HPSRadixSortDescription.md
JsEtsAPIReference/topics/misc/XEG_NNGICreateInfo.md
JsEtsAPIReference/topics/misc/XEG_NNGIDescription.md
JsEtsAPIReference/topics/misc/XEG_RTAOParameters.md
JsEtsAPIReference/topics/misc/XEG_RTReflectionCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_RTReflectionDescription.md
JsEtsAPIReference/topics/misc/XEG_RTShadowAOCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_RTShadowAODenoiserParameters.md
JsEtsAPIReference/topics/misc/XEG_RTShadowAODescription.md
JsEtsAPIReference/topics/misc/XEG_RTShadowParameters.md
JsEtsAPIReference/topics/misc/XEG_SpatialUpscaleCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_SpatialUpscaleDescription.md
JsEtsAPIReference/topics/misc/XEG_TemporalUpscaleCreateInfo.md
JsEtsAPIReference/topics/misc/XEG_TemporalUpscaleDescription.md
JsEtsAPIReference/topics/misc/XEngine Kit(GPU加速引擎服务).md
JsEtsAPIReference/topics/misc/XEngine.md
JsEtsAPIReference/topics/misc/ability.md
JsEtsAPIReference/topics/misc/ability_access_control.h.md
JsEtsAPIReference/topics/misc/ability_base_common.h.md
JsEtsAPIReference/topics/misc/ability_resource_info.h.md
JsEtsAPIReference/topics/misc/ability_runtime_common.h.md
JsEtsAPIReference/topics/misc/abr_base.h.md
JsEtsAPIReference/topics/misc/abr_gles.h.md
JsEtsAPIReference/topics/misc/aip_error_code.h.md
JsEtsAPIReference/topics/misc/aip_retrieval.h.md
JsEtsAPIReference/topics/misc/aip_retrieval_condition.h.md
JsEtsAPIReference/topics/misc/aip_retrieval_condition_vector.h.md
JsEtsAPIReference/topics/misc/aip_retrieval_query.h.md
JsEtsAPIReference/topics/misc/aip_retrieval_record.h.md
JsEtsAPIReference/topics/misc/animate.md
JsEtsAPIReference/topics/misc/animateMotion.md
JsEtsAPIReference/topics/misc/animateTransform.md
JsEtsAPIReference/topics/misc/app.js.md
JsEtsAPIReference/topics/misc/app.md
JsEtsAPIReference/topics/misc/appInfoManager(应用元数据管理服务).md
JsEtsAPIReference/topics/misc/application.md
JsEtsAPIReference/topics/misc/application_context.h.md
JsEtsAPIReference/topics/misc/arEngine(AR增强现实能力).md
JsEtsAPIReference/topics/misc/arViewController(AR场景管理能力).md
JsEtsAPIReference/topics/misc/ar_engine_core.h.md
JsEtsAPIReference/topics/misc/arkui.md
JsEtsAPIReference/topics/misc/arkweb_error_code.h.md
JsEtsAPIReference/topics/misc/arkweb_interface.h.md
JsEtsAPIReference/topics/misc/arkweb_net_error_list.h.md
JsEtsAPIReference/topics/misc/arkweb_scheme_handler.h.md
JsEtsAPIReference/topics/misc/arkweb_type.h.md
JsEtsAPIReference/topics/misc/assetDownloadManager(资源包下载管理).md
JsEtsAPIReference/topics/misc/atomicService(融合场景化API).md
JsEtsAPIReference/topics/misc/attributionManager(应用归因服务).md
JsEtsAPIReference/topics/misc/attributionTestManager(应用归因接入调试功能).md
JsEtsAPIReference/topics/misc/authentication (华为账号应用统一认证服务).md
JsEtsAPIReference/topics/misc/background_process_manager.h.md
JsEtsAPIReference/topics/misc/badge.md
JsEtsAPIReference/topics/misc/bookParser(书籍解析能力).md
JsEtsAPIReference/topics/misc/bundle.md
JsEtsAPIReference/topics/misc/bundleManager.md
JsEtsAPIReference/topics/misc/bundle_manager_common.h.md
JsEtsAPIReference/topics/misc/button.md
JsEtsAPIReference/topics/misc/c++标准库.md
JsEtsAPIReference/topics/misc/calculateDistance.md
JsEtsAPIReference/topics/misc/calendar.md
JsEtsAPIReference/topics/misc/canvas组件.md
JsEtsAPIReference/topics/misc/chart.md
JsEtsAPIReference/topics/misc/circle.md
JsEtsAPIReference/topics/misc/clock.md
JsEtsAPIReference/topics/misc/cloudCommon (公共模块).md
JsEtsAPIReference/topics/misc/cloudDatabase (云数据库模块).md
JsEtsAPIReference/topics/misc/cloudFunction (云函数模块).md
JsEtsAPIReference/topics/misc/cloudResPrefetch(预加载模块).md
JsEtsAPIReference/topics/misc/cloudStorage (云存储模块).md
JsEtsAPIReference/topics/misc/cloud_disk_error_code.h.md
JsEtsAPIReference/topics/misc/commentManager(应用评论服务).md
JsEtsAPIReference/topics/misc/commonEvent.md
JsEtsAPIReference/topics/misc/commonEventSubscriber.md
JsEtsAPIReference/topics/misc/condition_variable.h.md
JsEtsAPIReference/topics/misc/context.h.md
JsEtsAPIReference/topics/misc/context_constant.h.md
JsEtsAPIReference/topics/misc/continuation.md
JsEtsAPIReference/topics/misc/convertCoordinate.md
JsEtsAPIReference/topics/misc/convertCoordinateSync.md
JsEtsAPIReference/topics/misc/data_asset.h.md
JsEtsAPIReference/topics/misc/data_rdb.md
JsEtsAPIReference/topics/misc/data_type.h.md
JsEtsAPIReference/topics/misc/ddk_api.h.md
JsEtsAPIReference/topics/misc/ddk_types.h.md
JsEtsAPIReference/topics/misc/deferredLink (延迟链接能力).md
JsEtsAPIReference/topics/misc/deviceinfo.h.md
JsEtsAPIReference/topics/misc/dialog.md
JsEtsAPIReference/topics/misc/div.md
JsEtsAPIReference/topics/misc/divider.md
JsEtsAPIReference/topics/misc/drag_and_drop.h.md
JsEtsAPIReference/topics/misc/drawable_descriptor.h.md
JsEtsAPIReference/topics/misc/ellipse.md
JsEtsAPIReference/topics/misc/error_code.h.md
JsEtsAPIReference/topics/misc/errorcode.h.md
JsEtsAPIReference/topics/misc/exerciseSequenceHelper(锻炼记录类型常量).md
JsEtsAPIReference/topics/misc/extendService (华为账号增强服务).md
JsEtsAPIReference/topics/misc/faceComparator(人脸比对).md
JsEtsAPIReference/topics/misc/faceDetector(人脸检测).md
JsEtsAPIReference/topics/misc/fast_ads_segment_map.h.md
JsEtsAPIReference/topics/misc/fast_common_def.h.md
JsEtsAPIReference/topics/misc/fast_solver_rect_partition.h.md
JsEtsAPIReference/topics/misc/ffrt_cond_t.md
JsEtsAPIReference/topics/misc/ffrt_condattr_t.md
JsEtsAPIReference/topics/misc/ffrt_dependence_t.md
JsEtsAPIReference/topics/misc/ffrt_deps_t.md
JsEtsAPIReference/topics/misc/ffrt_fiber_t.md
JsEtsAPIReference/topics/misc/ffrt_function_header_t.md
JsEtsAPIReference/topics/misc/ffrt_loop_t.md
JsEtsAPIReference/topics/misc/ffrt_mutex_t.md
JsEtsAPIReference/topics/misc/ffrt_mutexattr_t.md
JsEtsAPIReference/topics/misc/ffrt_queue_attr_t.md
JsEtsAPIReference/topics/misc/ffrt_queue_t.md
JsEtsAPIReference/topics/misc/ffrt_rwlock_t.md
JsEtsAPIReference/topics/misc/ffrt_rwlockattr_t.md
JsEtsAPIReference/topics/misc/ffrt_task_attr_t.md
JsEtsAPIReference/topics/misc/ffrt_task_handle_t.md
JsEtsAPIReference/topics/misc/fiber.h.md
JsEtsAPIReference/topics/misc/fileManagerService.md
JsEtsAPIReference/topics/misc/filePreview(文件预览).md
JsEtsAPIReference/topics/misc/fileShare.md
JsEtsAPIReference/topics/misc/fileUri.md
JsEtsAPIReference/topics/misc/fileUriService(文件路径转换API).md
JsEtsAPIReference/topics/misc/file_cache_boost.h.md
JsEtsAPIReference/topics/misc/form.md
JsEtsAPIReference/topics/misc/format.h.md
JsEtsAPIReference/topics/misc/frame_generation_base.h.md
JsEtsAPIReference/topics/misc/frame_generation_gles.h.md
JsEtsAPIReference/topics/misc/frame_generation_vk.h.md
JsEtsAPIReference/topics/misc/gameNearbyTransfer(游戏近场快传).md
JsEtsAPIReference/topics/misc/gamePerformance (游戏场景感知).md
JsEtsAPIReference/topics/misc/gamePlayer(基础游戏服务).md
JsEtsAPIReference/topics/misc/game_controller_type.h.md
JsEtsAPIReference/topics/misc/game_device.h.md
JsEtsAPIReference/topics/misc/game_device_event.h.md
JsEtsAPIReference/topics/misc/game_pad.h.md
JsEtsAPIReference/topics/misc/game_pad_event.h.md
JsEtsAPIReference/topics/misc/game_performance.h.md
JsEtsAPIReference/topics/misc/getContext.md
JsEtsAPIReference/topics/misc/global.md
JsEtsAPIReference/topics/misc/grid-col.md
JsEtsAPIReference/topics/misc/grid-container.md
JsEtsAPIReference/topics/misc/grid-row.md
JsEtsAPIReference/topics/misc/harmonyShare(华为分享).md
JsEtsAPIReference/topics/misc/hdsDrawable.md
JsEtsAPIReference/topics/misc/hdsEffect.md
JsEtsAPIReference/topics/misc/hdsMaterial.md
JsEtsAPIReference/topics/misc/healthDataTypes(运动健康数据类型常量).md
JsEtsAPIReference/topics/misc/healthFields(运动健康数据字段).md
JsEtsAPIReference/topics/misc/healthModels(运动健康数据模型).md
JsEtsAPIReference/topics/misc/healthSequenceHelper(健康记录类型常量).md
JsEtsAPIReference/topics/misc/healthService(运动健康联动服务).md
JsEtsAPIReference/topics/misc/healthStore(运动健康数据服务).md
JsEtsAPIReference/topics/misc/hiai_aipp_param.h.md
JsEtsAPIReference/topics/misc/hiai_helper.h.md
JsEtsAPIReference/topics/misc/hiai_options.h.md
JsEtsAPIReference/topics/misc/hiai_single_op.h.md
JsEtsAPIReference/topics/misc/hiai_tensor.h.md
JsEtsAPIReference/topics/misc/hiappevent.h.md
JsEtsAPIReference/topics/misc/hiappevent_cfg.h.md
JsEtsAPIReference/topics/misc/hiappevent_event.h.md
JsEtsAPIReference/topics/misc/hiappevent_param.h.md
JsEtsAPIReference/topics/misc/hicollie.h.md
JsEtsAPIReference/topics/misc/hid_ddk_api.h.md
JsEtsAPIReference/topics/misc/hid_ddk_types.h.md
JsEtsAPIReference/topics/misc/hidebug.h.md
JsEtsAPIReference/topics/misc/hidebug_type.h.md
JsEtsAPIReference/topics/misc/i18n.md
JsEtsAPIReference/topics/misc/image-animator.md
JsEtsAPIReference/topics/misc/image.md
JsEtsAPIReference/topics/misc/imageFeaturePicker (全局取色功能).md
JsEtsAPIReference/topics/misc/input.md
JsEtsAPIReference/topics/misc/inputmethod_attach_options_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_controller_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_cursor_info_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_inputmethod_proxy_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_private_command_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_text_avoid_info_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_text_config_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_text_editor_proxy_capi.h.md
JsEtsAPIReference/topics/misc/inputmethod_types_capi.h.md
JsEtsAPIReference/topics/misc/insightIntent.md
JsEtsAPIReference/topics/misc/interactiveLiveness(人脸活体检测).md
JsEtsAPIReference/topics/misc/invoiceAssistant (华为账号发票助手服务).md
JsEtsAPIReference/topics/misc/ipc_cparcel.h.md
JsEtsAPIReference/topics/misc/ipc_cremote_object.h.md
JsEtsAPIReference/topics/misc/ipc_cskeleton.h.md
JsEtsAPIReference/topics/misc/ipc_error_code.h.md
JsEtsAPIReference/topics/misc/ipc_kit.h.md
JsEtsAPIReference/topics/misc/jsonObject(实体的其他字段).md
JsEtsAPIReference/topics/misc/jsvm.h.md
JsEtsAPIReference/topics/misc/jsvm_types.h.md
JsEtsAPIReference/topics/misc/js标签配置.md
JsEtsAPIReference/topics/misc/knowledgeProcessor(知识加工).md
JsEtsAPIReference/topics/misc/label.md
JsEtsAPIReference/topics/misc/launchAcceleration(游戏启动加速).md
JsEtsAPIReference/topics/misc/libc标准库.md
JsEtsAPIReference/topics/misc/libuv.md
JsEtsAPIReference/topics/misc/line.md
JsEtsAPIReference/topics/misc/list-item-group.md
JsEtsAPIReference/topics/misc/list-item.md
JsEtsAPIReference/topics/misc/list.md
JsEtsAPIReference/topics/misc/liveViewManager.md
JsEtsAPIReference/topics/misc/loadNativeModule (同步动态加载系统库接口).md
JsEtsAPIReference/topics/misc/localChatModel(端侧问答模型).md
JsEtsAPIReference/topics/misc/log.h.md
JsEtsAPIReference/topics/misc/loop.h.md
JsEtsAPIReference/topics/misc/mapCommon(地图属性模型).md
JsEtsAPIReference/topics/misc/map(地图显示功能).md
JsEtsAPIReference/topics/misc/marquee.md
JsEtsAPIReference/topics/misc/memory.md
JsEtsAPIReference/topics/misc/menu.md
JsEtsAPIReference/topics/misc/minorsProtection (华为账号未成年人模式).md
JsEtsAPIReference/topics/misc/model.h.md
JsEtsAPIReference/topics/misc/moduleInstallManager (产品特性按需分发).md
JsEtsAPIReference/topics/misc/module_install.h.md
JsEtsAPIReference/topics/misc/mutex.h.md
JsEtsAPIReference/topics/misc/native_animate.h.md
JsEtsAPIReference/topics/misc/native_child_process.h.md
JsEtsAPIReference/topics/misc/native_dialog.h.md
JsEtsAPIReference/topics/misc/native_gcp_api.h.md
JsEtsAPIReference/topics/misc/native_gesture.h.md
JsEtsAPIReference/topics/misc/native_handwrite_api.h.md
JsEtsAPIReference/topics/misc/native_interface.h.md
JsEtsAPIReference/topics/misc/native_interface_accessibility.h.md
JsEtsAPIReference/topics/misc/native_interface_arkweb.h.md
JsEtsAPIReference/topics/misc/native_interface_bundle.h.md
JsEtsAPIReference/topics/misc/native_interface_focus.h.md
JsEtsAPIReference/topics/misc/native_interface_xcomponent.h.md
JsEtsAPIReference/topics/misc/native_key_event.h.md
JsEtsAPIReference/topics/misc/native_node.h.md
JsEtsAPIReference/topics/misc/native_node_napi.h.md
JsEtsAPIReference/topics/misc/native_render.h.md
JsEtsAPIReference/topics/misc/native_type.h.md
JsEtsAPIReference/topics/misc/native_xcomponent_key_event.h.md
JsEtsAPIReference/topics/misc/naviTurnMode.md
JsEtsAPIReference/topics/misc/navigationInfoMgr(导航信息管理).md
JsEtsAPIReference/topics/misc/navi(路径规划).md
JsEtsAPIReference/topics/misc/neural_network_core.h.md
JsEtsAPIReference/topics/misc/neural_network_runtime.h.md
JsEtsAPIReference/topics/misc/neural_network_runtime_type.h.md
JsEtsAPIReference/topics/misc/newCameraPosition.md
JsEtsAPIReference/topics/misc/newLatLng.md
JsEtsAPIReference/topics/misc/newLatLngBounds.md
JsEtsAPIReference/topics/misc/notification.h.md
JsEtsAPIReference/topics/misc/notification.md
JsEtsAPIReference/topics/misc/numberIdentify (号码识别查询基本能力).md
JsEtsAPIReference/topics/misc/objectDetection(多目标识别).md
JsEtsAPIReference/topics/misc/oh_cloud_disk_manager.h.md
JsEtsAPIReference/topics/misc/oh_commonevent.h.md
JsEtsAPIReference/topics/misc/oh_commonevent_support.h.md
JsEtsAPIReference/topics/misc/oh_cursor.h.md
JsEtsAPIReference/topics/misc/oh_data_value.h.md
JsEtsAPIReference/topics/misc/oh_data_values.h.md
JsEtsAPIReference/topics/misc/oh_data_values_buckets.h.md
JsEtsAPIReference/topics/misc/oh_display_capture.h.md
JsEtsAPIReference/topics/misc/oh_display_info.h.md
JsEtsAPIReference/topics/misc/oh_display_manager.h.md
JsEtsAPIReference/topics/misc/oh_environment.h.md
JsEtsAPIReference/topics/misc/oh_file_share.h.md
JsEtsAPIReference/topics/misc/oh_file_uri.h.md
JsEtsAPIReference/topics/misc/oh_fileio.h.md
JsEtsAPIReference/topics/misc/oh_location.h.md
JsEtsAPIReference/topics/misc/oh_location_type.h.md
JsEtsAPIReference/topics/misc/oh_pasteboard.h.md
JsEtsAPIReference/topics/misc/oh_pasteboard_err_code.h.md
JsEtsAPIReference/topics/misc/oh_predicates.h.md
JsEtsAPIReference/topics/misc/oh_preferences.h.md
JsEtsAPIReference/topics/misc/oh_preferences_err_code.h.md
JsEtsAPIReference/topics/misc/oh_preferences_option.h.md
JsEtsAPIReference/topics/misc/oh_preferences_value.h.md
JsEtsAPIReference/topics/misc/oh_rdb_crypto_param.h.md
JsEtsAPIReference/topics/misc/oh_rdb_transaction.h.md
JsEtsAPIReference/topics/misc/oh_rdb_types.h.md
JsEtsAPIReference/topics/misc/oh_sensor.h.md
JsEtsAPIReference/topics/misc/oh_sensor_type.h.md
JsEtsAPIReference/topics/misc/oh_value_object.h.md
JsEtsAPIReference/topics/misc/oh_values_bucket.h.md
JsEtsAPIReference/topics/misc/oh_window.h.md
JsEtsAPIReference/topics/misc/oh_window_comm.h.md
JsEtsAPIReference/topics/misc/oh_window_event_filter.h.md
JsEtsAPIReference/topics/misc/oh_window_pip.h.md
JsEtsAPIReference/topics/misc/ohbattery_info.h.md
JsEtsAPIReference/topics/misc/ohprint.h.md
JsEtsAPIReference/topics/misc/ohresmgr.h.md
JsEtsAPIReference/topics/misc/ohscan.h.md
JsEtsAPIReference/topics/misc/openFileBoost(文件打开加速).md
JsEtsAPIReference/topics/misc/open_file_boost.h.md
JsEtsAPIReference/topics/misc/opengtx_base.h.md
JsEtsAPIReference/topics/misc/option.md
JsEtsAPIReference/topics/misc/os_account.h.md
JsEtsAPIReference/topics/misc/os_account_common.h.md
JsEtsAPIReference/topics/misc/panel.md
JsEtsAPIReference/topics/misc/path.md
JsEtsAPIReference/topics/misc/pdfService(PDF服务).md
JsEtsAPIReference/topics/misc/pdfViewManager(PDF预览).md
JsEtsAPIReference/topics/misc/petalMaps(拉起地图应用).md
JsEtsAPIReference/topics/misc/picker-view.md
JsEtsAPIReference/topics/misc/picker.md
JsEtsAPIReference/topics/misc/piece.md
JsEtsAPIReference/topics/misc/polygon.md
JsEtsAPIReference/topics/misc/polyline.md
JsEtsAPIReference/topics/misc/popup.md
JsEtsAPIReference/topics/misc/postCardAction.md
JsEtsAPIReference/topics/misc/preview_kit.h.md
JsEtsAPIReference/topics/misc/privacyManager(隐私管理服务).md
JsEtsAPIReference/topics/misc/productViewManager (应用市场推荐).md
JsEtsAPIReference/topics/misc/progress.md
JsEtsAPIReference/topics/misc/purgeable_memory.h.md
JsEtsAPIReference/topics/misc/pushCommon(推送服务公共信息).md
JsEtsAPIReference/topics/misc/pushService(推送服务基础能力).md
JsEtsAPIReference/topics/misc/qos.h.md
JsEtsAPIReference/topics/misc/qrcode.md
JsEtsAPIReference/topics/misc/queue.h.md
JsEtsAPIReference/topics/misc/quickBarManager(快捷栏管理服务).md
JsEtsAPIReference/topics/misc/rag(检索增强生成).md
JsEtsAPIReference/topics/misc/rating.md
JsEtsAPIReference/topics/misc/raw_dir.h.md
JsEtsAPIReference/topics/misc/raw_file.h.md
JsEtsAPIReference/topics/misc/raw_file_manager.h.md
JsEtsAPIReference/topics/misc/rawfile.md
JsEtsAPIReference/topics/misc/readerCore(阅读核心能力).md
JsEtsAPIReference/topics/misc/realName (华为账号实名认证服务).md
JsEtsAPIReference/topics/misc/rect.md
JsEtsAPIReference/topics/misc/rectifyCoordinate.md
JsEtsAPIReference/topics/misc/refresh.md
JsEtsAPIReference/topics/misc/relational_store.h.md
JsEtsAPIReference/topics/misc/relational_store_error_code.h.md
JsEtsAPIReference/topics/misc/resmgr_common.h.md
JsEtsAPIReference/topics/misc/resourcemanager.md
JsEtsAPIReference/topics/misc/resultSet (结果集).md
JsEtsAPIReference/topics/misc/retrieval(智慧化数据平台).md
JsEtsAPIReference/topics/misc/richtext.md
JsEtsAPIReference/topics/misc/samplePointHelper(采样数据类型常量).md
JsEtsAPIReference/topics/misc/sceneManager (生态查询服务).md
JsEtsAPIReference/topics/misc/sceneMap(场景化控件).md
JsEtsAPIReference/topics/misc/scrollBy.md
JsEtsAPIReference/topics/misc/scsi_peripheral_api.h.md
JsEtsAPIReference/topics/misc/scsi_peripheral_types.h.md
JsEtsAPIReference/topics/misc/search.md
JsEtsAPIReference/topics/misc/security.md
JsEtsAPIReference/topics/misc/select.md
JsEtsAPIReference/topics/misc/serviceNotification(服务通知).md
JsEtsAPIReference/topics/misc/shared_mutex.h.md
JsEtsAPIReference/topics/misc/shippingAddress (华为账号收货地址管理服务).md
JsEtsAPIReference/topics/misc/site(地点搜索).md
JsEtsAPIReference/topics/misc/skeletonDetection(骨骼点检测).md
JsEtsAPIReference/topics/misc/sleep.h.md
JsEtsAPIReference/topics/misc/slider.md
JsEtsAPIReference/topics/misc/slot插槽.md
JsEtsAPIReference/topics/misc/smartMobilityCommon(智慧出行场景).md
JsEtsAPIReference/topics/misc/spaceDataTransfer (空间数据传输).md
JsEtsAPIReference/topics/misc/spaceManager (空间管理).md
JsEtsAPIReference/topics/misc/span.md
JsEtsAPIReference/topics/misc/spatialRender.md
JsEtsAPIReference/topics/misc/spatial_recon_interface.h.md
JsEtsAPIReference/topics/misc/speechRecognizer(语音识别).md
JsEtsAPIReference/topics/misc/stack.md
JsEtsAPIReference/topics/misc/start_options.h.md
JsEtsAPIReference/topics/misc/staticMap(静态图).md
JsEtsAPIReference/topics/misc/status.h.md
JsEtsAPIReference/topics/misc/statusBarManager(状态栏管理服务).md
JsEtsAPIReference/topics/misc/stepper-item.md
JsEtsAPIReference/topics/misc/stepper.md
JsEtsAPIReference/topics/misc/styled_string.h.md
JsEtsAPIReference/topics/misc/stylusInteraction (手写笔交互功能).md
JsEtsAPIReference/topics/misc/subjectSegmentation(主体分割).md
JsEtsAPIReference/topics/misc/svg.md
JsEtsAPIReference/topics/misc/svg组件.md
JsEtsAPIReference/topics/misc/swiper.md
JsEtsAPIReference/topics/misc/switch.md
JsEtsAPIReference/topics/misc/symbolRegister.md
JsEtsAPIReference/topics/misc/syscap_ndk.h.md
JsEtsAPIReference/topics/misc/systemShare(分享).md
JsEtsAPIReference/topics/misc/tab-bar.md
JsEtsAPIReference/topics/misc/tab-content.md
JsEtsAPIReference/topics/misc/tabs.md
JsEtsAPIReference/topics/misc/task.h.md
JsEtsAPIReference/topics/misc/tensor.h.md
JsEtsAPIReference/topics/misc/text.md
JsEtsAPIReference/topics/misc/textPath.md
JsEtsAPIReference/topics/misc/textProcessing(文本处理).md
JsEtsAPIReference/topics/misc/textRecognition(文字识别).md
JsEtsAPIReference/topics/misc/textToSpeech(文本转语音).md
JsEtsAPIReference/topics/misc/textarea.md
JsEtsAPIReference/topics/misc/time_service.h.md
JsEtsAPIReference/topics/misc/timer.h.md
JsEtsAPIReference/topics/misc/timezone.h.md
JsEtsAPIReference/topics/misc/toggle.md
JsEtsAPIReference/topics/misc/toolbar-item.md
JsEtsAPIReference/topics/misc/toolbar.md
JsEtsAPIReference/topics/misc/trace.h.md
JsEtsAPIReference/topics/misc/trafficLane.md
JsEtsAPIReference/topics/misc/transient_task_api.h.md
JsEtsAPIReference/topics/misc/transient_task_type.h.md
JsEtsAPIReference/topics/misc/tspan.md
JsEtsAPIReference/topics/misc/type_def.h.md
JsEtsAPIReference/topics/misc/types.h.md
JsEtsAPIReference/topics/misc/udmf.h.md
JsEtsAPIReference/topics/misc/udmf_err_code.h.md
JsEtsAPIReference/topics/misc/udmf_meta.h.md
JsEtsAPIReference/topics/misc/uds.h.md
JsEtsAPIReference/topics/misc/ui_input_event.h.md
JsEtsAPIReference/topics/misc/updateManager(更新功能).md
JsEtsAPIReference/topics/misc/usb_ddk_api.h.md
JsEtsAPIReference/topics/misc/usb_ddk_types.h.md
JsEtsAPIReference/topics/misc/usb_serial_api.h.md
JsEtsAPIReference/topics/misc/usb_serial_types.h.md
JsEtsAPIReference/topics/misc/utd.h.md
JsEtsAPIReference/topics/misc/vibrator.h.md
JsEtsAPIReference/topics/misc/vibrator_type.h.md
JsEtsAPIReference/topics/misc/visionImageAnalyzer(AI识图控件).md
JsEtsAPIReference/topics/misc/voipCall (应用内通话管理).md
JsEtsAPIReference/topics/misc/vulkan_ohos.h.md
JsEtsAPIReference/topics/misc/walletPass(Pass卡片能力).md
JsEtsAPIReference/topics/misc/walletTransitCard(交通卡能力).md
JsEtsAPIReference/topics/misc/want.h.md
JsEtsAPIReference/topics/misc/wantAgent.md
JsEtsAPIReference/topics/misc/wearEngine(穿戴设备能力开放).md
JsEtsAPIReference/topics/misc/weatherService(天气数据服务).md
JsEtsAPIReference/topics/misc/web.md
JsEtsAPIReference/topics/misc/wordTag(词性).md
JsEtsAPIReference/topics/misc/xcomponent.md
JsEtsAPIReference/topics/misc/xeg_extension_defs.h.md
JsEtsAPIReference/topics/misc/xeg_gles_adaptive_vrs.h.md
JsEtsAPIReference/topics/misc/xeg_gles_extension.h.md
JsEtsAPIReference/topics/misc/xeg_gles_neural_upscale.h.md
JsEtsAPIReference/topics/misc/xeg_gles_spatial_upscale.h.md
JsEtsAPIReference/topics/misc/xeg_gles_temporal_upscale.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_adaptive_vrs.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_common.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_extension.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_hps.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_rt_reflection.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_rt_visible_mask.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_rtgi.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_spatial_upscale.h.md
JsEtsAPIReference/topics/misc/xeg_vulkan_temporal_upscale.h.md
JsEtsAPIReference/topics/misc/zlib.md
JsEtsAPIReference/topics/misc/zoomBy.md
JsEtsAPIReference/topics/misc/zoomIn.md
JsEtsAPIReference/topics/misc/zoomOut.md
JsEtsAPIReference/topics/misc/zoomTo.md
JsEtsAPIReference/topics/misc/一键登录获取华为账号绑定号码和UnionID_OpenID.md
JsEtsAPIReference/topics/misc/一键登录获取华为账号绑定号码和UnionID_OpenID(不推荐).md
JsEtsAPIReference/topics/misc/事件.md
JsEtsAPIReference/topics/misc/事件撤销.md
JsEtsAPIReference/topics/misc/公共基础能力.md
JsEtsAPIReference/topics/misc/公共接口.md
JsEtsAPIReference/topics/misc/公共说明.md
JsEtsAPIReference/topics/misc/其他.md
JsEtsAPIReference/topics/misc/兼容JS的类Web开发范式(ArkUI.Full).md
JsEtsAPIReference/topics/misc/兼容JS的类Web开发范式(ArkUI.Lite).md
JsEtsAPIReference/topics/misc/刷新用户级凭证.md
JsEtsAPIReference/topics/misc/功能介绍.md
JsEtsAPIReference/topics/misc/动态创建组件.md
JsEtsAPIReference/topics/misc/动画样式.md
JsEtsAPIReference/topics/misc/原子布局.md
JsEtsAPIReference/topics/misc/取消用户级凭证授权.md
JsEtsAPIReference/topics/misc/响应参数.md
JsEtsAPIReference/topics/misc/图形.md
JsEtsAPIReference/topics/misc/图标格式说明.md
JsEtsAPIReference/topics/misc/图片风控.md
JsEtsAPIReference/topics/misc/场景化消息.md
JsEtsAPIReference/topics/misc/城市码及区划代码表.md
JsEtsAPIReference/topics/misc/基本概念.md
JsEtsAPIReference/topics/misc/基础功能.md
JsEtsAPIReference/topics/misc/基础组件.md
JsEtsAPIReference/topics/misc/多语言支持.md
JsEtsAPIReference/topics/misc/头文件.md
JsEtsAPIReference/topics/misc/实名信息校验.md
JsEtsAPIReference/topics/misc/实名认证.md
JsEtsAPIReference/topics/misc/容器组件.md
JsEtsAPIReference/topics/misc/屏幕管理.md
JsEtsAPIReference/topics/misc/属性.md
JsEtsAPIReference/topics/misc/已停止维护的接口.md
JsEtsAPIReference/topics/misc/应用服务.md
JsEtsAPIReference/topics/misc/应用框架.md
JsEtsAPIReference/topics/misc/开放接口调用凭证.md
JsEtsAPIReference/topics/misc/归因结果回传.md
JsEtsAPIReference/topics/misc/意图共享.md
JsEtsAPIReference/topics/misc/扩展能力.md
JsEtsAPIReference/topics/misc/批量转换teamPlayerId.md
JsEtsAPIReference/topics/misc/接口依赖的元素及定义.md
JsEtsAPIReference/topics/misc/数字车钥匙接口.md
JsEtsAPIReference/topics/misc/数据传递与处理.md
JsEtsAPIReference/topics/misc/数据文件处理.md
JsEtsAPIReference/topics/misc/数据类型说明.md
JsEtsAPIReference/topics/misc/文件组织.md
JsEtsAPIReference/topics/misc/无障碍.md
JsEtsAPIReference/topics/misc/服务动态.md
JsEtsAPIReference/topics/misc/服务动态参数说明.md
JsEtsAPIReference/topics/misc/服务动态推送接口.md
JsEtsAPIReference/topics/misc/服务通知.md
JsEtsAPIReference/topics/misc/栅格组件.md
JsEtsAPIReference/topics/misc/标准库.md
JsEtsAPIReference/topics/misc/框架说明.md
JsEtsAPIReference/topics/misc/概述.md
JsEtsAPIReference/topics/misc/模块.md
JsEtsAPIReference/topics/misc/模块描述.md
JsEtsAPIReference/topics/misc/消息回执.md
JsEtsAPIReference/topics/misc/消息撤回.md
JsEtsAPIReference/topics/misc/消息频控.md
JsEtsAPIReference/topics/misc/渐变样式.md
JsEtsAPIReference/topics/misc/版本兼容适配.md
JsEtsAPIReference/topics/misc/生命周期.md
JsEtsAPIReference/topics/misc/生命周期定义.md
JsEtsAPIReference/topics/misc/画布组件.md
JsEtsAPIReference/topics/misc/硬件.md
JsEtsAPIReference/topics/misc/窗口管理.md
JsEtsAPIReference/topics/misc/系统.md
JsEtsAPIReference/topics/misc/系统公共事件定义(待停用).md
JsEtsAPIReference/topics/misc/系统定义的公共事件.md
JsEtsAPIReference/topics/misc/组件描述.md
JsEtsAPIReference/topics/misc/组件通用信息.md
JsEtsAPIReference/topics/misc/继承样式.md
JsEtsAPIReference/topics/misc/自定义字体样式.md
JsEtsAPIReference/topics/misc/自定义组件.md
JsEtsAPIReference/topics/misc/自定义组件使用说明.md
JsEtsAPIReference/topics/misc/自定义组件的基本用法.md
JsEtsAPIReference/topics/misc/获取OpenID Connect配置公开信息.md
JsEtsAPIReference/topics/misc/获取华为账号用户信息-获取头像昵称.md
JsEtsAPIReference/topics/misc/获取华为账号用户信息-获取手机号.md
JsEtsAPIReference/topics/misc/获取实名信息.md
JsEtsAPIReference/topics/misc/获取应用级凭证.md
JsEtsAPIReference/topics/misc/获取玩家标识.md
JsEtsAPIReference/topics/misc/获取用户信息.md
JsEtsAPIReference/topics/misc/获取用户级凭证.md
JsEtsAPIReference/topics/misc/获取用户风险等级.md
JsEtsAPIReference/topics/misc/获取验证ID Token的JWT公钥信息.md
JsEtsAPIReference/topics/misc/解析凭证.md
JsEtsAPIReference/topics/misc/解绑账号.md
JsEtsAPIReference/topics/misc/解绑账号通知.md
JsEtsAPIReference/topics/misc/设备管理.md
JsEtsAPIReference/topics/misc/设置主题样式.md
JsEtsAPIReference/topics/misc/语法.md
JsEtsAPIReference/topics/misc/请求体参数说明.md
JsEtsAPIReference/topics/misc/请求体结构说明.md
JsEtsAPIReference/topics/misc/请求示例.md
JsEtsAPIReference/topics/misc/调测调优.md
JsEtsAPIReference/topics/misc/账号管理.md
JsEtsAPIReference/topics/misc/路径规划支持的国家_地区.md
JsEtsAPIReference/topics/misc/转场样式.md
JsEtsAPIReference/topics/misc/转换ID.md
JsEtsAPIReference/topics/misc/运动健康数据类型常量及模型定义.md
JsEtsAPIReference/topics/misc/进程线程通信.md
JsEtsAPIReference/topics/misc/通用事件.md
JsEtsAPIReference/topics/misc/通用属性.md
JsEtsAPIReference/topics/misc/通用方法.md
JsEtsAPIReference/topics/misc/通用样式.md
JsEtsAPIReference/topics/misc/通用能力的接口(推荐).md
JsEtsAPIReference/topics/misc/通过Authorization Code获取GroupUnionID.md
JsEtsAPIReference/topics/misc/通过OpenID或UnionID获取GroupUnionID.md
JsEtsAPIReference/topics/misc/通过OpenID获取UnionID.md
JsEtsAPIReference/topics/misc/附录.md
JsEtsAPIReference/topics/misc/验证ID Token有效性.md
JsEtsAPIReference/topics/networking/ArkTS API.md
JsEtsAPIReference/topics/networking/ArkTS API参考.md
JsEtsAPIReference/topics/networking/ArkTS 组件.md
JsEtsAPIReference/topics/networking/Bluetooth.md
JsEtsAPIReference/topics/networking/C API.md
JsEtsAPIReference/topics/networking/CollaborationCamera (跨设备互通组件).md
JsEtsAPIReference/topics/networking/CollaborationDevicePicker (流转控件).md
JsEtsAPIReference/topics/networking/CollaborationService (跨设备互通组件).md
JsEtsAPIReference/topics/networking/Connectivity Kit(短距通信服务).md
JsEtsAPIReference/topics/networking/DeviceManager.md
JsEtsAPIReference/topics/networking/Distributed Service Kit(分布式管理服务).md
JsEtsAPIReference/topics/networking/HMS_NetworkBoost_HandoverCallback.md
JsEtsAPIReference/topics/networking/Http_Buffer.md
JsEtsAPIReference/topics/networking/Http_ClientCert.md
JsEtsAPIReference/topics/networking/Http_CustomProxy.md
JsEtsAPIReference/topics/networking/Http_EventsHandler.md
JsEtsAPIReference/topics/networking/Http_HeaderEntry.md
JsEtsAPIReference/topics/networking/Http_HeaderValue.md
JsEtsAPIReference/topics/networking/Http_Headers.md
JsEtsAPIReference/topics/networking/Http_PerformanceTiming.md
JsEtsAPIReference/topics/networking/Http_Proxy.md
JsEtsAPIReference/topics/networking/Http_Request.md
JsEtsAPIReference/topics/networking/Http_RequestOptions.md
JsEtsAPIReference/topics/networking/Http_Response.md
JsEtsAPIReference/topics/networking/NearLink Kit(星闪服务).md
JsEtsAPIReference/topics/networking/NetConn_ConnectionProperties.md
JsEtsAPIReference/topics/networking/NetConn_HttpProxy.md
JsEtsAPIReference/topics/networking/NetConn_NetAddr.md
JsEtsAPIReference/topics/networking/NetConn_NetCapabilities.md
JsEtsAPIReference/topics/networking/NetConn_NetConnCallback.md
JsEtsAPIReference/topics/networking/NetConn_NetHandle.md
JsEtsAPIReference/topics/networking/NetConn_NetHandleList.md
JsEtsAPIReference/topics/networking/NetConn_NetSpecifier.md
JsEtsAPIReference/topics/networking/NetConn_ProbeResultInfo.md
JsEtsAPIReference/topics/networking/NetConn_Route.md
JsEtsAPIReference/topics/networking/NetConn_TraceRouteInfo.md
JsEtsAPIReference/topics/networking/NetConn_TraceRouteOption.md
JsEtsAPIReference/topics/networking/NetConnection.md
JsEtsAPIReference/topics/networking/NetStack_CertBlob.md
JsEtsAPIReference/topics/networking/NetStack_CertificatePinning.md
JsEtsAPIReference/topics/networking/NetStack_Certificates.md
JsEtsAPIReference/topics/networking/Netstack.md
JsEtsAPIReference/topics/networking/Network Boost Kit(网络加速服务).md
JsEtsAPIReference/topics/networking/Network Kit(网络服务).md
JsEtsAPIReference/topics/networking/NetworkBoost.md
JsEtsAPIReference/topics/networking/NetworkBoost_DataSpeedAction.md
JsEtsAPIReference/topics/networking/NetworkBoost_HandoverComplete.md
JsEtsAPIReference/topics/networking/NetworkBoost_HandoverStart.md
JsEtsAPIReference/topics/networking/NetworkBoost_MultiPathQuota.md
JsEtsAPIReference/topics/networking/NetworkBoost_MultiPathQuotaInfo.md
JsEtsAPIReference/topics/networking/NetworkBoost_MultiPathRecommendation.md
JsEtsAPIReference/topics/networking/NetworkBoost_MultiPathRequestResult.md
JsEtsAPIReference/topics/networking/NetworkBoost_MultiPathStateChange.md
JsEtsAPIReference/topics/networking/NetworkBoost_NetHandle.md
JsEtsAPIReference/topics/networking/NetworkBoost_NetworkQos.md
JsEtsAPIReference/topics/networking/NetworkBoost_NetworkQosArray.md
JsEtsAPIReference/topics/networking/NetworkBoost_NetworkScene.md
JsEtsAPIReference/topics/networking/NetworkBoost_SceneDesc.md
JsEtsAPIReference/topics/networking/NetworkBoost_WeakSignalPrediction.md
JsEtsAPIReference/topics/networking/Rcp_Buffer.md
JsEtsAPIReference/topics/networking/Rcp_CertificateAuthority.md
JsEtsAPIReference/topics/networking/Rcp_ClientCertificate.md
JsEtsAPIReference/topics/networking/Rcp_Configuration.md
JsEtsAPIReference/topics/networking/Rcp_ConnectionConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_ContentOrPathOrCallback.md
JsEtsAPIReference/topics/networking/Rcp_CookieAttributeEntry.md
JsEtsAPIReference/topics/networking/Rcp_Credential.md
JsEtsAPIReference/topics/networking/Rcp_DebugInfo.md
JsEtsAPIReference/topics/networking/Rcp_DnsConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_DnsOverHttps.md
JsEtsAPIReference/topics/networking/Rcp_DnsRule.md
JsEtsAPIReference/topics/networking/Rcp_DnsServers.md
JsEtsAPIReference/topics/networking/Rcp_EventsHandler.md
JsEtsAPIReference/topics/networking/Rcp_Exclusions.md
JsEtsAPIReference/topics/networking/Rcp_FormFieldFileValue.md
JsEtsAPIReference/topics/networking/Rcp_FormFieldValue.md
JsEtsAPIReference/topics/networking/Rcp_HeaderEntry.md
JsEtsAPIReference/topics/networking/Rcp_HeaderValue.md
JsEtsAPIReference/topics/networking/Rcp_InfoToCollect.md
JsEtsAPIReference/topics/networking/Rcp_Interceptor.md
JsEtsAPIReference/topics/networking/Rcp_InterceptorArray.md
JsEtsAPIReference/topics/networking/Rcp_IpAddress.md
JsEtsAPIReference/topics/networking/Rcp_IpAndPort.md
JsEtsAPIReference/topics/networking/Rcp_MultipartFormFieldValue.md
JsEtsAPIReference/topics/networking/Rcp_OnBinaryReceiveCallback.md
JsEtsAPIReference/topics/networking/Rcp_OnDataReceiveCallback.md
JsEtsAPIReference/topics/networking/Rcp_OnHeaderReceiveCallback.md
JsEtsAPIReference/topics/networking/Rcp_OnProgressCallback.md
JsEtsAPIReference/topics/networking/Rcp_OnStatusCodeReceiveCallback.md
JsEtsAPIReference/topics/networking/Rcp_OnVoidCallback.md
JsEtsAPIReference/topics/networking/Rcp_ProxyConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_Request.md
JsEtsAPIReference/topics/networking/Rcp_RequestContent.md
JsEtsAPIReference/topics/networking/Rcp_RequestCookieEntry.md
JsEtsAPIReference/topics/networking/Rcp_Response.md
JsEtsAPIReference/topics/networking/Rcp_ResponseCallbackObject.md
JsEtsAPIReference/topics/networking/Rcp_ResponseCookies.md
JsEtsAPIReference/topics/networking/Rcp_SecurityConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_ServerAuthentication.md
JsEtsAPIReference/topics/networking/Rcp_SessionConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_SessionListener.md
JsEtsAPIReference/topics/networking/Rcp_StaticDnsRule.md
JsEtsAPIReference/topics/networking/Rcp_StaticDnsRuleItem.md
JsEtsAPIReference/topics/networking/Rcp_SyncInterceptor.md
JsEtsAPIReference/topics/networking/Rcp_SyncInterceptorArray.md
JsEtsAPIReference/topics/networking/Rcp_TimeInfo.md
JsEtsAPIReference/topics/networking/Rcp_Timeout.md
JsEtsAPIReference/topics/networking/Rcp_TracingConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_TransferConfiguration.md
JsEtsAPIReference/topics/networking/Rcp_TransferRange.md
JsEtsAPIReference/topics/networking/Rcp_Urls.md
JsEtsAPIReference/topics/networking/Rcp_WebProxy.md
JsEtsAPIReference/topics/networking/Remote Communication Kit(远场通信服务).md
JsEtsAPIReference/topics/networking/RemoteCommunication.md
JsEtsAPIReference/topics/networking/Service Collaboration Kit(协同服务).md
JsEtsAPIReference/topics/networking/ServiceCollaboration.md
JsEtsAPIReference/topics/networking/ServiceCollaborationCallback.md
JsEtsAPIReference/topics/networking/ServiceCollaboration_CollaborationDeviceInfo.md
JsEtsAPIReference/topics/networking/ServiceCollaboration_CollaborationDeviceInfoSets.md
JsEtsAPIReference/topics/networking/ServiceCollaboration_SelectInfo.md
JsEtsAPIReference/topics/networking/ServiceCollaboration_SelectInfoV2.md
JsEtsAPIReference/topics/networking/Telephony Kit(蜂窝通信服务).md
JsEtsAPIReference/topics/networking/Telephony.md
JsEtsAPIReference/topics/networking/Telephony_NetworkState.md
JsEtsAPIReference/topics/networking/VpnExtensionContext.md
JsEtsAPIReference/topics/networking/WebSocket.md
JsEtsAPIReference/topics/networking/WebSocket_CloseOption.md
JsEtsAPIReference/topics/networking/WebSocket_CloseResult.md
JsEtsAPIReference/topics/networking/WebSocket_ErrorResult.md
JsEtsAPIReference/topics/networking/WebSocket_Header.md
JsEtsAPIReference/topics/networking/WebSocket_OpenResult.md
JsEtsAPIReference/topics/networking/WebSocket_RequestOptions.md
JsEtsAPIReference/topics/networking/Wifi.md
JsEtsAPIReference/topics/networking/advertising(星闪广播能力).md
JsEtsAPIReference/topics/networking/constant(星闪公共常量定义).md
JsEtsAPIReference/topics/networking/dataTransfer(星闪数传能力).md
JsEtsAPIReference/topics/networking/devicePicker (设备选择控制器).md
JsEtsAPIReference/topics/networking/manager(星闪开关能力).md
JsEtsAPIReference/topics/networking/netBoost(网络加速).md
JsEtsAPIReference/topics/networking/netHandover(连接迁移).md
JsEtsAPIReference/topics/networking/netQuality(网络质量).md
JsEtsAPIReference/topics/networking/net_connection.h.md
JsEtsAPIReference/topics/networking/net_connection_type.h.md
JsEtsAPIReference/topics/networking/net_http.h.md
JsEtsAPIReference/topics/networking/net_http_type.h.md
JsEtsAPIReference/topics/networking/net_ssl_c.h.md
JsEtsAPIReference/topics/networking/net_ssl_c_type.h.md
JsEtsAPIReference/topics/networking/net_websocket.h.md
JsEtsAPIReference/topics/networking/net_websocket_type.h.md
JsEtsAPIReference/topics/networking/network_boost.h.md
JsEtsAPIReference/topics/networking/network_boost_handover.h.md
JsEtsAPIReference/topics/networking/network_boost_quality.h.md
JsEtsAPIReference/topics/networking/nfctech (标准NFC-Tag Nfc 技术).md
JsEtsAPIReference/topics/networking/oh_bluetooth.h.md
JsEtsAPIReference/topics/networking/oh_device_manager.h.md
JsEtsAPIReference/topics/networking/oh_device_manager_err_code.h.md
JsEtsAPIReference/topics/networking/oh_wifi.h.md
JsEtsAPIReference/topics/networking/rcp.h.md
JsEtsAPIReference/topics/networking/rcp.md
JsEtsAPIReference/topics/networking/remoteDevice(对端设备的连接能力).md
JsEtsAPIReference/topics/networking/scan(星闪扫描能力).md
JsEtsAPIReference/topics/networking/service_collaboration_api.h.md
JsEtsAPIReference/topics/networking/ssap(星闪SSAP连接能力).md
JsEtsAPIReference/topics/networking/tag.md
JsEtsAPIReference/topics/networking/tagSession (标准NFC-Tag TagSession).md
JsEtsAPIReference/topics/networking/telephony_data.h.md
JsEtsAPIReference/topics/networking/telephony_radio.h.md
JsEtsAPIReference/topics/networking/telephony_radio_type.h.md
JsEtsAPIReference/topics/networking/urpc.md
JsEtsAPIReference/topics/networking/头文件.md
JsEtsAPIReference/topics/networking/已停止维护的接口.md
JsEtsAPIReference/topics/networking/模块.md
JsEtsAPIReference/topics/networking/网络.md
JsEtsAPIReference/topics/payment/ArkTS API.md
JsEtsAPIReference/topics/payment/Payment Kit(鸿蒙支付服务).md
JsEtsAPIReference/topics/payment/REST API.md
JsEtsAPIReference/topics/payment/ecnyPaymentService (数字人民币服务).md
JsEtsAPIReference/topics/payment/paymentService (鸿蒙支付服务).md
JsEtsAPIReference/topics/payment/promotionService(营销服务).md
JsEtsAPIReference/topics/payment/realNameService(身份验证服务).md
JsEtsAPIReference/topics/payment/thirdPaymentService(三方支付服务).md
JsEtsAPIReference/topics/payment/人脸核身实人预验证.md
JsEtsAPIReference/topics/payment/人脸核身实人验证.md
JsEtsAPIReference/topics/payment/人脸核身实人验证结果查询.md
JsEtsAPIReference/topics/payment/代扣结果回调通知.md
JsEtsAPIReference/topics/payment/公共说明.md
JsEtsAPIReference/topics/payment/关闭合单支付订单.md
JsEtsAPIReference/topics/payment/关闭订单.md
JsEtsAPIReference/topics/payment/合单支付结果回调通知.md
JsEtsAPIReference/topics/payment/合单支付(仅支持平台类商户).md
JsEtsAPIReference/topics/payment/基础支付.md
JsEtsAPIReference/topics/payment/实名信息授权结果查询.md
JsEtsAPIReference/topics/payment/实名信息预验证.md
JsEtsAPIReference/topics/payment/实名信息验证与授权.md
JsEtsAPIReference/topics/payment/实名信息验证结果查询.md
JsEtsAPIReference/topics/payment/对返回结果验签.md
JsEtsAPIReference/topics/payment/平台类商户_服务商.md
JsEtsAPIReference/topics/payment/应用购买记录相关支付订单查询.md
JsEtsAPIReference/topics/payment/延迟订阅续订日期.md
JsEtsAPIReference/topics/payment/接收退款申请事件通知.md
JsEtsAPIReference/topics/payment/支付并签约.md
JsEtsAPIReference/topics/payment/支付结果回调通知.md
JsEtsAPIReference/topics/payment/数据模型说明.md
JsEtsAPIReference/topics/payment/数据类型说明.md
JsEtsAPIReference/topics/payment/服务端关键事件通知.md
JsEtsAPIReference/topics/payment/服务端通知记录查询.md
JsEtsAPIReference/topics/payment/查询代扣订单.md
JsEtsAPIReference/topics/payment/查询合单支付订单.md
JsEtsAPIReference/topics/payment/查询对账单.md
JsEtsAPIReference/topics/payment/查询支付订单.md
JsEtsAPIReference/topics/payment/查询用户可用平台券.md
JsEtsAPIReference/topics/payment/查询用户的历史购买记录.md
JsEtsAPIReference/topics/payment/查询签约订单.md
JsEtsAPIReference/topics/payment/查询结算账单.md
JsEtsAPIReference/topics/payment/查询退款订单.md
JsEtsAPIReference/topics/payment/根据交易号查询订单状态信息.md
JsEtsAPIReference/topics/payment/测试服务端通知.md
JsEtsAPIReference/topics/payment/生成优惠签名购买参数.md
JsEtsAPIReference/topics/payment/生成服务端请求的token.md
JsEtsAPIReference/topics/payment/申请免密代扣.md
JsEtsAPIReference/topics/payment/申请解约.md
JsEtsAPIReference/topics/payment/申请退款.md
JsEtsAPIReference/topics/payment/直连商户.md
JsEtsAPIReference/topics/payment/签约代扣.md
JsEtsAPIReference/topics/payment/签约结果回调通知.md
JsEtsAPIReference/topics/payment/获取应用级凭证.md
JsEtsAPIReference/topics/payment/营销服务.md
JsEtsAPIReference/topics/payment/解约结果回调通知.md
JsEtsAPIReference/topics/payment/订单状态查询(消耗型_非消耗型_非续期订阅商品).md
JsEtsAPIReference/topics/payment/订单确认发货(消耗型_非消耗型_非续期订阅商品).md
JsEtsAPIReference/topics/payment/订阅状态查询.md
JsEtsAPIReference/topics/payment/订阅确认发货.md
JsEtsAPIReference/topics/payment/账单.md
JsEtsAPIReference/topics/payment/返回退款审核结果.md
JsEtsAPIReference/topics/payment/退款申请通知与处理.md
JsEtsAPIReference/topics/payment/退款结果回调通知.md
JsEtsAPIReference/topics/payment/通用接口.md
JsEtsAPIReference/topics/payment/通过combinedMercOrderNo查询订单信息.md
JsEtsAPIReference/topics/payment/通过combinedSysTransOrderNo查询订单信息.md
JsEtsAPIReference/topics/payment/通过contractId查询签约信息.md
JsEtsAPIReference/topics/payment/通过contractId查询签约订单信息.md
JsEtsAPIReference/topics/payment/通过mercContractCode查询签约信息.md
JsEtsAPIReference/topics/payment/通过mercContractCode查询签约订单信息.md
JsEtsAPIReference/topics/payment/通过mercOrderNo查询订单信息.md
JsEtsAPIReference/topics/payment/通过mercRefundOrderNo查询退款订单信息.md
JsEtsAPIReference/topics/payment/通过sysRefundOrderNo查询退款订单信息.md
JsEtsAPIReference/topics/payment/通过sysTransOrderNo查询订单信息.md
JsEtsAPIReference/topics/payment/附录.md
JsEtsAPIReference/topics/payment/预下单.md
JsEtsAPIReference/topics/payment/预签约.md
JsEtsAPIReference/topics/security/AntifraudPicker(反诈选择器).md
JsEtsAPIReference/topics/security/ArkTS API.md
JsEtsAPIReference/topics/security/Asset Store Kit(关键资产存储服务).md
JsEtsAPIReference/topics/security/AssetApi.md
JsEtsAPIReference/topics/security/AssetType.md
JsEtsAPIReference/topics/security/Asset_Attr.md
JsEtsAPIReference/topics/security/Asset_Blob.md
JsEtsAPIReference/topics/security/Asset_Result.md
JsEtsAPIReference/topics/security/Asset_ResultSet.md
JsEtsAPIReference/topics/security/Asset_SyncResult.md
JsEtsAPIReference/topics/security/Asset_Value.md
JsEtsAPIReference/topics/security/AuthenticationExtensionsClientOutputs.md
JsEtsAPIReference/topics/security/BusinessRiskIntelligentDetection(业务风险检测).md
JsEtsAPIReference/topics/security/C API.md
JsEtsAPIReference/topics/security/CertManager.md
JsEtsAPIReference/topics/security/CertManagerType.md
JsEtsAPIReference/topics/security/Crypto Architecture Kit(加解密算法框架服务).md
JsEtsAPIReference/topics/security/CryptoArchitectureKit.md
JsEtsAPIReference/topics/security/CryptoAsymCipherApi.md
JsEtsAPIReference/topics/security/CryptoAsymKeyApi.md
JsEtsAPIReference/topics/security/CryptoCommonApi.md
JsEtsAPIReference/topics/security/CryptoDigestApi.md
JsEtsAPIReference/topics/security/CryptoKdfApi.md
JsEtsAPIReference/topics/security/CryptoKeyAgreementApi.md
JsEtsAPIReference/topics/security/CryptoMacApi.md
JsEtsAPIReference/topics/security/CryptoRandApi.md
JsEtsAPIReference/topics/security/CryptoSignatureApi.md
JsEtsAPIReference/topics/security/CryptoSymCipherApi.md
JsEtsAPIReference/topics/security/CryptoSymKeyApi.md
JsEtsAPIReference/topics/security/Crypto_DataBlob.md
JsEtsAPIReference/topics/security/Data Protection Kit(数据保护服务).md
JsEtsAPIReference/topics/security/Device Certificate Kit(设备证书服务).md
JsEtsAPIReference/topics/security/Device Security Kit(设备安全服务).md
JsEtsAPIReference/topics/security/DeviceSecurityMode.md
JsEtsAPIReference/topics/security/DeviceVerify(应用设备状态检测).md
JsEtsAPIReference/topics/security/DlpAntiPeep(防窥保护).md
JsEtsAPIReference/topics/security/DlpPermissionApi.md
JsEtsAPIReference/topics/security/Enterprise Data Guard Kit(企业数据保护服务).md
JsEtsAPIReference/topics/security/FIDO.md
JsEtsAPIReference/topics/security/FIDO2_AttestationFormatsArray.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorAttestationResponse.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorMetadata.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorMetadataArray.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorResponse.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorSelectionCriteria.md
JsEtsAPIReference/topics/security/FIDO2_AuthenticatorTransportArray.md
JsEtsAPIReference/topics/security/FIDO2_Capability.md
JsEtsAPIReference/topics/security/FIDO2_CapabilityArray.md
JsEtsAPIReference/topics/security/FIDO2_CredentialCreationOptionArray.md
JsEtsAPIReference/topics/security/FIDO2_CredentialCreationOptions.md
JsEtsAPIReference/topics/security/FIDO2_CredentialRequestOptions.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyAssertionCredential.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyAttestationCredential.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialCreationOptions.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialDescriptor.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialDescriptorArray.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialHintArray.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialParameters.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialRequestOptions.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialRpEntity.md
JsEtsAPIReference/topics/security/FIDO2_PublicKeyCredentialUserEntity.md
JsEtsAPIReference/topics/security/FIDO2_TokenBinding.md
JsEtsAPIReference/topics/security/HuksExternalCryptoApi.md
JsEtsAPIReference/topics/security/HuksExternalCryptoTypeApi.md
JsEtsAPIReference/topics/security/HuksKeyApi.md
JsEtsAPIReference/topics/security/HuksParamSetApi.md
JsEtsAPIReference/topics/security/HuksTypeApi.md
JsEtsAPIReference/topics/security/OH_CM_Blob.md
JsEtsAPIReference/topics/security/OH_CM_Credential.md
JsEtsAPIReference/topics/security/OH_CM_CredentialDetailList.md
JsEtsAPIReference/topics/security/OH_CM_UkeyInfo.md
JsEtsAPIReference/topics/security/OH_CryptoAsymCipher.md
JsEtsAPIReference/topics/security/OH_CryptoAsymKeyGenerator.md
JsEtsAPIReference/topics/security/OH_CryptoAsymKeyGeneratorWithSpec.md
JsEtsAPIReference/topics/security/OH_CryptoAsymKeySpec.md
JsEtsAPIReference/topics/security/OH_CryptoDigest.md
JsEtsAPIReference/topics/security/OH_CryptoEcPoint.md
JsEtsAPIReference/topics/security/OH_CryptoEccSignatureSpec.md
JsEtsAPIReference/topics/security/OH_CryptoKdf.md
JsEtsAPIReference/topics/security/OH_CryptoKdfParams.md
JsEtsAPIReference/topics/security/OH_CryptoKeyAgreement.md
JsEtsAPIReference/topics/security/OH_CryptoKeyPair.md
JsEtsAPIReference/topics/security/OH_CryptoMac.md
JsEtsAPIReference/topics/security/OH_CryptoPrivKey.md
JsEtsAPIReference/topics/security/OH_CryptoPrivKeyEncodingParams.md
JsEtsAPIReference/topics/security/OH_CryptoPubKey.md
JsEtsAPIReference/topics/security/OH_CryptoRand.md
JsEtsAPIReference/topics/security/OH_CryptoSign.md
JsEtsAPIReference/topics/security/OH_CryptoSm2CiphertextSpec.md
JsEtsAPIReference/topics/security/OH_CryptoSymCipher.md
JsEtsAPIReference/topics/security/OH_CryptoSymCipherParams.md
JsEtsAPIReference/topics/security/OH_CryptoSymKey.md
JsEtsAPIReference/topics/security/OH_CryptoSymKeyGenerator.md
JsEtsAPIReference/topics/security/OH_CryptoVerify.md
JsEtsAPIReference/topics/security/OH_Huks_Blob.md
JsEtsAPIReference/topics/security/OH_Huks_CertChain.md
JsEtsAPIReference/topics/security/OH_Huks_ExternalCryptoParam.md
JsEtsAPIReference/topics/security/OH_Huks_ExternalCryptoParamSet.md
JsEtsAPIReference/topics/security/OH_Huks_KeyAliasSet.md
JsEtsAPIReference/topics/security/OH_Huks_KeyInfo.md
JsEtsAPIReference/topics/security/OH_Huks_KeyMaterial25519.md
JsEtsAPIReference/topics/security/OH_Huks_KeyMaterialDh.md
JsEtsAPIReference/topics/security/OH_Huks_KeyMaterialDsa.md
JsEtsAPIReference/topics/security/OH_Huks_KeyMaterialEcc.md
JsEtsAPIReference/topics/security/OH_Huks_KeyMaterialRsa.md
JsEtsAPIReference/topics/security/OH_Huks_Param.md
JsEtsAPIReference/topics/security/OH_Huks_ParamSet.md
JsEtsAPIReference/topics/security/OH_Huks_PubKeyInfo.md
JsEtsAPIReference/topics/security/OH_Huks_Result.md
JsEtsAPIReference/topics/security/Online Authentication Kit(在线认证服务).md
JsEtsAPIReference/topics/security/REST API.md
JsEtsAPIReference/topics/security/SOTER.md
JsEtsAPIReference/topics/security/SafetyDetect(安全检测).md
JsEtsAPIReference/topics/security/SecurityAntivirus.md
JsEtsAPIReference/topics/security/SecurityAntivirus_Antivirus.md
JsEtsAPIReference/topics/security/SecurityAudit.md
JsEtsAPIReference/topics/security/SecurityAudit_Event.md
JsEtsAPIReference/topics/security/SecurityAudit_Filter.md
JsEtsAPIReference/topics/security/SecurityAudit(安全审计).md
JsEtsAPIReference/topics/security/SuperPrivacyMode(超级隐私模式).md
JsEtsAPIReference/topics/security/TrustedAppService(可信应用服务).md
JsEtsAPIReference/topics/security/TrustedAuthentication(数字盾服务).md
JsEtsAPIReference/topics/security/Uint8Buff.md
JsEtsAPIReference/topics/security/Universal Keystore Kit(密钥管理服务).md
JsEtsAPIReference/topics/security/User Authentication Kit(用户认证服务).md
JsEtsAPIReference/topics/security/asset_api.h.md
JsEtsAPIReference/topics/security/asset_type.h.md
JsEtsAPIReference/topics/security/cm_native_api.h.md
JsEtsAPIReference/topics/security/cm_native_type.h.md
JsEtsAPIReference/topics/security/crypto_architecture_kit.h.md
JsEtsAPIReference/topics/security/crypto_asym_cipher.h.md
JsEtsAPIReference/topics/security/crypto_asym_key.h.md
JsEtsAPIReference/topics/security/crypto_common.h.md
JsEtsAPIReference/topics/security/crypto_digest.h.md
JsEtsAPIReference/topics/security/crypto_kdf.h.md
JsEtsAPIReference/topics/security/crypto_key_agreement.h.md
JsEtsAPIReference/topics/security/crypto_mac.h.md
JsEtsAPIReference/topics/security/crypto_rand.h.md
JsEtsAPIReference/topics/security/crypto_signature.h.md
JsEtsAPIReference/topics/security/crypto_sym_cipher.h.md
JsEtsAPIReference/topics/security/crypto_sym_key.h.md
JsEtsAPIReference/topics/security/device_security_mode.h.md
JsEtsAPIReference/topics/security/dlp_permission_api.h.md
JsEtsAPIReference/topics/security/fido2_api.h.md
JsEtsAPIReference/topics/security/fileGuard (文件分级管控).md
JsEtsAPIReference/topics/security/native_huks_api.h.md
JsEtsAPIReference/topics/security/native_huks_external_crypto_api.h.md
JsEtsAPIReference/topics/security/native_huks_external_crypto_type.h.md
JsEtsAPIReference/topics/security/native_huks_param.h.md
JsEtsAPIReference/topics/security/native_huks_type.h.md
JsEtsAPIReference/topics/security/recoveryKey(企业恢复密钥).md
JsEtsAPIReference/topics/security/security_antivirus.h.md
JsEtsAPIReference/topics/security/security_audit.h.md
JsEtsAPIReference/topics/security/删除设备标记状态.md
JsEtsAPIReference/topics/security/头文件.md
JsEtsAPIReference/topics/security/安全.md
JsEtsAPIReference/topics/security/已停止维护的接口.md
JsEtsAPIReference/topics/security/更新设备标记状态.md
JsEtsAPIReference/topics/security/查询设备标记状态.md
JsEtsAPIReference/topics/security/模块.md
JsEtsAPIReference/topics/security/通行密钥.md
JsEtsAPIReference/topics/security/验证deviceToken.md
JsEtsAPIReference/types/classes/Class (AVCastPickerHelper).md
JsEtsAPIReference/types/classes/Class (AdsBlockManager).md
JsEtsAPIReference/types/classes/Class (Array).md
JsEtsAPIReference/types/classes/Class (ArrayBuffer).md
JsEtsAPIReference/types/classes/Class (BackForwardCacheOptions).md
JsEtsAPIReference/types/classes/Class (BackForwardCacheSupportedFeatures).md
JsEtsAPIReference/types/classes/Class (BitVector).md
JsEtsAPIReference/types/classes/Class (Brush).md
JsEtsAPIReference/types/classes/Class (Canvas).md
JsEtsAPIReference/types/classes/Class (ClientAuthenticationHandler).md
JsEtsAPIReference/types/classes/Class (ColorFilter).md
JsEtsAPIReference/types/classes/Class (ComponentSnapshot).md
JsEtsAPIReference/types/classes/Class (ComponentUtils).md
JsEtsAPIReference/types/classes/Class (ConsoleMessage).md
JsEtsAPIReference/types/classes/Class (ContextMenuController).md
JsEtsAPIReference/types/classes/Class (ControllerHandler).md
JsEtsAPIReference/types/classes/Class (CursorController).md
JsEtsAPIReference/types/classes/Class (DataResubmissionHandler).md
JsEtsAPIReference/types/classes/Class (DragController).md
JsEtsAPIReference/types/classes/Class (DynamicSyncScene).md
JsEtsAPIReference/types/classes/Class (EventResult).md
JsEtsAPIReference/types/classes/Class (FileSelectorParam).md
JsEtsAPIReference/types/classes/Class (FileSelectorResult).md
JsEtsAPIReference/types/classes/Class (Float32Array).md
JsEtsAPIReference/types/classes/Class (FocusController).md
JsEtsAPIReference/types/classes/Class (Font).md
JsEtsAPIReference/types/classes/Class (FrameCallback).md
JsEtsAPIReference/types/classes/Class (FullScreenExitHandler).md
JsEtsAPIReference/types/classes/Class (GeolocationPermissions).md
JsEtsAPIReference/types/classes/Class (HttpAuthHandler).md
JsEtsAPIReference/types/classes/Class (ImageFilter).md
JsEtsAPIReference/types/classes/Class (Int16Array).md
JsEtsAPIReference/types/classes/Class (Int32Array).md
JsEtsAPIReference/types/classes/Class (Int8Array).md
JsEtsAPIReference/types/classes/Class (JsGeolocation).md
JsEtsAPIReference/types/classes/Class (JsMessageExt).md
JsEtsAPIReference/types/classes/Class (JsResult).md
JsEtsAPIReference/types/classes/Class (Lattice).md
JsEtsAPIReference/types/classes/Class (LiteResultSet).md
JsEtsAPIReference/types/classes/Class (Magnifier).md
JsEtsAPIReference/types/classes/Class (Map).md
JsEtsAPIReference/types/classes/Class (MarqueeDynamicSyncScene).md
JsEtsAPIReference/types/classes/Class (MaskFilter).md
JsEtsAPIReference/types/classes/Class (Matrix).md
JsEtsAPIReference/types/classes/Class (MeasureUtils).md
JsEtsAPIReference/types/classes/Class (MediaAlbumChangeRequest).md
JsEtsAPIReference/types/classes/Class (MediaAssetChangeRequest).md
JsEtsAPIReference/types/classes/Class (MediaAssetManager).md
JsEtsAPIReference/types/classes/Class (MediaQuery).md
JsEtsAPIReference/types/classes/Class (MediaSourceInfo).md
JsEtsAPIReference/types/classes/Class (NativeMediaPlayerSurfaceInfo).md
JsEtsAPIReference/types/classes/Class (OverlayManager).md
JsEtsAPIReference/types/classes/Class (Path).md
JsEtsAPIReference/types/classes/Class (PathEffect).md
JsEtsAPIReference/types/classes/Class (PathIterator).md
JsEtsAPIReference/types/classes/Class (PdfData).md
JsEtsAPIReference/types/classes/Class (Pen).md
JsEtsAPIReference/types/classes/Class (PermissionRequest).md
JsEtsAPIReference/types/classes/Class (PhotoViewPicker).md
JsEtsAPIReference/types/classes/Class (PrefetchOptions).md
JsEtsAPIReference/types/classes/Class (PromptAction).md
JsEtsAPIReference/types/classes/Class (ProxyConfig).md
JsEtsAPIReference/types/classes/Class (ProxyController).md
JsEtsAPIReference/types/classes/Class (ProxyRule).md
JsEtsAPIReference/types/classes/Class (RdbPredicates).md
JsEtsAPIReference/types/classes/Class (RectUtils).md
JsEtsAPIReference/types/classes/Class (Region).md
JsEtsAPIReference/types/classes/Class (ResolvedUIContext).md
JsEtsAPIReference/types/classes/Class (RoundRect).md
JsEtsAPIReference/types/classes/Class (Router).md
JsEtsAPIReference/types/classes/Class (SamplingOptions).md
JsEtsAPIReference/types/classes/Class (ScreenCaptureHandler).md
JsEtsAPIReference/types/classes/Class (Set).md
JsEtsAPIReference/types/classes/Class (ShaderEffect).md
JsEtsAPIReference/types/classes/Class (ShadowLayer).md
JsEtsAPIReference/types/classes/Class (SslErrorHandler).md
JsEtsAPIReference/types/classes/Class (SwiperDynamicSyncScene).md
JsEtsAPIReference/types/classes/Class (TextBlob).md
JsEtsAPIReference/types/classes/Class (TextMenuController).md
JsEtsAPIReference/types/classes/Class (Tool).md
JsEtsAPIReference/types/classes/Class (Typeface).md
JsEtsAPIReference/types/classes/Class (TypefaceArguments).md
JsEtsAPIReference/types/classes/Class (UIContext).md
JsEtsAPIReference/types/classes/Class (UIInspector).md
JsEtsAPIReference/types/classes/Class (UIObserver).md
JsEtsAPIReference/types/classes/Class (Uint16Array).md
JsEtsAPIReference/types/classes/Class (Uint32Array).md
JsEtsAPIReference/types/classes/Class (Uint8Array).md
JsEtsAPIReference/types/classes/Class (Uint8ClampedArray).md
JsEtsAPIReference/types/classes/Class (VerifyPinHandler).md
JsEtsAPIReference/types/classes/Class (WebContextMenuParam).md
JsEtsAPIReference/types/classes/Class (WebContextMenuResult).md
JsEtsAPIReference/types/classes/Class (WebController).md
JsEtsAPIReference/types/classes/Class (WebCookie).md
JsEtsAPIReference/types/classes/Class (WebCookieManager).md
JsEtsAPIReference/types/classes/Class (WebDataBase).md
JsEtsAPIReference/types/classes/Class (WebDownloadDelegate).md
JsEtsAPIReference/types/classes/Class (WebDownloadItem).md
JsEtsAPIReference/types/classes/Class (WebDownloadManager).md
JsEtsAPIReference/types/classes/Class (WebHttpBodyStream).md
JsEtsAPIReference/types/classes/Class (WebKeyboardController).md
JsEtsAPIReference/types/classes/Class (WebMessageExt).md
JsEtsAPIReference/types/classes/Class (WebResourceError).md
JsEtsAPIReference/types/classes/Class (WebResourceHandler).md
JsEtsAPIReference/types/classes/Class (WebResourceRequest).md
JsEtsAPIReference/types/classes/Class (WebResourceResponse).md
JsEtsAPIReference/types/classes/Class (WebSchemeHandler).md
JsEtsAPIReference/types/classes/Class (WebSchemeHandlerRequest).md
JsEtsAPIReference/types/classes/Class (WebSchemeHandlerResponse).md
JsEtsAPIReference/types/classes/Class (WebStorage).md
JsEtsAPIReference/types/classes/Class (WebviewController).md
JsEtsAPIReference/types/classes/Classes (其他).md
JsEtsAPIReference/types/classes/JSVM_DefineClassOptions.md
JsEtsAPIReference/types/enums/Enums.md
JsEtsAPIReference/types/interfaces/IAP Kit(应用内支付服务).md
JsEtsAPIReference/types/interfaces/IAP.md
JsEtsAPIReference/types/interfaces/ICU4C.md
JsEtsAPIReference/types/interfaces/IFAA.md
JsEtsAPIReference/types/interfaces/IME Kit(输入法开发服务).md
JsEtsAPIReference/types/interfaces/IPC Kit(进程间通信服务).md
JsEtsAPIReference/types/interfaces/IPCKit.md
JsEtsAPIReference/types/interfaces/Image Kit(图片处理服务).md
JsEtsAPIReference/types/interfaces/Image.md
JsEtsAPIReference/types/interfaces/ImageAnimator.md
JsEtsAPIReference/types/interfaces/ImageBitmap.md
JsEtsAPIReference/types/interfaces/ImageBitmap对象.md
JsEtsAPIReference/types/interfaces/ImageData.md
JsEtsAPIReference/types/interfaces/ImageData对象.md
JsEtsAPIReference/types/interfaces/ImageEffect.md
JsEtsAPIReference/types/interfaces/ImageEffect_Any.md
JsEtsAPIReference/types/interfaces/ImageEffect_DataValue.md
JsEtsAPIReference/types/interfaces/ImageEffect_FilterDelegate.md
JsEtsAPIReference/types/interfaces/ImageEffect_FilterNames.md
JsEtsAPIReference/types/interfaces/ImageEffect_Region.md
JsEtsAPIReference/types/interfaces/ImageEffect_Size.md
JsEtsAPIReference/types/interfaces/ImageNative_.md
JsEtsAPIReference/types/interfaces/ImageOverlay.md
JsEtsAPIReference/types/interfaces/ImagePacker_Native_.md
JsEtsAPIReference/types/interfaces/ImagePacker_Opts_.md
JsEtsAPIReference/types/interfaces/ImageProcessing.md
JsEtsAPIReference/types/interfaces/ImageProcessing_ColorSpaceInfo.md
JsEtsAPIReference/types/interfaces/ImageReceiverNative_.md
JsEtsAPIReference/types/interfaces/ImageSourceNative_.md
JsEtsAPIReference/types/interfaces/ImageSpan.md
JsEtsAPIReference/types/interfaces/Image_NativeModule.md
JsEtsAPIReference/types/interfaces/Image_PositionArea.md
JsEtsAPIReference/types/interfaces/Image_Region.md
JsEtsAPIReference/types/interfaces/Image_Scale.md
JsEtsAPIReference/types/interfaces/Image_Size.md
JsEtsAPIReference/types/interfaces/Image_String.md
JsEtsAPIReference/types/interfaces/Image对象.md
JsEtsAPIReference/types/interfaces/Indicator.md
JsEtsAPIReference/types/interfaces/IndoorMapInfo.md
JsEtsAPIReference/types/interfaces/Init.md
JsEtsAPIReference/types/interfaces/InitialTimeZoneRule.md
JsEtsAPIReference/types/interfaces/Input Kit(多模输入服务).md
JsEtsAPIReference/types/interfaces/InputMethod.md
JsEtsAPIReference/types/interfaces/InputMethod_AttachOptions.md
JsEtsAPIReference/types/interfaces/InputMethod_CursorInfo.md
JsEtsAPIReference/types/interfaces/InputMethod_InputMethodProxy.md
JsEtsAPIReference/types/interfaces/InputMethod_PrivateCommand.md
JsEtsAPIReference/types/interfaces/InputMethod_TextAvoidInfo.md
JsEtsAPIReference/types/interfaces/InputMethod_TextConfig.md
JsEtsAPIReference/types/interfaces/InputMethod_TextEditorProxy.md
JsEtsAPIReference/types/interfaces/Input_AxisEvent.md
JsEtsAPIReference/types/interfaces/Input_CursorConfig.md
JsEtsAPIReference/types/interfaces/Input_CursorInfo.md
JsEtsAPIReference/types/interfaces/Input_CustomCursor.md
JsEtsAPIReference/types/interfaces/Input_DeviceInfo.md
JsEtsAPIReference/types/interfaces/Input_DeviceListener.md
JsEtsAPIReference/types/interfaces/Input_Hotkey.md
JsEtsAPIReference/types/interfaces/Input_InterceptorEventCallback.md
JsEtsAPIReference/types/interfaces/Input_InterceptorOptions.md
JsEtsAPIReference/types/interfaces/Input_KeyEvent.md
JsEtsAPIReference/types/interfaces/Input_KeyState.md
JsEtsAPIReference/types/interfaces/Input_MouseEvent.md
JsEtsAPIReference/types/interfaces/Input_TouchEvent.md
JsEtsAPIReference/types/interfaces/InsightIntentUIExtensionAbility (意图调用UI扩展能力).md
JsEtsAPIReference/types/interfaces/InstantShapeGenerator(一笔成形功能).md
JsEtsAPIReference/types/interfaces/Intents Kit(意图框架服务).md
JsEtsAPIReference/types/interfaces/Interface (AVCastController).md
JsEtsAPIReference/types/interfaces/Interface (AVImageGenerator).md
JsEtsAPIReference/types/interfaces/Interface (AVMetadataExtractor).md
JsEtsAPIReference/types/interfaces/Interface (AVPlayer).md
JsEtsAPIReference/types/interfaces/Interface (AVRecorder).md
JsEtsAPIReference/types/interfaces/Interface (AVScreenCaptureRecorder).md
JsEtsAPIReference/types/interfaces/Interface (AVSession).md
JsEtsAPIReference/types/interfaces/Interface (AVSessionController).md
JsEtsAPIReference/types/interfaces/Interface (AVTranscoder).md
JsEtsAPIReference/types/interfaces/Interface (AbsAlbum).md
JsEtsAPIReference/types/interfaces/Interface (Album).md
JsEtsAPIReference/types/interfaces/Interface (AtomicServiceBar).md
JsEtsAPIReference/types/interfaces/Interface (AudioCapturer).md
JsEtsAPIReference/types/interfaces/Interface (AudioLoopback).md
JsEtsAPIReference/types/interfaces/Interface (AudioManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioRenderer).md
JsEtsAPIReference/types/interfaces/Interface (AudioRoutingManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioSessionManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioSpatializationManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioStreamManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioVolumeGroupManager).md
JsEtsAPIReference/types/interfaces/Interface (AudioVolumeManager).md
JsEtsAPIReference/types/interfaces/Interface (AutoDeviceSwitch).md
JsEtsAPIReference/types/interfaces/Interface (AutoDeviceSwitchQuery).md
JsEtsAPIReference/types/interfaces/Interface (AutoExposure).md
JsEtsAPIReference/types/interfaces/Interface (AutoExposureQuery).md
JsEtsAPIReference/types/interfaces/Interface (AuxiliaryPicture).md
JsEtsAPIReference/types/interfaces/Interface (BackForwardList).md
JsEtsAPIReference/types/interfaces/Interface (CameraInput).md
JsEtsAPIReference/types/interfaces/Interface (CameraManager).md
JsEtsAPIReference/types/interfaces/Interface (CameraOutput).md
JsEtsAPIReference/types/interfaces/Interface (CapturePhoto).md
JsEtsAPIReference/types/interfaces/Interface (ColorManagement).md
JsEtsAPIReference/types/interfaces/Interface (ColorManagementQuery).md
JsEtsAPIReference/types/interfaces/Interface (ConcatArray).md
JsEtsAPIReference/types/interfaces/Interface (ControlCenter).md
JsEtsAPIReference/types/interfaces/Interface (ControlCenterQuery).md
JsEtsAPIReference/types/interfaces/Interface (FetchResult).md
JsEtsAPIReference/types/interfaces/Interface (Flash).md
JsEtsAPIReference/types/interfaces/Interface (FlashQuery).md
JsEtsAPIReference/types/interfaces/Interface (Focus).md
JsEtsAPIReference/types/interfaces/Interface (FocusQuery).md
JsEtsAPIReference/types/interfaces/Interface (Image).md
JsEtsAPIReference/types/interfaces/Interface (ImageCreator).md
JsEtsAPIReference/types/interfaces/Interface (ImagePacker).md
JsEtsAPIReference/types/interfaces/Interface (ImageReceiver).md
JsEtsAPIReference/types/interfaces/Interface (ImageSource).md
JsEtsAPIReference/types/interfaces/Interface (Macro).md
JsEtsAPIReference/types/interfaces/Interface (MacroQuery).md
JsEtsAPIReference/types/interfaces/Interface (MediaAssetDataHandler).md
JsEtsAPIReference/types/interfaces/Interface (MediaAssetProgressHandler).md
JsEtsAPIReference/types/interfaces/Interface (MediaKeySession).md
JsEtsAPIReference/types/interfaces/Interface (MediaKeySystem).md
JsEtsAPIReference/types/interfaces/Interface (MediaSource).md
JsEtsAPIReference/types/interfaces/Interface (MediaSourceLoadingRequest).md
JsEtsAPIReference/types/interfaces/Interface (Metadata).md
JsEtsAPIReference/types/interfaces/Interface (MetadataOutput).md
JsEtsAPIReference/types/interfaces/Interface (MovingPhoto).md
JsEtsAPIReference/types/interfaces/Interface (NativeMediaPlayerBridge).md
JsEtsAPIReference/types/interfaces/Interface (NativeMediaPlayerHandler).md
JsEtsAPIReference/types/interfaces/Interface (Photo).md
JsEtsAPIReference/types/interfaces/Interface (PhotoAccessHelper).md
JsEtsAPIReference/types/interfaces/Interface (PhotoAsset).md
JsEtsAPIReference/types/interfaces/Interface (PhotoOutput).md
JsEtsAPIReference/types/interfaces/Interface (PhotoSession).md
JsEtsAPIReference/types/interfaces/Interface (Picture).md
JsEtsAPIReference/types/interfaces/Interface (PixelMap).md
JsEtsAPIReference/types/interfaces/Interface (PreviewOutput).md
JsEtsAPIReference/types/interfaces/Interface (QuickImageDataHandler).md
JsEtsAPIReference/types/interfaces/Interface (RdbStore).md
JsEtsAPIReference/types/interfaces/Interface (ResultSet).md
JsEtsAPIReference/types/interfaces/Interface (SecureSession).md
JsEtsAPIReference/types/interfaces/Interface (Session).md
JsEtsAPIReference/types/interfaces/Interface (Stabilization).md
JsEtsAPIReference/types/interfaces/Interface (StabilizationQuery).md
JsEtsAPIReference/types/interfaces/Interface (Transaction).md
JsEtsAPIReference/types/interfaces/Interface (VideoOutput).md
JsEtsAPIReference/types/interfaces/Interface (VideoSession).md
JsEtsAPIReference/types/interfaces/Interface (WebMessagePort).md
JsEtsAPIReference/types/interfaces/Interface (WhiteBalance).md
JsEtsAPIReference/types/interfaces/Interface (WhiteBalanceQuery).md
JsEtsAPIReference/types/interfaces/Interface (Window).md
JsEtsAPIReference/types/interfaces/Interface (WindowStage).md
JsEtsAPIReference/types/interfaces/Interface (Zoom).md
JsEtsAPIReference/types/interfaces/Interface (ZoomQuery).md
JsEtsAPIReference/types/interfaces/Interfaces (其他).md
JsEtsAPIReference/types/interfaces/Interfaces(其他).md
JsEtsAPIReference/types/interfaces/InterstitialDialogAction.md
JsEtsAPIReference/types/interfaces/UsbDdkInterface.md
JsEtsAPIReference/types/interfaces/UsbDdkInterfaceDescriptor.md
JsEtsAPIReference/types/interfaces/UsbInterfaceDescriptor.md
JsEtsAPIReference/types/interfaces/废弃的Interface (AudioPlayer, deprecated).md
JsEtsAPIReference/types/interfaces/废弃的Interface (AudioRecorder, deprecated).md
JsEtsAPIReference/types/interfaces/废弃的Interface (CaptureSession, deprecated).md
JsEtsAPIReference/types/interfaces/废弃的Interface (VideoPlayer, deprecated).md
JsEtsAPIReference/types/structs/JSVM_CallbackStruct.md
JsEtsAPIReference/types/structs/JSVM_CallbackStruct_.md
JsEtsAPIReference/types/structs/JSVM_PropertyHandlerConfigurationStruct.md
JsEtsAPIReference/types/structs/JSVM_PropertyHandlerConfigurationStruct_.md
JsEtsAPIReference/types/structs/OH_AVMetadataBuilderStruct.md
JsEtsAPIReference/types/structs/OH_AVMetadataStruct.md
JsEtsAPIReference/types/structs/OH_AudioCapturerStruct.md
JsEtsAPIReference/types/structs/OH_AudioCapturer_Callbacks_Struct.md
JsEtsAPIReference/types/structs/OH_AudioNodeBuilderStruct.md
JsEtsAPIReference/types/structs/OH_AudioNodeStruct.md
JsEtsAPIReference/types/structs/OH_AudioRendererStruct.md
JsEtsAPIReference/types/structs/OH_AudioRenderer_Callbacks_Struct.md
JsEtsAPIReference/types/structs/OH_AudioStreamBuilderStruct.md
JsEtsAPIReference/types/structs/OH_AudioSuiteEngineStruct.md
JsEtsAPIReference/types/structs/OH_AudioSuitePipelineStruct.md
JsEtsAPIReference/types/structs/OH_Drawing_FontStyleStruct.md
JsEtsAPIReference/types/structs/头文件和结构体.md
JsEtsAPIReference/types/structs/结构体.md
KITS.md
TASK_MAP.md
appBasics/应用基础与包结构.md
appBasics/应用模型与并发.md
continuation/自由流转与跨端协同指南.md
harmonyos-releases/api-26-release.md
ideGuides/AI辅助编程指南.md
ideGuides/ArkWeb WebView CDP调试与字段到达证明.md
ideGuides/DevEco Studio IDE私有接口与AI自动化.md
ideGuides/DevEco模拟器私有接口与AI自动化.md
ideGuides/命令行工具指南.md
ideGuides/应用签名指南.md
ideGuides/独立命令行工具配置手册.md
ideGuides/调试与日志分析.md
ideGuides/运行与环境配置指南.md
multiDevice/一次开发多端部署指南.md
ndkGuides/NDK开发与Node-API指南.md
performanceAndStandards/应用体验与性能规范.md
performanceAndStandards/性能调优与Profiler指南.md
publishing/应用上架与发布指南.md
quickStart/ets/minimal-project-scaffold.md
quickStart/ets/使用真机运行应用.md
quickStart/ets/创建一个新工程.md
quickStart/ets/实现页面跳转.md
quickStart/ets/恭喜您.md
quickStart/ets/概述.md
quickStart/ets/编写第一个页面.md
quickStart/ets/编写第二个页面.md
templates/empty-ability-app/README.md
testing/应用测试与Hypium指南.md
references/JsEtsAPIReference/api26/hms-js/@hms.health.service.d.ts.md
# @hms.health.service.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of HealthServiceKit.
* @kit HealthServiceKit
*/
import type healthStore from './@hms.health.store';
import { Callback } from '@ohos.base';
/**
* Mini Health Service Kit API for lite wearables.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
declare namespace healthService {
/**
* Real-time sampling data structure, which is usually used for sensor data.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface SampleReal<K extends Record<string, healthStore.HealthValueType> = Record<string, healthStore.HealthValueType>> {
/**
* Data type.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
dataType: healthStore.DataType;
/**
* Unix timestamp.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
time: number;
/**
* Data fields.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
fields: Pick<K, keyof K>;
/**
* Device ID.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
deviceUniqueId?: string;
}
/**
* Namespace for daily activity data and api.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace workout {
/**
* Mini Health Service Kit API for lite wearables.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type ConfigType = number | string | boolean;
/**
* Mini Health Service Kit API for lite wearables.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface WorkoutConfig {
/**
* Workout linkage type, for example, course link and activity link.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
linkageType: LinkageType;
/**
* Sport-type workout.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
sportType: number;
/**
* Workout goal.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activityGoals?: Goal[];
/**
* Extended workout configuration.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
extensionConfig?: Record<string, ConfigType>;
}
/**
* Workout goal.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface Goal {
/**
* Target type.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
* @see { TargetType }
*/
type: number;
/**
* Target value.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
value: number;
}
/**
* Algorithm dynamic library loading
*
* @param { string } path - Algorithm dynamic library path.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104004 - Permission verification error.
* Application has no permission, such as Motion Permission.
* @throws { BusinessError } 1009104005 - Failed to load the dynamic library.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function load(path: string): void;
/**
* Algorithm dynamic library loading (asynchronous version)
*
* @param { string } path - Algorithm dynamic library path.
* @param { Callback<DynamicLibResult> } callback - Callback function to receive result code.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104004 - Permission verification error.
* Application has no permission, such as Motion Permission.
* @throws { BusinessError } 1009104005 - Failed to load the dynamic library.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function load(path: string, callback: Callback<DynamicLibResult>): void;
/**
* Algorithm dynamic library unloading
*
* @param { string } path - Algorithm dynamic library path.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104004 - Permission verification error.
* Application has no permission, such as Motion Permission.
* @throws { BusinessError } 1009104006 - Failed to unload the dynamic library.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function unload(path: string): void;
/**
* Unloads the algorithm dynamic library (asynchronously).
*
* @param { string } path - Path of the algorithm dynamic library.
* @param { Callback<DynamicLibResult> } callback - Callback function for receiving the return code.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104004 - Permission verification error.
* Application has no permission, such as Motion Permission.
* @throws { BusinessError } 1009104006 - Failed to unload the dynamic library.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function unload(path: string, callback: Callback<DynamicLibResult>): void;
/**
* Workout configuration.
*
* @param { WorkoutConfig } workoutConfig - Workout configuration information.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout not in stoped or idle state.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function config(workoutConfig: WorkoutConfig): void;
/**
* Start a activity.
*
* @returns { StartResult } Result of function call, contains the return code and reason.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104002 - Unsupported sport type.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout in sporting, paused or stopped state.
* @throws { BusinessError } 1009104004 - Permission verification error.
* Application has no permission, such as Motion Permission.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function start(): StartResult;
/**
* Pause a activity.
*
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout in ready, paused or stoped state.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function pause(): void;
/**
* Resume a activity.
*
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout in ready, sporting or stopped state.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function resume(): void;
/**
* Stops a workout.
*
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function stop(): void;
/**
* Subscribe all types of data.
*
* @param { undefined } dataType - DataType is undefined means every type data that can be obtained.
* @param { Callback<SampleReal[]> } listener - Callback for data subscription.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
* @deprecated since 26.0.0
* @useinstead onData(listener: Callback)
*/
function onData(dataType: undefined, listener: Callback<SampleReal[]>): void;
/**
* Unsubscribe subscription of all types of data.
*
* @param { undefined } dataType - DataType is undefined means every type data that can be obtained.
* @param { Callback<SampleReal[]> } [listener] - Callback for data subscription.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
* @deprecated since 26.0.0
* @useinstead offData(listener?: Callback)
*/
function offData(dataType: undefined, listener?: Callback<SampleReal[]>): void;
/**
* Send data to linkages.
*
* @param { SampleReal[] } sampleReal - Realtime data.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1009104001 - Sport service busy. Workout is already started by other application.
* @throws { BusinessError } 1009104999 - System internal error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function sendData(sampleReal: SampleReal[]): void;
/**
* Result code of starting workout.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
enum StartCode {
/**
* Startup success.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
SUCCESS = 0,
/**
* Workout has started.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
WORKOUT_WORKING = 1,
/**
* No connected devices.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
NO_SUPPORTED_DEVICE = 2,
/**
* Device busy.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
DEVICE_BUSY = 3
}
/**
* Result code of algorithm dynamic library.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
enum DynamicLibErrorCode {
/**
* Load/unload success.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
OPERATION_SUCCESS = 0,
/**
* Algorithm dynamic library file not found.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
FILE_NOT_FOUND = 1,
/**
* Service busy.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
SERVICE_BUSY = 2,
/**
* Algorithm dynamic library load/unload fail.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
OPERATION_FAILED = 3,
/**
* system internal error.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
SYSTEM_INTERNAL_ERROR = 4
}
/**
* Algorithm dynamic library operation result
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DynamicLibResult {
/**
* Operation code
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
operationCode: DynamicLibErrorCode;
}
/**
* Workout start result.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface StartResult {
/**
* Start code.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startCode: StartCode;
/**
* Status of connected devices.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
deviceState: DeviceState[];
}
/**
* Status of a connected device.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DeviceState {
/**
* Device ID.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
deviceId: string;
/**
* Device name.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
deviceName?: string;
/**
* Device status.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
state: number;
}
/**
* Workout linkage type.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
enum LinkageType {
/**
* Fitness course.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
COURSE_LINK = 0,
/**
* Activity such as running, walking, or cycling.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
ACTIVITY_LINK = 1
}
/**
* Linkage type.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
enum TargetType {
/**
* No goal.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
NONE = 0,
/**
* Distance.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
DISTANCE = 1,
/**
* Calories.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
CALORIE = 2,
/**
* Time.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
TIME = 3,
/**
* Number of rope jumps.
*
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 6.1.1(24)
*/
SKIPPING_TIMES = 4
}
/**
* Subscribes to all types of data.
*
* @param { Callback<SampleReal[]> } listener - Data subscription callback.
* @throws { BusinessError } 201 - Permission verification failed. For the app, ensure that you have
* requested Health Service Kit, selected the product type, and enabled required data
* read and write permissions, and that the user has granted authorization.
* @throws { BusinessError } 1009104001 – Sports service busy. Workout has already been started by another
* app.
* @throws { BusinessError } 1009104003 - Invalid command. The API is called when workout is not started.
* @throws { BusinessError } 1009104999 - Internal system error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 26.0.0
*/
function onData(listener: Callback<SampleReal[]>): void;
/**
* Cancel subscriptions for all data types.
*
* @param { Callback<SampleReal[]> } [listener] - Data subscription callback.
* @throws { BusinessError } 201 - Permission verification failed. For the app, ensure that you have
* requested Health Service Kit, selected the product type, and enabled required data
* read and write permissions, and that the user has granted authorization.
* @throws { BusinessError } 1009104001 – Sports service busy. Workout has already been started by
* another app.
* @throws { BusinessError } 1009104999 - Internal system error.
* @syscap SystemCapability.Health.HealthService.Lite
* @famodelonly
* @since 26.0.0
*/
function offData(listener?: Callback<SampleReal[]>): void;
}
}
export default healthService;
```
references/JsEtsAPIReference/api26/hms-js/@hms.health.store.d.ts.md
# @hms.health.store.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of HealthServiceKit.
* @kit HealthServiceKit
*/
import { Callback } from '@ohos.base';
/**
* This module provides the health storage function.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
declare namespace healthStore {
/**
* Data types of health data.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DataType {
/**
* Unique ID of a data type.
*
* @readonly
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
readonly id: number;
/**
* Unique ID of a data type.
*
* @readonly
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
readonly name?: string;
}
/**
* Subdata type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SubDataType = DataType;
/**
* Step cadence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type PaceValueType = Record<string, number>;
/**
* Field value type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type HealthValueType = number | string | boolean | undefined;
/**
* Exercise sequence summary data.
* It defines the statistics of a data type in a certain period of time during an exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface ExerciseSummary extends Record<string, HealthValueType | PaceValueType> {
}
/**
* Defines the model for instantaneous sample data during exercise.
* It uses one or more fields to describe the data.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface SequencePoint extends Record<string, HealthValueType> {
/**
* Unix timestamp.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Detailed data point field.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
[P: string]: HealthValueType;
}
/**
* Basic information about health data.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface SampleDataBase {
/**
* Data type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
dataType: DataType;
/**
* Data source ID.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
dataSourceId: string;
/**
* Local date of data.
* It is in MM/DD/YYYY format.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
localDate: string;
/**
* Unix timestamp.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Unix timestamp.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endTime: number;
/**
* Time zone where the data is located.
* Example: `+0800`
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
timeZone: string;
/**
* Time when the data is created or modified.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
modifiedTime: number;
}
/**
* Exercise sequence.
* It consists of exercise sequence data over a specific period.
* It contains sequence summary data and detailed sequence points.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface ExerciseSequence<K extends Record<string, ExerciseSummary> = Record<string, ExerciseSummary>, DK extends Record<string, SequencePoint[]> = Record<string, SequencePoint[]>> extends SampleDataBase {
/**
* Workout type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseType: SubDataType;
/**
* Activity duration of the exercise sequence data, in milliseconds since the Unix epoch.
* The start and end times identify the full duration of the exercise.
* However, the active duration may be shorter.
* If no value is assigned, the duration is calculated based on the start and end times by default.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
duration?: number;
/**
* Summary data.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
summaries: Pick<K, keyof K>;
/**
* Details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
details?: Pick<DK, keyof DK>;
}
/**
* Data source options, which are used in query and deletion operations.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DataSourceOptions {
/**
* Unique data source ID for data source association.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
dataSourceId?: string;
/**
* Unique device ID for device association.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
deviceUniqueId?: string;
/**
* App package name.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
appBundleName?: string;
/**
* App ID.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
appId?: string;
}
/**
* Basic API for requests.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DataRequest {
/**
* Local start date of data.
* It should be formatted as MM/DD/YYYY using Intl.DateTimeFormat with the "en-US" locale.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startLocalDate: string;
/**
* Local end date of data.
* It should be formatted as MM/DD/YYYY using Intl.DateTimeFormat with the "en-US" locale.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endLocalDate: string;
/**
* Request start time, in milliseconds since the Unix epoch.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Request end time, in milliseconds since the Unix epoch.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endTime: number;
/**
* Data sources for a request.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
dataSourceOptions?: DataSourceOptions;
}
/**
* Result sorting order.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
enum SortOrder {
/**
* Sorts data in ascending order.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
ASC = 0,
/**
* Sorts data in descending order.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
DESC = 1
}
/**
* Basic API for reading data requests.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface DataReadRequest<DK extends Record<string, HealthValueType> = Record<string, HealthValueType>> extends DataRequest {
/**
* Number of records to read.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
count?: number;
/**
* Offset relative to the current position.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
offset?: number;
/**
* Sorting order. It can be omitted for ascending order.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
sortOrder?: SortOrder;
}
/**
* Reading options for exercise sequence and health sequence details.
* Any combination of the options is valid, but withDetails will override withPartialDetails.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface SequenceReadOptions<DK extends Record<string, SequencePoint[]> = Record<string, SequencePoint[]>> {
/**
* Indicates to read details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
withDetails?: boolean;
/**
* Indicates to read partial details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
withPartialDetails?: (keyof DK)[];
}
/**
* Base class for authorization request types.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface AuthorizationBase {
/**
* Data types that require read permission.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
readDataTypes: DataType[];
/**
* Data types that require write permission.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
writeDataTypes: DataType[];
}
/**
* Authorization response.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface AuthorizationResponse extends AuthorizationBase {
/**
* Other permissions required.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
scopes?: string[];
}
/**
* Authorization request parameters.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface AuthorizationRequest extends AuthorizationBase {
/**
* Other permissions required.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
scopes?: string[];
}
/**
* Executes a sequence read request.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface ExerciseSequenceReadRequest<DK extends Record<string, SequencePoint[]> = Record<string, SequencePoint[]>> extends Omit<DataReadRequest, 'startLocalDate' | 'endLocalDate'> {
/**
* Subdata types.
* If the value is null, the subdata types are not restricted.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseType: SubDataType | SubDataType[] | null;
/**
* Reading options for the exercise sequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
readOptions?: SequenceReadOptions<DK>;
}
/**
* Requests authorization and displays the authorization screen.
*
* @param { AuthorizationRequest } request - 1. Start the authorization screen for app authorization.
* 2. The API is called by a third-party service.
* 3. After user authorization is obtained, subsequent associated APIs can be called.
* @returns { AuthorizationResponse } Returns the authorization result.
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function requestAuthorizations(request: AuthorizationRequest): AuthorizationResponse;
/**
* Obtains the local authorization result.
*
* @param { AuthorizationRequest } request - Authorization query request.
* @returns { AuthorizationResponse } Return query authorizations response.
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function getAuthorizations(request: AuthorizationRequest): AuthorizationResponse;
/**
* Reads exercise sequence data from the health data storage.
* You must have the read permission on the data type in parameters.
*
* @param { ExerciseSequenceReadRequest } request - Data read request.
* @param { Callback<T[]> } callback - Callback that returns the health data array.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1002700001 - Internal system error.
* @throws { BusinessError } 1002700002 - Database processing error.
* @throws { BusinessError } 1002701001 - Network error. The network is unavailable.
* @throws { BusinessError } 1002702001 - Account error. The user is not signed in with a HUAWEI ID.
* @throws { BusinessError } 1002702002 - Account error. Failed to obtain the HUAWEI ID information.
* @throws { BusinessError } 1002703001 - User privacy agreement not accepted.
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function readData<T extends ExerciseSequence>(request: ExerciseSequenceReadRequest, callback: Callback<T[]>): void;
/**
* Saves the exercise sequence data to the health data storage.
* You must have the write permission on the data type in parameters.
*
* @param { ExerciseSequence } exerciseSequence - Health data to save.
* @throws { BusinessError } 201 - Permission verification failed. Please ensure that the app has
* applied for the Health Service Kit, selected the product type, enabled the corresponding data
* read and write permissions, and the user has completed authorization.
* @throws { BusinessError } 1002700001 - Internal system error.
* @throws { BusinessError } 1002700002 - Database processing error.
* @throws { BusinessError } 1009104003 - Illegal command. Called when workout is not started.
* @throws { BusinessError } 1002701001 - Network error. The network is unavailable.
* @throws { BusinessError } 1002702001 - Account error. The user is not signed in with a HUAWEI ID.
* @throws { BusinessError } 1002702002 - Account error. Failed to obtain the HUAWEI ID information.
* @throws { BusinessError } 1002703001 - User privacy agreement not accepted.
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
function saveData(exerciseSequence: ExerciseSequence): void;
/**
* Defines all data type constants.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace healthDataTypes {
/**
* Workout record data type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const WORKOUT_SUMMARY: healthStore.DataType;
/**
* Workout record details authorization type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const WORKOUT_DETAIL: healthStore.DataType;
/**
* Exercise record data type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const WORKOUT: healthStore.DataType;
/**
* Workout real-time data types.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const WORKOUT_REALTIME: healthStore.DataType;
/**
* Data type (Badminton).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const BADMINTON: healthStore.SubDataType;
/**
* Exercise type constant for an exercise sequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const TENNIS: healthStore.SubDataType;
/**
* Exercise type constant for an exercise sequence, indicating stair climbing.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const STAIR_CLIMBING: healthStore.SubDataType;
/**
* Exercise type constant for an exercise sequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const SOCCER: healthStore.SubDataType;
/**
* Exercise type constant for an exercise sequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const PICKLEBALL: healthStore.SubDataType;
/**
* Exercise type constant for an exercise sequence, indicating strength training.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const STRENGTH_TRAINING: healthStore.SubDataType;
}
/**
* Define data model field structures used in the health store.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace healthFields {
/**
* API for defining SequencePoint struct for the workout heart rate.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface ExerciseHeartRate extends healthStore.SequencePoint {
/**
* Workout heart rate, in bpm. The value must be in the range of (0, 255).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
bpm: number;
}
/**
* API for defining the sequence point structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface Altitude extends healthStore.SequencePoint {
/**
* Altitude measured in meters.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
altitude: number;
}
/**
* API for defining SequencePoint struct for the speed.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface Speed extends healthStore.SequencePoint {
/**
* Speed measured in m/s. The value must be in the range of [0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
speed: number;
}
/**
* Define the type for strengthTraining groupSummary structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type GroupSummary = {
/**
* Training weight.
* The maximum length is 10.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
trainingWeight: number[];
/**
* Number of action groups.
* The maximum length is 10.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
groupCount: number[];
/**
* Single group duration, in seconds.
* The maximum length is 10.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
groupTime: number[];
};
/**
* Define the type for strengthTraining actionSummary structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type ActionSummary = {
/**
* Action name.
* The maximum length is 50.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
actionName: string;
/**
* Interval rest duration between groups, in seconds.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
groupRestingTime: number;
/**
* Number of groups, Maximum value is 10.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
actionTimes?: number;
/**
* Training capacity.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
trainingVolume?: number;
/**
* Train weight unit, must be kg or lbs.
* Default value: 'kg'.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
weightUnit?: 'kg' | 'lbs';
/**
* Group summary information for each exercise group.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
groups: GroupSummary[];
};
/**
* Define the type for badminton exerciseSummary structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type BadmintonSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Average hitting speed, in kilometers per hour, value must be [0,500].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgShotSpeed?: number;
/**
* Maximum hitting speed, in kilometers per hour, value must be [0,500].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxShotSpeed?: number;
/**
* Total number of shots hit, value must be [0,20000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
shots?: number;
/**
* Maximum number of consecutive exchanges rounds, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxContinuousRally?: number;
/**
* Number of forehand shots, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
forehandStroke?: number;
/**
* Number of backhand strokes, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
backhandStroke?: number;
/**
* Number of times at bat, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
overhandStroke?: number;
/**
* Number of downshots hit, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
underhandStroke?: number;
/**
* Smash Count, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
smash?: number;
/**
* Number of high clears, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
highClear?: number;
};
/**
* Fields about badminton details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type BadmintonDetail = {
/**
* SequencePoint array of exercise heart rate for walking exerciseSequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseHeartRate?: ExerciseHeartRate[];
};
/**
* Define the type for soccer exerciseSummary structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SoccerSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Goals scored, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
goalsTimes?: number;
/**
* Assists made, value must be [0,10000].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
assistsTimes?: number;
};
/**
* Fields about soccer details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SoccerDetail = {
/**
* Real-time heart rate data array during the exercise process, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseHeartRate?: ExerciseHeartRate[];
};
/**
* Define the type for strengthTraining exerciseSummary structure.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type StrengthTrainingSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Number of actions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
actionCount?: number;
/**
* Total training capacity, in kilograms.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTrainingVolume?: number;
/**
* Total number of groups.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
actionGroups?: number;
/**
* Subjective fatigue grade.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
rpe?: number;
/**
* List of strength training actions, recording detailed information of exercises performed
* during the workout.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
actions?: healthFields.ActionSummary[];
};
/**
* Fields about strength training details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type StrengthTrainingDetail = {
/**
* Real-time heart rate data array during the exercise process, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
heartRate?: ExerciseHeartRate[];
};
/**
* Fields about tennis statistics.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type TennisSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Total number of forehand shots made.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
forehand?: number;
/**
* Total number of backhand shots made.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
backhand?: number;
/**
* Total number of swings (including all forehand serves, forehand shots, and backhand shots).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
swingTimes: number;
/**
* Longest consecutive hit streak.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxContinuousRally: number;
};
/**
* Fields about tennis details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type TennisDetail = {
/**
* SequencePoint array of exercise heart rate for walking exerciseSequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseHeartRate?: ExerciseHeartRate[];
};
/**
* Fields about stairClimb statistics.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type StairClimbSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Total steps.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalSteps: number;
/**
* Cumulative climb for altitude gain.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
elevationGain: number;
/**
* Number of floors climbed, value range [0,4999].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
floors?: number;
/**
* Average number of floors per minute, value range [0.0, 99.9).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgFloorSpeed?: number;
};
/**
* Fields about stairClimb details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type StairClimbDetail = {
/**
* SequencePoint array of exercise heart rate for walking exerciseSequence.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseHeartRate?: ExerciseHeartRate[];
};
/**
* Fields about pickleBall summary.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type PickleBallSummary = {
/**
* Start time of the data, Unix epoch in millisecond.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startTime: number;
/**
* Total time of the data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalTime: number;
/**
* Total duration of the target motion data, the unit is second.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
targetDuration?: number;
/**
* Average heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
avgHeartRate?: number;
/**
* Max heart rate throughout the workout, the unit is times per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxHeartRate?: number;
/**
* Heart rate zone type (0: maximum heart rate zone, 1: reserve heart rate zone).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
mHeartrateZoneType?: number;
/**
* Restore the initial heart rate value.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
startHeartRate?: number;
/**
* Heart rate at the end of the recovery heart rate measurement, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
endHeartRate?: number;
/**
* Peak exercise load level.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
loadPeakLevel?: number;
/**
* Aerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
aerobicTrainingStress?: number;
/**
* Anaerobic training stress value, value must be [0.0, 5.0].
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
anaerobicTrainingStress?: number;
/**
* Estimated recovery time, in hours.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
recoveryTime?: number;
/**
* Total number of calories for exerciseSequence in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
totalCalories: number;
/**
* Calories actively burned through exercise, excluding basal metabolism, in calories, value must be (0, ∞).
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
activeCalorie: number;
/**
* Total number of forehand shots made.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
forehand?: number;
/**
* Total number of backhand shots made.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
backhand?: number;
/**
* Number of swings with the racket.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
swingTimes?: number;
/**
* Maximum Burst Shots Count.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
maxContinuousRally?: number;
};
/**
* Fields about pickleBall details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type PickleBallDetail = {
/**
* Real-time heart rate data array during the exercise process, in beats per minute.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
exerciseHeartRate?: ExerciseHeartRate[];
};
}
/**
* Namespace for ExerciseRealtime related functionality.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace exerciseRealtimeHelper {
/**
* Constant for the real-time activity time during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_ACTIVE_TIME: string;
/**
* Constant for real-time aerobic training stress during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_AEROBIC_TRAINING_STRESS: string;
/**
* Constant for real-time anaerobic training stress during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_ANAEROBIC_TRAINING_STRESS: string;
/**
* Constant for real-time heart rate during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_HEART_RATE: string;
/**
* Constant for the exercise duration.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_DURATION: string;
/**
* Constant for real-time total calories during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_TOTAL_CALORIES: string;
/**
* Constant for real-time active calorie during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_ACTIVE_CALORIE: string;
/**
* Constant for the real-time average shooting speed during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_AVG_SHOT_SPEED: string;
/**
* Constant for real-time shot count during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_SHOTS: string;
/**
* Constant, indicating real-time maximum continuous rally during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_MAX_CONTINUOUS_RALLY: string;
/**
* Constant, indicating real-time forehand stroke during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_FOREHAND_STROKE: string;
/**
* Constant, indicating real-time backhand stroke during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_BACKHAND_STROKE: string;
/**
* Constant for real-time smash during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_SMASH: string;
/**
* Constant for real-time high clear during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_HIGH_CLEAR: string;
/**
* Constant for the real-time maximum shooting speed during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_MAX_SHOT_SPEED: string;
/**
* Constant for real-time overhand stroke during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_OVERHAND_STROKE: string;
/**
* Constant for real-time underhand stroke during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_UNDERHAND_STROKE: string;
/**
* Constant for real-time floors during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_FLOORS: string;
/**
* Constant for real-time average floor speed during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_AVG_FLOOR_SPEED: string;
/**
* Constant for real-time forehand during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_FOREHAND: string;
/**
* Constant for real-time backhand during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_BACKHAND: string;
/**
* Constant for real-time swing times during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_SWING_TIMES: string;
/**
* Constant for real-time goal during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_GOALS_TIMES: string;
/**
* Constant for real-time assist count during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_ASSISTS_TIMES: string;
/**
* Constant for real-time total steps during exercise.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const REALTIME_KEY_TOTAL_STEPS: string;
}
/**
* Namespace for executing sequence-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace exerciseSequenceHelper {
/**
* Exercise sequence data type.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const DATA_TYPE: healthStore.DataType;
/**
* Namespace for badminton-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace badminton {
/**
* Workout type indicating badminton.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* Fields of BadmintonSummary.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.BadmintonSummary;
/**
* Fields of BadmintonDetail.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.BadmintonDetail;
}
/**
* Namespace for tennis-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace tennis {
/**
* Workout type indicating tennis.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* Tennis court for a tennis match.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.TennisSummary;
/**
* Tennis fields.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.TennisDetail;
}
/**
* Namespace of the stair climbing-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace stairClimb {
/**
* Workout type indicating stair climbing.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* The fields for StairClimbSummary.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.StairClimbSummary;
/**
* Fields of StairClimbDetail.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.StairClimbDetail;
}
/**
* Namespace for soccer-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace soccer {
/**
* Workout type indicating soccer.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* Fields of SoccerSummary.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.SoccerSummary;
/**
* Fields of SoccerDetail.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.SoccerDetail;
}
/**
* Namespace of pickleball-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace pickleBall {
/**
* Workout type indicating pickleball.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* Fields of PickleBallSummary.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.PickleBallSummary;
/**
* Fields of PickleBallDetail.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.PickleBallDetail;
}
/**
* Namespace of strength training-related functions.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
namespace strengthTraining {
/**
* Workout type indicating strength training.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
const EXERCISE_TYPE: healthStore.SubDataType;
/**
* Strength training summary fields.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type SummaryFields = healthFields.StrengthTrainingSummary;
/**
* Fields of the strength training details.
*
* @syscap SystemCapability.Health.HealthStore.Lite
* @famodelonly
* @since 6.1.1(24)
*/
type DetailFields = healthFields.StrengthTrainingDetail;
}
}
}
export default healthStore;
```
references/JsEtsAPIReference/api26/hms-js/@hms.health.WearEngineLite.d.ts.md
# @hms.health.WearEngineLite.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file This module provides the capability of wear engine in lite wearable.
* @kit WearEngine
*/
/**
* 1. Callback for event changes.
* 2. This callback is used for event listener registration.
*
* @typedef MonitorEventCallback
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
export interface MonitorEventCallback {
/**
* 1. Callback triggered upon an event change.
* 2. This callback is used to notify developers when an event changes.
*
* @param { MonitorEventData } data - 1. Event-related data.
* 2. This parameter is used to notify developers of related data when an event changes.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
eventChange(data: MonitorEventData): void;
/**
* 1. Callback triggered when the listening API is called successfully.
* 2. This callback is triggered when the listening API is called successfully.
*
* @param { number } code - 1. Success return code.
* 2. This callback is triggered when the listening API is called successfully.
* @param { string } [data] - 1. Message returned upon a success.
* 2. This parameter is used to return related information when calling the listening API succeeds.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
success(code: number, data?: string): void;
/**
* 1. Callback triggered when calling the event listening API fails.
* 2. This callback is used to notify developers when calling the listening API fails.
*
* @param { number } code - 1. Error code.
* 2. Error code returned when calling the listening API fails.
* @param { string } [data] - 1. Error message returned upon a failure.
* 2. This parameter is used to return error information when calling the listening API fails.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
fail(code: number, data?: string): void;
}
/**
* 1. Data returned when an event changes.
* 2. This API is used to return related data when the listened event changes.
*
* @typedef MonitorEventData
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
export interface MonitorEventData {
/**
* 1. Type of the event that changes.
* 2. When the listened event changes, this API is used to return the event type.
*
*
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
event: string;
/**
* 1. Data returned when an event change occurs.
* 2. This parameter is used to return related data when an event change occurs.
*
* @type { MonitorData }
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
data: MonitorData;
}
/**
* 1. Data returned when an event change occurs.
* 2. This API is used to return data when the listened event changes.
*
* @typedef MonitorData
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
interface MonitorData {
/**
* 1. Numeric data returned when an event change occurs.
* 2. This API is used to return numeric data when the listened event changes.
*
* @type { number }
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
code: number;
/**
* 1. Character string data returned when an event change occurs.
* 2. This API is used to return character string data when the listened event changes.
*
*
*
* @type { ?string }
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
data?: string;
}
/**
* 1. App information.
* 2. App information is required when the file transfer progress is obtained.
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
export interface AppInfo {
/**
* 1. Package name.
* 2. Package information is required when the file transfer progress is obtained.
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
bundleName: string;
/**
* 1. App fingerprint.
* 2. App fingerprint information is required when the file transfer progress is obtained.
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
fingerprint: string;
}
/**
* 1. Callback for file receiving.
* 2. This callback is required when the file transfer progress is obtained.
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
export interface FileReceiverCallback {
/**
* 1. Receiver of the progress and file information during file transfer.
* 2. This method is used to obtain related information during file transfer.
*
* @param { string } fileName - 1. File name.
* 2. This parameter is used when the file transfer progress is obtained.
* @param { string } filePath - 1. File path.
* 2. This parameter is used when the file transfer progress is obtained.
* @param { number } progress - 1. File receiving progress.
* 2. This parameter is used for file receiving.
* <br>Value range: [0,100]
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
onReceive(fileName: string, filePath: string, progress: number): void;
/**
* 1. Callback triggered when the API is called successfully.
* 2. The callback is used when the file transfer progress is obtained.
*
* @param { number } code - 1. Result code of the API call.
* 2. This parameter is used when the file transfer progress is obtained.
* @param { string } [data] - 1. Detailed description of the result code.
* 2. This parameter is used when the file transfer progress is obtained.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
success(code: number, data?: string): void;
/**
* 1. Callback triggered when the API fails to be called.
* 2. The callback is used when the file transfer progress is obtained.
*
* @param { number } code - 1. Error code of the API call failure.
* 2. This parameter is used when the file transfer progress is obtained.
* @param { string } [data] - 1. Detailed description of the error code.
* 2. This parameter is used when the file transfer progress is obtained.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
*/
fail(code: number, data?: string): void;
}
/**
* 1. Provides an API for developers.
* 2. Used when the API needs to be called.
*
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
*/
export default class WearEngineLite {
/**
* 1. Subscribes to the device connection status.
* 2. This method is used to subscribe to the device connection status.
*
* @param { MonitorEventCallback } callback - 1. Event callback.
* 2. This callback is used to notify developers when the listened event changes.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
* @see [offConnectionStateChange]{@link WearEngineLite.offConnectionStateChange} which cancels the listening to the connection service.
*/
static onConnectionStateChange(callback: MonitorEventCallback): void;
/**
* 1. Cancels the listening to the connection service.
* 2. This method is used to cancel the listening to the connection service.
*
* @param { MonitorEventCallback } [callback] - 1. Connection status event.
* 2. Represents the connection status event for which the listening needs to be canceled.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 6.1.1(24)
* @see [onConnectionStateChange]{@link WearEngineLite.onConnectionStateChange} which subscribes to the device connection status.
*/
static offConnectionStateChange(callback?: MonitorEventCallback): void;
/**
* 1. Registers a file receiver.
* 2. This method is used for receiving files.
*
* @param { AppInfo } remoteAppInfo - 1. App information on the peer device.
* 2. This parameter is used to obtain the file transfer progress.
* @param { FileReceiverCallback } callback - 1. Callback function of the file receiver.
* 2. The callback is used for registering a file receiver.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
* @see [offFileReceive]{@link WearEngineLite.offFileReceive} which unregisters a file receiver.
*/
static onFileReceive(remoteAppInfo: AppInfo, callback: FileReceiverCallback): void;
/**
* 1. Unregisters a file receiver.
* 2. This method is used for unregistering a file receiver.
*
* @param { AppInfo } remoteAppInfo - 1. App information on the peer device.
* 2. This parameter is used to obtain the file transfer progress.
* @param { FileReceiverCallback } [callback] - 1. The specific file‑reception listener to unregister.
* 2. Represents file reception progress event for which the listening needs to be canceled.
* @syscap SystemCapability.Health.WearEngine.Lite
* @famodelonly
* @since 26.0.0
* @see [onFileReceive]{@link WearEngineLite.onFileReceive} which registers a file receiver.
*/
static offFileReceive(remoteAppInfo: AppInfo, callback?: FileReceiverCallback): void;
}
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AccessoryKit.d.ts.md
# @kit.AccessoryKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of accessory kit.
* @kit AccessoryKit
* @since 26.0.0
*/
import accessoryAccessManager from '@hms.collaboration.accessoryAccessManager';
export { accessoryAccessManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AccountKit.d.ts.md
# @kit.AccountKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of account kit.
* @kit AccountKit
* @since 4.1.0(11)
*/
import authentication from '@hms.core.authentication';
import extendService from '@hms.core.account.extendservice';
import { LoginPanel, LoginWithHuaweiIDButton, loginComponentManager } from '@hms.core.account.LoginComponent';
import realName from '@hms.core.account.realname';
import shippingAddress from '@hms.core.account.shippingAddress';
import minorsProtection from '@hms.core.account.minorsProtection';
import invoiceAssistant from '@hms.core.account.invoiceAssistant';
import intimate from '@hms.core.account.intimate';
export { authentication, extendService, LoginPanel, LoginWithHuaweiIDButton, loginComponentManager, realName, shippingAddress, minorsProtection, invoiceAssistant, intimate };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AgentFrameworkKit.d.ts.md
# @kit.AgentFrameworkKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of agent framework kit.
* @kit AgentFrameworkKit
* @since 6.0.0(20)
*/
import { AgentController, BaseOptions, FunctionController, FunctionOptions, ButtonType, FunctionComponent } from '@hms.ai.AgentFramework';
import { Role, TaskState, Part, Message, Artifact, TaskStatus, Task, OnDataCallback, createA2AServer, ProxySender, Server, RequestContext, TaskArtifactParam } from '@hms.ai.A2A';
export { AgentController, BaseOptions, FunctionController, FunctionOptions, ButtonType, FunctionComponent, Role, TaskState, Part, Message, Artifact, TaskStatus, Task, OnDataCallback, createA2AServer, ProxySender, Server, RequestContext, TaskArtifactParam };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AODNavigationKit.d.ts.md
# @kit.AODNavigationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of aod navigation kit.
* @kit AODNavigationKit
* @since 26.0.0
*/
import aodNaviManager from '@hms.phoneService.aod.aodNaviManager';
export { aodNaviManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AppGalleryKit.d.ts.md
# @kit.AppGalleryKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of appgallery kit.
* @kit AppGalleryKit
* @since 5.0.3(15)
*/
import appInfoManager from '@hms.core.appgalleryservice.appInfoManager';
import productViewManager from '@hms.core.appgalleryservice.productViewManager';
import moduleInstallManager from '@hms.core.appgalleryservice.moduleInstallManager';
import updateManager from '@hms.core.appgalleryservice.updateManager';
import attributionManager from '@hms.core.appgalleryservice.attributionManager';
import attributionTestManager from '@hms.core.appgalleryservice.attributionTestManager';
import privacyManager from '@hms.core.appgalleryservice.privacyManager';
import sceneManager from '@hms.bundle.sceneManager';
import commentManager from '@hms.core.appgalleryservice.commentManager';
export { appInfoManager, productViewManager, moduleInstallManager, sceneManager, updateManager, attributionManager, attributionTestManager, privacyManager, commentManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AppLinkingKit.d.ts.md
# @kit.AppLinkingKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of App Linking kit.
* @kit AppLinkingKit
* @since 5.0.3(15)
*/
import deferredLink from '@hms.bundle.applinking.deferredLink';
export { deferredLink };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.AREngine.d.ts.md
# @kit.AREngine.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of AR Engine.
* @kit AREngine
* @since 5.1.0(18)
*/
import arEngine from '@hms.core.ar.arengine';
import { ARView, arViewController } from '@hms.core.ar.arview';
export { arEngine, ARView, arViewController };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CallKit.d.ts.md
# @kit.CallKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of call kit.
* @kit CallKit
* @since 4.1.0(11)
* @deprecated since 5.0.2(14)
* @useinstead kit.CallServiceKit
*/
import voipCall from '@hms.telephony.voipCall';
export { voipCall };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CallServiceKit.d.ts.md
# @kit.CallServiceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of call service kit.
* @kit CallServiceKit
* @since 5.0.2(14)
*/
import voipCall from '@hms.telephony.voipCall';
import CallerInfoQueryExtensionAbility, { CallerInfo } from '@hms.telephony.CallerInfoQueryExtensionAbility';
import CallerInfoQueryExtensionContext from '@hms.telephony.CallerInfoQueryExtensionContext';
import numberIdentify from '@hms.telephony.numberIdentify';
export { voipCall, CallerInfoQueryExtensionAbility, CallerInfo, CallerInfoQueryExtensionContext, numberIdentify };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CarKit.d.ts.md
# @kit.CarKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of car kit.
* @kit CarKit
* @since 4.1.0(11)
*/
import navigationInfoMgr from '@hms.carService.navigationInfoMgr';
import smartMobilityCommon from '@hms.carService.smartMobilityCommon';
export { navigationInfoMgr, smartMobilityCommon };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CloudFoundationKit.d.ts.md
# @kit.CloudFoundationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of cloud foundation kit.
* @kit CloudFoundationKit
* @since 5.0.0(12)
*/
import cloudCommon from '@hms.core.deviceCloudGateway.cloudCommon';
import cloudFunction from '@hms.core.deviceCloudGateway.cloudFunction';
import cloudStorage from '@hms.core.deviceCloudGateway.cloudStorage';
import cloudDatabase from '@hms.core.deviceCloudGateway.cloudDatabase';
import cloudResPrefetch from '@hms.core.deviceCloudGateway.cloudResPrefetch';
export { cloudCommon, cloudFunction, cloudStorage, cloudDatabase, cloudResPrefetch };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ConfidentialSpaceKit.d.ts.md
# @kit.ConfidentialSpaceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of confidential space kit.
* @kit ConfidentialSpaceKit
* @since 26.0.0
*/
import confidentialSpace from '@hms.security.confidentialSpace';
export { confidentialSpace };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CoreSpeechKit.d.ts.md
# @kit.CoreSpeechKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of core speech kit.
* @kit CoreSpeechKit
* @since 4.1.0(11)
*/
import speechRecognizer from '@hms.ai.speechRecognizer';
import textToSpeech from '@hms.ai.textToSpeech';
export { speechRecognizer, textToSpeech };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.CoreVisionKit.d.ts.md
# @kit.CoreVisionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of core vision kit.
* @kit CoreVisionKit
* @since 4.1.0(11)
*/
import textRecognition from '@hms.ai.ocr.textRecognition';
import faceDetector from '@hms.ai.face.faceDetector';
import faceComparator from '@hms.ai.face.faceComparator';
import subjectSegmentation from '@hms.ai.vision.subjectSegmentation';
import visionBase from '@hms.ai.vision.visionBase';
import objectDetection from '@hms.ai.vision.objectDetection';
import skeletonDetection from '@hms.ai.vision.skeletonDetection';
import imageSuperResolution from '@hms.ai.vision.imageSuperResolution';
import textSearchImage from '@hms.ai.vision.textSearchImage';
export { visionBase, textRecognition, faceDetector, faceComparator, subjectSegmentation, objectDetection, skeletonDetection, imageSuperResolution, textSearchImage };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.DataAugmentationKit.d.ts.md
# @kit.DataAugmentationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of DataAugmentationKit.
* @kit DataAugmentationKit
* @since 6.0.0(20)
*/
import rag from '@hms.data.rag';
import retrieval from '@hms.data.retrieval';
import knowledgeProcessor from '@hms.data.knowledgeProcessor';
import localChatModel from '@hms.data.localChatModel';
export { retrieval, rag, knowledgeProcessor, localChatModel };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.DeskTopExtensionKit.d.ts.md
# @kit.DeskTopExtensionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file
* @kit DesktopExtensionKit
* @since 6.0.0(20)
*/
import quickBarManager from '@hms.pcService.quickBarManager';
import statusBarManager from '@hms.pcService.statusBarManager';
import StatusBarViewExtensionAbility from '@hms.pcService.StatusBarViewExtensionAbility';
export { quickBarManager, statusBarManager, StatusBarViewExtensionAbility };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.DeviceSecurityKit.d.ts.md
# @kit.DeviceSecurityKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of Device Security Kit.
* @kit DeviceSecurityKit
* @since since 5.0.0(12)
*/
import safetyDetect from '@hms.security.safetyDetect';
import deviceCertificate from '@hms.security.deviceCertificate';
import securityAudit from '@hms.security.securityAudit';
import trustedAppService from '@hms.security.trustedAppService';
import businessRiskIntelligentDetection from '@hms.security.businessRiskIntelligentDetection';
import antifraudPicker from '@hms.security.antifraudPicker';
import trustedAuthentication from '@hms.security.trustedAuthentication';
import dlpAntiPeep from '@hms.security.dlpAntiPeep';
import superPrivacyMode from '@hms.security.superPrivacyMode';
import riskControlEngine from '@hms.security.riskControlEngine';
import mediaAuthVerify from '@hms.security.mediaAuthVerify';
export { safetyDetect, deviceCertificate, securityAudit, trustedAppService, businessRiskIntelligentDetection, antifraudPicker, trustedAuthentication, dlpAntiPeep, superPrivacyMode, riskControlEngine, mediaAuthVerify };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseDataGuardKit.d.ts.md
# @kit.EnterpriseDataGuardKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file This module providers the capability to mark and control documents.
* @kit EnterpriseDataGuardKit
* @since 4.1.0(11)
*/
import fileGuard from '@hms.pcService.fileGuard';
export { fileGuard, recoveryKey };
import recoveryKey from '@hms.pcService.recoveryKeyService';
```
references/JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseSpaceKit.d.ts.md
# @kit.EnterpriseSpaceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of Enterprise Space kit.
* @kit EnterpriseSpaceKit
* @since 6.0.0(20)
*/
import fileTransfer from '@hms.enterpriseSpaceService.fileTransfer';
import spaceManager from '@hms.enterpriseSpaceService.spaceManager';
export { fileTransfer, spaceManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.EnterpriseThreatProtectionKit.d.ts.md
# @kit.EnterpriseThreatProtectionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of enterprise threat protection kit.
* @kit EnterpriseThreatProtectionKit
* @since 6.1.1(24)
*/
import virusRemediation from '@hms.pcService.virusRemediation';
export { virusRemediation };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.FASTKit.d.ts.md
# @kit.FASTKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of FAST kit.
* @kit FASTKit
* @since 26.0.0
*/
import schedulingOptimization from '@hms.fast.schedulingOptimization';
import mathPrediction from '@hms.fast.mathPrediction';
export { schedulingOptimization, mathPrediction };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.FileManagerServiceKit.d.ts.md
# @kit.FileManagerServiceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of FileManagerServiceKit.
* @kit FileManagerServiceKit
* @since 5.0.5(17)
*/
import fileManagerService from '@hms.filemanagement.fileManagerService';
export { fileManagerService };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.GameServiceKit.d.ts.md
# @kit.GameServiceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of GameServiceKit.
* @kit GameServiceKit
* @since 4.1.0(11)
*/
import gamePlayer from '@hms.core.gameservice.gameplayer';
import gamePerformance from '@hms.core.gameservice.gameperformance';
import gameNearbyTransfer from '@hms.core.gameservice.gamenearbytransfer';
export { gamePlayer, gamePerformance, gameNearbyTransfer };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.GraphicsAccelerateKit.d.ts.md
# @kit.GraphicsAccelerateKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of Graphics Accelerate Kit.
* @kit GraphicsAccelerateKit
* @since 6.0.0(20)
*/
import assetDownloadManager from '@hms.gameAcceleration.assetDownloadManager';
import AssetAccelerationExtensionAbility, { AssetAccelerationExtensionInfo, ContentRequestType } from '@hms.gameAcceleration.AssetAccelerationExtensionAbility';
import AssetAccelerationExtensionContext from '@hms.gameAcceleration.AssetAccelerationExtensionContext';
import launchAcceleration from '@hms.gameAcceleration.launchAcceleration';
import gameBuddyService from '@hms.gameAcceleration.gameBuddyService';
export { assetDownloadManager, AssetAccelerationExtensionAbility, AssetAccelerationExtensionInfo, ContentRequestType, AssetAccelerationExtensionContext, launchAcceleration, gameBuddyService };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.HealthServiceKit.d.ts.md
# @kit.HealthServiceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of HealthServiceKit.
* @kit HealthServiceKit
* @since 5.0.0(12)
*/
import healthStore from '@hms.health.store';
import healthService from '@hms.health.service';
export { healthStore, healthService };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.IAPKit.d.ts.md
# @kit.IAPKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of iap(in-App purchase) kit.
* @kit IAPKit
* @since 4.1.0(11)
*/
import iap from '@hms.core.iap';
import { CashierComponent, cashierComponentManager } from '@hms.core.iap.cashierComponent';
export { iap, CashierComponent, cashierComponentManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.IntentsKit.d.ts.md
# @kit.IntentsKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of intents kit.
* @kit IntentsKit
* @since 4.1.0(11)
*/
import insightIntent from '@hms.ai.insightIntent';
import InsightIntentUIExtensionAbility from '@hms.ai.insightIntent.InsightIntentUIExtensionAbility';
export { insightIntent, InsightIntentUIExtensionAbility };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.LiveViewKit.d.ts.md
# @kit.LiveViewKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
*/
/**
* provider from LiveView Kit APIs
* @file Defines the ability of LiveViewKit
* @kit LiveViewKit
* @since 4.1.0(11)
*/
import liveViewManager from '@hms.core.liveview.liveViewManager';
import LiveViewLockScreenExtensionAbility from '@hms.core.liveview.LiveViewLockScreenExtensionAbility';
import LiveViewLockScreenExtensionContext from '@hms.core.liveview.LiveViewLockScreenExtensionContext';
import LiveViewCardExtensionAbility, { CardInfo } from '@hms.core.liveview.LiveViewCardExtensionAbility';
import LiveViewCardExtensionContext from '@hms.core.liveview.LiveViewCardExtensionContext';
export { liveViewManager, LiveViewLockScreenExtensionAbility, LiveViewLockScreenExtensionContext, LiveViewCardExtensionAbility, LiveViewCardExtensionContext, CardInfo };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.MapKit.d.ts.md
# @kit.MapKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of map kit.
* @kit MapKit
* @since 4.1.0(11)
*/
import mapCommon from '@hms.core.map.mapCommon';
import map from '@hms.core.map.map';
import staticMap from '@hms.core.map.staticMap';
import site from '@hms.core.map.site';
import navi from '@hms.core.map.navi';
import sceneMap from '@hms.core.map.sceneMap';
import petalMaps from '@hms.core.map.petalMaps';
import { MapComponent, customInfoWindowCallback } from '@hms.core.map.MapComponent';
import offlineMapData from '@hms.core.map.offlineMapData';
export { mapCommon, map, MapComponent, staticMap, site, navi, sceneMap, petalMaps, offlineMapData, customInfoWindowCallback };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.NaturalLanguageKit.d.ts.md
# @kit.NaturalLanguageKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
*/
/**
* @file Defines the capabilities of NaturalLanguage kit.
* @kit NaturalLanguageKit
* @since 5.0.0(12)
*/
import { EntityType } from '@hms.ai.nlp.textProcessing';
import textProcessing from '@hms.ai.nlp.textProcessing';
export { textProcessing, EntityType };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.NearLinkKit.d.ts.md
# @kit.NearLinkKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
*/
/**
* @file Defines the capabilities of NearLinkKit.
* @kit NearLinkKit
* @since 5.0.1(13)
*/
import advertising from '@hms.nearlink.advertising';
import scan from '@hms.nearlink.scan';
import constant from '@hms.nearlink.constant';
import manager from '@hms.nearlink.manager';
import remoteDevice from '@hms.nearlink.remoteDevice';
import ssap from '@hms.nearlink.ssap';
import dataTransfer from '@hms.nearlink.dataTransfer';
import cdsm from '@hms.nearlink.cdsm';
export { advertising, scan, constant, manager, remoteDevice, ssap, dataTransfer, cdsm };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.NetworkBoostKit.d.ts.md
# @kit.NetworkBoostKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
*/
/**
* @file Defines the capabilities of NetworkBoostKit.
* @kit NetworkBoostKit
* @since 5.0.0(12)
*/
import netQuality from '@hms.networkboost.netquality';
import netHandover from '@hms.networkboost.handover';
import netBoost from '@hms.networkboost.netBoost';
export { netQuality, netHandover, netBoost };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.OnlineAuthenticationKit.d.ts.md
# @kit.OnlineAuthenticationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2025. All rights reserved.
*/
/**
* @file defines the capabilities of online authentication kit.
* @kit OnlineAuthenticationKit
* @since 4.1.0(11)
*/
import fido from '@hms.security.fido';
import ifaa from '@hms.security.ifaa';
import soter from '@hms.security.soter';
import fido2 from '@hms.security.fido2';
import did from '@hms.security.did';
export { fido, ifaa, soter, fido2, did };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.PaymentKit.d.ts.md
# @kit.PaymentKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of payment kit.
* @kit PaymentKit
* @since 4.1.0(11)
*/
import paymentService from '@hms.core.payment.paymentService';
import ecnyPaymentService from '@hms.core.payment.ecnyPaymentService';
import realNameService from '@hms.core.payment.realNameService';
import thirdPaymentService from '@hms.core.payment.thirdPaymentService';
import promotionService from '@hms.core.payment.promotionService';
export { paymentService, ecnyPaymentService, realNameService, thirdPaymentService, promotionService };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.PDFKit.d.ts.md
# @kit.PDFKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of PDF kit.
* @kit PDFKit
* @since 5.0.0(12)
*/
import pdfService from '@hms.officeservice.pdfservice';
import { pdfViewManager, PdfView } from '@hms.officeservice.PdfView';
export { pdfService, pdfViewManager, PdfView };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.Penkit.d.ts.md
# @kit.Penkit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* provider from Pen Kit APIs
* @file Defines the capabilities of Pen kit.
* @kit Penkit
* @since 5.0.0(12)
*/
import { HandwriteController, HandwriteComponent, PenHspInfo, PenType, HiddenToolType, HiddenConfig } from '@hms.stylus.HandwriteComponent';
import { InstantShapeGenerator, ShapeInfo } from '@hms.stylus.handwrite';
import { PointPredictor, StylusFrameBoost } from '@hms.stylus.handwrite';
import imageFeaturePicker from '@hms.officeservice.imageFeaturePicker';
import stylusInteraction from '@hms.officeservice.stylusInteraction';
export { HandwriteComponent, HandwriteController, PenHspInfo, PenType, HiddenToolType, HiddenConfig };
export { InstantShapeGenerator, ShapeInfo };
export { PointPredictor, StylusFrameBoost };
export { imageFeaturePicker, stylusInteraction };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.PreviewKit.d.ts.md
# @kit.PreviewKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of Preview kit.
* @kit PreviewKit
* @since 4.1.0(11)
*/
import filePreview from '@hms.filemanagement.filepreview';
import openFileBoost from '@hms.pcService.openFileBoost';
export { filePreview };
export { openFileBoost };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.PushKit.d.ts.md
# @kit.PushKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved.
*/
/**
* provider from Push Kit APIs
* @file Defines the ability of PushKit.
* @kit PushKit
* @since 4.1.0(11)
*/
import AAID from '@hms.core.AAID';
import pushCommon from '@hms.core.push.pushCommon';
import PushExtensionAbility from '@hms.core.push.PushExtensionAbility';
import PushExtensionContext from '@hms.core.push.PushExtensionContext';
import pushService from '@hms.core.push.pushService';
import RemoteLocationExtensionAbility from '@hms.core.push.RemoteLocationExtensionAbility';
import RemoteLocationExtensionContext from '@hms.core.push.RemoteLocationExtensionContext';
import RemoteNotificationExtensionAbility from '@hms.core.push.RemoteNotificationExtensionAbility';
import RemoteNotificationExtensionContext from '@hms.core.push.RemoteNotificationExtensionContext';
import serviceNotification from '@hms.core.push.serviceNotification';
import VoIPExtensionAbility from '@hms.core.push.VoIPExtensionAbility';
import VoIPExtensionContext from '@hms.core.push.VoIPExtensionContext';
export { AAID, pushCommon, PushExtensionAbility, PushExtensionContext, pushService, RemoteLocationExtensionAbility, RemoteLocationExtensionContext, RemoteNotificationExtensionAbility, RemoteNotificationExtensionContext, serviceNotification, VoIPExtensionAbility, VoIPExtensionContext };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ReaderKit.d.ts.md
# @kit.ReaderKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of Reader Kit.
* @kit ReaderKit
* @since 5.0.4(16)
*/
import { bookParser } from '@hms.core.readerservice.bookParser';
import { ReadPageComponent, readerCore } from '@hms.core.readerservice.readerComponent';
export { bookParser, ReadPageComponent, readerCore };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.RemoteCommunicationKit.d.ts.md
# @kit.RemoteCommunicationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of remote communication platform.
* @kit RemoteCommunicationKit
* @since 4.1.0(11)
*/
import rcp from '@hms.collaboration.rcp';
import urpc from '@hms.collaboration.urpc';
export { rcp, urpc };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.RingtoneKit.d.ts.md
# @kit.RingtoneKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of ringtone kit.
* @kit RingtoneKit
* @since 5.0.0(12)
*/
import ringtone from '@hms.core.ringtone';
export { ringtone };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ScanKit.d.ts.md
# @kit.ScanKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of Scan Kit.
* @kit ScanKit
* @since 4.1.0(11)
*/
import scanCore from '@hms.core.scan.scanCore';
import scanBarcode from '@hms.core.scan.scanBarcode';
import customScan from '@hms.core.scan.customScan';
import detectBarcode from '@hms.core.scan.detectBarcode';
import generateBarcode from '@hms.core.scan.generateBarcode';
export { scanCore, scanBarcode, customScan, detectBarcode, generateBarcode };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ScenarioFusionKit.d.ts.md
# @kit.ScenarioFusionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of scenario fusion Kit.
* @kit ScenarioFusionKit
* @since 4.1.0(11)
*/
import { FunctionalButton, functionalButtonComponentManager } from '@hms.core.atomicserviceComponent.atomicserviceUi';
import atomicService from '@hms.core.atomicserviceComponent.atomicservice';
import fileUriService from '@hms.core.scenarioFusionComponent.fileUriService';
import { FunctionalInput, functionalInputComponentManager } from '@hms.core.atomicserviceComponent.atomicserviceInput';
export { FunctionalButton, functionalButtonComponentManager, atomicService, fileUriService, FunctionalInput, functionalInputComponentManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ScreenTimeGuardKit.d.ts.md
# @kit.ScreenTimeGuardKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of screen time guard kit.
* @kit ScreenTimeGuardKit
* @since 6.0.0(20)
*/
import guardService from '@hms.utilityApplication.screenTimeGuard.guardService';
import appPicker from '@hms.utilityApplication.screenTimeGuard.appPicker';
import TimeGuardExtensionContext from '@hms.utilityApplication.screenTimeGuard.TimeGuardExtensionContext';
import TimeGuardExtensionAbility from '@hms.utilityApplication.screenTimeGuard.TimeGuardExtensionAbility';
export { guardService, appPicker, TimeGuardExtensionContext, TimeGuardExtensionAbility };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ServiceCollaborationKit.d.ts.md
# @kit.ServiceCollaborationKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of collaboration kit.
* @kit ServiceCollaborationKit
* @since 4.1.0(11)
*/
import { CollaborationCameraBusinessFilter, createCollaborationCameraMenuItems, CollaborationCameraStateDialog } from '@hms.collaboration.camera';
import { CollaborationServiceFilter, createCollaborationServiceMenuItems, CollaborationServiceStateDialog, CollaborationDeviceFilterType } from '@hms.collaboration.service';
import { CollaborationDevicePicker } from '@hms.collaboration.CollaborationDevicePicker';
import devicePicker from '@hms.collaboration.devicePicker';
import serviceInteraction from '@hms.collaboration.serviceInteraction';
export { CollaborationCameraBusinessFilter, createCollaborationCameraMenuItems, CollaborationCameraStateDialog, CollaborationServiceFilter, createCollaborationServiceMenuItems, CollaborationServiceStateDialog, CollaborationDevicePicker, devicePicker, CollaborationDeviceFilterType, serviceInteraction };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ServiceSupportKit.d.ts.md
# @kit.ServiceSupportKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2026-2026. All rights reserved.
*/
/**
* @file Defines the capabilities of ServiceSupportKit.
* @kit ServiceSupportKit
*/
import deviceDetection from '@hms.hiviewdfx.deviceDetection';
export { deviceDetection };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.ShareKit.d.ts.md
# @kit.ShareKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of share kit.
* @kit ShareKit
* @since 4.1.0(11)
*/
import systemShare from '@hms.collaboration.systemShare';
import harmonyShare from '@hms.collaboration.harmonyShare';
export { systemShare, harmonyShare };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.SpatialReconKit.d.ts.md
# @kit.SpatialReconKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved.
*/
/**
* @file Defines the capabilities of Spatial Recon Kit.
* @kit SpatialReconKit
* @since 6.0.1(21)
*/
import spatialRender from '@hms.graphics.spatialRender';
export { spatialRender };
import spatialEdit from '@hms.graphics.spatialEdit';
export { spatialEdit };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.SpeechKit.d.ts.md
# @kit.SpeechKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
*/
/**
* @file Defines the capabilities of speech kit.
* @kit SpeechKit
* @since 5.0.0(12)
*/
import TextReader, { WindowManager, TextReaderIcon, ReadStateCode, TextReaderIconV2, UpReadState } from '@hms.ai.textReader';
import { AICaptionController, AudioInfo, AudioData, AICaptionFontSize, AICaptionOptions, AICaptionComponent } from '@hms.ai.AICaption';
export { TextReader, WindowManager, TextReaderIcon, ReadStateCode, TextReaderIconV2, UpReadState, AICaptionController, AudioInfo, AudioData, AICaptionFontSize, AICaptionOptions, AICaptionComponent };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.StatusBarExtensionKit.d.ts.md
# @kit.StatusBarExtensionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of status bar extension kit.
* @kit StatusBarExtensionKit
* @since 5.0.0(12)
* @deprecated since 6.0.0(20)
* @useinstead kit.DeskTopExtensionKit
*/
import statusBarManager from '@hms.pcService.statusBarManager';
import StatusBarViewExtensionAbility from '@hms.pcService.StatusBarViewExtensionAbility';
export { statusBarManager, StatusBarViewExtensionAbility };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.StoreKit.d.ts.md
# @kit.StoreKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
*
* @file Defines the capabilities of store kit.
* @kit StoreKit
* @since 4.1.0(11)
* @deprecated since 5.0.3(15)
* @useinstead kit.AppGalleryKit
*/
import appInfoManager from '@hms.core.appgalleryservice.appInfoManager';
import productViewManager from '@hms.core.appgalleryservice.productViewManager';
import moduleInstallManager from '@hms.core.appgalleryservice.moduleInstallManager';
import updateManager from '@hms.core.appgalleryservice.updateManager';
import attributionManager from '@hms.core.appgalleryservice.attributionManager';
import attributionTestManager from '@hms.core.appgalleryservice.attributionTestManager';
import privacyManager from '@hms.core.appgalleryservice.privacyManager';
import sceneManager from '@hms.bundle.sceneManager';
export { appInfoManager, productViewManager, moduleInstallManager, sceneManager, updateManager, attributionManager, attributionTestManager, privacyManager };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.UIDesignKit.d.ts.md
# @kit.UIDesignKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2025. All rights reserved.
*/
/**
* @file Defines the capabilities of HDS
* @kit UIDesignKit
* @since 5.0.0(12)
*/
import hdsDrawable from '@hms.hds.hdsDrawable';
import symbolRegister from '@hms.hds.symbolRegister';
import { HdsSideBar } from '@hms.hds.HdsSideBar';
import { HdsSideMenuBadgeParam, HdsSideMenu, HdsSideMenuBaseItemParam, HdsSideMenuMainItemParam, HdsSideMenuSubItemParam, HdsSideMenuMainItem, HdsSideMenuSubItem, } from '@hms.hds.HdsSideMenu';
import { hdsEffect, HdsNavigation, HdsNavigationAttribute, HdsNavDestination, HdsNavDestinationAttribute, ScrollEffectType, BottomBuilderShowType, HideMode, DividerShowType, IconStyleMode, TextStyleMode, HdsNavigationTitleMode, HdsNavDestinationTitleMode, BlurStrategy, NavDestinationBuilder, CustomTransitionDelegate, IconType, HdsNavigationMenuItemOptions, HdsNavigationBackButtonItemOptions, HdsNavigationBackgroundStyle, HdsNavigationTitleStyle, HdsNavigationIconItemStyle, HdsNavigationDividerStyle, HdsTitleBarContentStyle, HdsNavigationTitleBarStyle, ScrollEffectOptions, TitleBarStyleOptions, HdsNavigationBadgeOptions, HdsNavigationIconOptions, HdsNavigationBadgeIconOptions, HdsNavigationMenuContentOptions, HdsNavigationTitle, BottomBuilderParams, HdsNavigationDividerParams, TitleBarContentOptions, PaddingOptions, HdsNavigationTitleBarOptions, NavBarWidthRangeOptions, DynamicHideParams, NestedScrollInfo, WithThemeOptions, SystemMaterialParams, HdsListItemCard, HdsListItemCardOptions, HdsListItemCardAttribute, HdsListItemCardModifier, IconSize, SymbolType, PrefixIconType, ImageType, OnClickCallback, OnChangeCallback, OnSelectCallback, AccessibilityOptions, AccessibilityGroupOptions, AccessibilityGroupControllerOptions, ImageOptions, ImageClickOptions, SymbolGlyphOptions, TextSymbolGlyphOptions, PrefixIconOptions, BadgeOptions, CheckOptions, HdsRadioStyle, HdsRadioIndicatorType, ToggleButtonOptions, TextOptions, ColorOptions, ButtonOptions, SuffixIconOptions, SuffixArrowIconOptions, SuffixArrowIconTextOptions, SelectStyle, PrefixImage, PrefixIcon, PrefixBadge, PrefixSwitch, PrefixToggleButton, PrefixButton, PrefixCustomBuilder, SuffixText, SuffixImage, SuffixLoadingProgress, SuffixRadio, SuffixCheckbox, SuffixSwitch, SuffixArrow, SuffixBadge, SuffixButton, SuffixIcon, SuffixSubIcon, SuffixSelect, SuffixToggleButton, SuffixBadgeAndArrow, SuffixTextAndArrow, SuffixArrowIconText, SuffixCustomBuilder, HdsTabs, HdsTabsAttribute, HdsTabsController, DividerMode, HdsDividerStyle, HdsBarMode, ExtendBarMode, HdsTabsBackgroundStyle, HdsBarWidthRangeOptions, HdsBarStyle, HdsTabsMiniBar, HdsTabsBarChangeMode, BarStyleChangeCallback, HdsTabsFloatingStyle, HdsAnimationMode, HdsTabsModifier, MiniBarAnimationStartCallback, MiniBarAnimationEndCallback, TabBarAnimationStartCallback, HdsBarLayoutMode, MultiWindowEntryInAPPParams, MultiWindowEntryInAPPMenuParams, MultiWindowEntryInAPPIconOptions, MultiWindowEntryInAPPSubtitleOptions, MultiWindowEntryInAPPAttribute, MultiWindowEntryInAPP, TitleSize, BuilderOptions, BuilderType } from '@hms.hds.hdsBaseComponent';
import { HdsActionBar, ActionBarButton, ActionBarButtonOptions, ActionBarStyle, ActionBarStyleOptions } from '@hms.hds.HdsActionBar';
import { HdsSnackBar, SnackBarIconOptions, SnackBarMessageOptions, SnackBarOperationOptions, SnackBarStyleOptions, SnackBarOperationType, SnackBarIconType } from '@hms.hds.HdsSnackBar';
import { bleedIconStyle, SwipeIconType, HdsSwipeActionOptions, HdsListItemStateStylesOptions, MenuStyle, IconOptions, SwipeIconConfigurations, DeleteIconOptions, FullDeleteOptions, HdsListItem } from '@hms.hds.HdsStyle';
import { HdsVisualComponent, HdsVisualComponentAttribute, HdsSceneController, DualEdgeFlowLightWithMaskParam, HdsSceneType } from '@hms.hds.HdsVisualComponent';
import { hdsMaterial } from '@hms.hds.hdsMaterial';
import { HdsColorPicker, HdsColorPickerTabType, HdsColorPickerOptions, HdsColorSelectedCallback, HdsFavoritesUpdateCallback, } from '@hms.hds.HdsColorPicker';
export { hdsMaterial, hdsDrawable, hdsEffect, HdsNavigation, HdsNavigationAttribute, HdsNavDestination, HdsNavDestinationAttribute, ScrollEffectType, BottomBuilderShowType, HideMode, DividerShowType, IconStyleMode, TextStyleMode, HdsNavigationTitleMode, HdsNavDestinationTitleMode, BlurStrategy, NavDestinationBuilder, CustomTransitionDelegate, IconType, HdsNavigationMenuItemOptions, HdsNavigationBackButtonItemOptions, HdsNavigationBackgroundStyle, HdsNavigationTitleStyle, HdsNavigationIconItemStyle, HdsNavigationDividerStyle, HdsTitleBarContentStyle, HdsNavigationTitleBarStyle, ScrollEffectOptions, TitleBarStyleOptions, HdsNavigationBadgeOptions, HdsNavigationIconOptions, HdsNavigationBadgeIconOptions, HdsNavigationMenuContentOptions, HdsNavigationTitle, BottomBuilderParams, HdsNavigationDividerParams, TitleBarContentOptions, PaddingOptions, HdsNavigationTitleBarOptions, NavBarWidthRangeOptions, DynamicHideParams, NestedScrollInfo, WithThemeOptions, SystemMaterialParams, symbolRegister, HdsListItemCard, HdsListItemCardOptions, HdsListItemCardAttribute, HdsListItemCardModifier, HdsSideBar, HdsSideMenuBadgeParam, HdsSideMenu, HdsSideMenuBaseItemParam, HdsSideMenuMainItemParam, HdsSideMenuSubItemParam, HdsSideMenuMainItem, HdsSideMenuSubItem, IconSize, SymbolType, PrefixIconType, ImageType, OnClickCallback, OnChangeCallback, OnSelectCallback, AccessibilityOptions, AccessibilityGroupOptions, AccessibilityGroupControllerOptions, ImageOptions, ImageClickOptions, SymbolGlyphOptions, TextSymbolGlyphOptions, PrefixIconOptions, BadgeOptions, CheckOptions, HdsRadioStyle, HdsRadioIndicatorType, ToggleButtonOptions, TextOptions, ColorOptions, ButtonOptions, SuffixIconOptions, SuffixArrowIconOptions, SuffixArrowIconTextOptions, SelectStyle, PrefixImage, PrefixIcon, PrefixBadge, PrefixSwitch, PrefixToggleButton, PrefixButton, PrefixCustomBuilder, SuffixText, SuffixImage, SuffixLoadingProgress, SuffixRadio, SuffixCheckbox, SuffixSwitch, SuffixArrow, SuffixBadge, SuffixButton, SuffixIcon, SuffixSubIcon, SuffixSelect, SuffixToggleButton, SuffixBadgeAndArrow, SuffixTextAndArrow, SuffixArrowIconText, SuffixCustomBuilder, SwipeIconType, HdsSwipeActionOptions, HdsListItemStateStylesOptions, MenuStyle, IconOptions, SwipeIconConfigurations, DeleteIconOptions, FullDeleteOptions, HdsListItem, HdsActionBar, ActionBarButton, ActionBarButtonOptions, ActionBarStyle, ActionBarStyleOptions, HdsSnackBar, SnackBarIconOptions, SnackBarMessageOptions, SnackBarOperationOptions, SnackBarStyleOptions, SnackBarOperationType, SnackBarIconType, HdsTabs, HdsTabsAttribute, HdsTabsController, DividerMode, HdsDividerStyle, HdsBarMode, ExtendBarMode, HdsTabsBackgroundStyle, HdsBarWidthRangeOptions, HdsBarStyle, HdsTabsMiniBar, HdsTabsBarChangeMode, BarStyleChangeCallback, HdsTabsFloatingStyle, HdsAnimationMode, HdsTabsModifier, MiniBarAnimationStartCallback, MiniBarAnimationEndCallback, TabBarAnimationStartCallback, HdsBarLayoutMode, bleedIconStyle, HdsVisualComponent, HdsVisualComponentAttribute, HdsSceneController, DualEdgeFlowLightWithMaskParam, HdsSceneType, MultiWindowEntryInAPP, MultiWindowEntryInAPPAttribute, MultiWindowEntryInAPPIconOptions, MultiWindowEntryInAPPSubtitleOptions, MultiWindowEntryInAPPMenuParams, MultiWindowEntryInAPPParams, TitleSize, BuilderOptions, BuilderType, HdsColorPicker, HdsColorPickerTabType, HdsColorPickerOptions, HdsColorSelectedCallback, HdsFavoritesUpdateCallback };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.VisionKit.d.ts.md
# @kit.VisionKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved.
*/
/**
* @file Defines the capabilities of vision kit.
* @kit VisionKit
* @since 5.0.0(12)
*/
import interactiveLiveness from '@hms.ai.interactiveLiveness';
import visionImageAnalyzer from '@hms.ai.visionImageAnalyzer';
import { CardRecognition, CallbackParam, CardRecognitionResult, CardType, CardSide, CardRecognitionConfig, CardContentConfig, BankCardConfig, IdCardConfig } from '@hms.ai.CardRecognition';
import { DocumentScanner, DocumentScannerConfig, DocType, FilterId, ShootingMode, EditTab, SaveOption, DocumentScannerResultCallback, DocumentScannerController } from '@hms.ai.DocumentScanner';
export { interactiveLiveness, CardRecognition, CallbackParam, CardRecognitionResult, CardType, CardSide, CardRecognitionConfig, CardContentConfig, BankCardConfig, IdCardConfig, DocumentScanner, DocumentScannerConfig, DocType, FilterId, ShootingMode, EditTab, SaveOption, DocumentScannerResultCallback, DocumentScannerController, visionImageAnalyzer };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.WalletKit.d.ts.md
# @kit.WalletKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
*/
/**
* @file Defines the capabilities of wallet kit.
* @kit WalletKit
* @since 5.0.0(12)
*/
import walletPass from '@hms.core.payment.walletPass';
import walletTransitCard from '@hms.core.payment.walletTransitCard';
export { walletPass, walletTransitCard };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.WearEngine.d.ts.md
# @kit.WearEngine.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of wearEngine.
* @kit WearEngine
* @since 5.0.0(12)
*/
import wearEngine from '@hms.health.wearEngine';
export { wearEngine };
```
references/JsEtsAPIReference/api26/hms-kits/@kit.WeatherServiceKit.d.ts.md
# @kit.WeatherServiceKit.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
*/
/**
* @file Defines the capabilities of WeatherServiceKit.
* @kit WeatherServiceKit
* @since 5.0.0(12)
*/
import weatherService from '@hms.core.weather';
export { weatherService };
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.ability.d.ts.md
# @ohos.ability.ability.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { DataAbilityHelper as _DataAbilityHelper } from './ability/dataAbilityHelper';
import { PacMap as _PacMap } from './ability/dataAbilityHelper';
import { DataAbilityOperation as _DataAbilityOperation } from './ability/dataAbilityOperation';
import { DataAbilityResult as _DataAbilityResult } from './ability/dataAbilityResult';
import { AbilityResult as _AbilityResult } from './ability/abilityResult';
import { ConnectOptions as _ConnectOptions } from './ability/connectOptions';
import { StartAbilityParameter as _StartAbilityParameter } from './ability/startAbilityParameter';
/**
* The module provides all level-2 module APIs for developers to export.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @famodelonly [since 9 - 10]
* @since 9
*/
declare namespace ability {
/**
* Defines the level-2 module DataAbilityHelper.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 9
*/
export type DataAbilityHelper = _DataAbilityHelper;
/**
* Defines the level-2 module PacMap.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly [since 9 - 10]
* @since 9
*/
export type PacMap = _PacMap;
/**
* Defines the level-2 module DataAbilityOperation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 9
*/
export type DataAbilityOperation = _DataAbilityOperation;
/**
* Defines the level-2 module DataAbilityResult.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 9
*/
export type DataAbilityResult = _DataAbilityResult;
/**
* Defines the level-2 module AbilityResult.
*
* @syscap SystemCapability.Ability.AbilityBase
* @famodelonly
* @since 9
*/
export type AbilityResult = _AbilityResult;
/**
* Defines the level-2 module ConnectOptions.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @famodelonly
* @since 9
*/
export type ConnectOptions = _ConnectOptions;
/**
* Defines the level-2 module StartAbilityParameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 9
*/
export type StartAbilityParameter = _StartAbilityParameter;
}
export default ability;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.dataUriUtils.d.ts.md
# @ohos.ability.dataUriUtils.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
*/
/**
* A utility class used for handling objects that use the DataAbilityHelper scheme.
*
* @namespace dataUriUtils
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils
*/
declare namespace dataUriUtils {
/**
* Obtains the ID attached to the end of the path component of the given uri.
*
* @param { string } uri - Indicates the uri object from which the ID is to be obtained.
* @returns { number } Returns the ID attached to the end of the path component;
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#getId
*/
function getId(uri: string): number;
/**
* Attaches the given ID to the end of the path component of the given uri.
*
* @param { string } uri - Indicates the uri string from which the ID is to be obtained.
* @param { number } id - Indicates the ID to attach.
* @returns { string } Returns the uri object with the given ID attached.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#attachId
*/
function attachId(uri: string, id: number): string;
/**
* Deletes the ID from the end of the path component of the given uri.
*
* @param { string } uri - Indicates the uri object from which the ID is to be deleted.
* @returns { string } Returns the uri object with the ID deleted.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#deleteId
*/
function deleteId(uri: string): string;
/**
* Updates the ID in the specified uri
*
* @param { string } uri - Indicates the uri object to be updated.
* @param { number } id - Indicates the new ID.
* @returns { string } Returns the updated uri object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.dataUriUtils/dataUriUtils#updateId
*/
function updateId(uri: string, id: number): string;
}
export default dataUriUtils;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.errorCode.d.ts.md
# @ohos.ability.errorCode.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* Enumerates the error codes that may be returned when an ability is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 6
*/
export enum ErrorCode {
/**
* Permission denied.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 6
*/
PERMISSION_DENY = -3,
/**
* The ability is not found.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 6
*/
ABILITY_NOT_FOUND = -2,
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 6
*/
INVALID_PARAMETER = -1,
/**
* No error.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 6
*/
NO_ERROR = 0
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.featureAbility.d.ts.md
# @ohos.ability.featureAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* # Constraints
*
* The APIs of the FeatureAbility module can be called only by PageAbilities.
*/
import { AsyncCallback } from './@ohos.base';
import Want from './@ohos.app.ability.Want';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { AbilityResult } from './ability/abilityResult';
import { AppVersionInfo as _AppVersionInfo } from './app/appVersionInfo';
import { Context as _Context } from './app/context';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { ConnectOptions } from './ability/connectOptions';
import { ProcessInfo as _ProcessInfo } from './app/processInfo';
import window from './@ohos.window';
/**
* The FeatureAbility module provides APIs that enable user interaction. You can use the APIs to start or terminate an
* ability, obtain a dataAbilityHelper object, obtain the window corresponding to the current ability, and connect to or
* disconnect from a ServiceAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
declare namespace featureAbility {
/**
* Obtains the Want corresponding to the ability to start. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<Want> } callback - Callback used to return the Want.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
function getWant(callback: AsyncCallback<Want>): void;
/**
* Obtains the Want corresponding to the ability to start. This API uses a promise to return the result.
*
* @returns { Promise<Want> } Promise used to return the Want.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
function getWant(): Promise<Want>;
/**
* Starts an ability. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is successful,
* **err** is **undefined** and **data** is **0**; otherwise, **err** is a non-zero value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
function startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>): void;
/**
* Starts an ability. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @returns { Promise<number> } Promise used to return the result. If the operation is successful, **0** is returned;
* otherwise, a non-zero value is returned.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
function startAbility(parameter: StartAbilityParameter): Promise<number>;
/**
* Obtains the application context.
*
* @returns { Context } Application context.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 6
*/
function getContext(): Context;
/**
* Starts an ability. This API uses an asynchronous callback to return the result. The following situations may be
* possible for a started ability:
*
* - Normally, you can call
* [terminateSelfWithResult]{@link featureAbility.terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>)}
* to terminate the ability. The result is returned to the caller.
* - If an exception occurs, for example, the ability is killed, an exception message, in which **resultCode** is
* **-1**, is returned to the caller.
* - If different applications call this API to start an ability that uses the singleton mode and then call
* [terminateSelfWithResult]{@link featureAbility.terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>)}
* to terminate the ability, the normal result is returned to the last caller, and an exception message, in which
* **resultCode** is **-1**, is returned to others.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @param { AsyncCallback<AbilityResult> } callback - Callback used to return the result. If the operation is
* successful, **err** is **undefined** and **data** is an AbilityResult object; otherwise, err is an error
* object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>): void;
/**
* Starts an ability. This API uses a promise to return the result. The following situations may be possible for a
* started ability:
*
* - Normally, you can call
* [terminateSelfWithResult]{@link featureAbility.terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>)}
* to terminate the ability. The result is returned to the caller.
* - If an exception occurs, for example, the ability is killed, an exception message, in which **resultCode** is
* **-1**, is returned to the caller.
* - If different applications call this API to start an ability that uses the singleton mode and then call
* [terminateSelfWithResult]{@link featureAbility.terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>)}
* to terminate the ability, the normal result is returned to the last caller, and an exception message, in which
* **resultCode** is **-1**, is returned to others.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @returns { Promise<AbilityResult> } Promise used to return the result.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function startAbilityForResult(parameter: StartAbilityParameter): Promise<AbilityResult>;
/**
* Terminates this ability. This API uses an asynchronous callback to return the result. If the ability is started by
* calling
* [startAbilityForResult]{@link featureAbility.startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>)}
* , the result is returned to the caller when **terminateSelfWithResult** is called. Otherwise, no result is returned
* to the caller when **terminateSelfWithResult** is called.
*
* @param { AbilityResult } parameter - Result returned after the ability is terminated.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **undefined**; otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
/**
* Terminates this ability. This API uses a promise to return the result. If the ability is started by calling
* [startAbilityForResult]{@link featureAbility.startAbilityForResult(parameter: StartAbilityParameter, callback: AsyncCallback<AbilityResult>)}
* , the result is returned to the caller when **terminateSelfWithResult** is called. Otherwise, no result is returned
* to the caller when **terminateSelfWithResult** is called.
*
* @param { AbilityResult } parameter - Result returned after the ability is terminated.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
/**
* Terminates this ability. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **undefined**; otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelf(callback: AsyncCallback<void>): void;
/**
* Terminates this ability. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelf(): Promise<void>;
/**
* Obtains a dataAbilityHelper object.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
* >
* > To access a DataAbility of another application, the target application must be configured with associated startup
* > (**AssociateWakeUp** set to **true**).
*
* @param { string } uri - URI of the file to open.
* @returns { DataAbilityHelper } A utility class used to help other abilities access the Data ability.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function acquireDataAbilityHelper(uri: string): DataAbilityHelper;
/**
* Checks whether the main window of this ability has the focus. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result.<br>If the main window has the
* focus, **true** is returned. Otherwise, **false** is returned.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function hasWindowFocus(callback: AsyncCallback<boolean>): void;
/**
* Checks whether the main window of this ability has the focus. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. If the main window has the focus, **true** is
* returned. Otherwise, **false** is returned.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function hasWindowFocus(): Promise<boolean>;
/**
* Connects this ability to a ServiceAbility.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
* > > To connect to a ServiceAbility of another application, the target application must be configured with
* > associated startup (**AssociateWakeUp** set to **true**).
*
* @param { Want } request - ServiceAbility to connect.
* @param { ConnectOptions } options - Connection options.
* @returns { number } ID of the connected ServiceAbility. The ID starts from 0 and is incremented by 1 each time a
* connection is set up.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function connectAbility(request: Want, options: ConnectOptions): number;
/**
* Disconnects this ability from a specific ServiceAbility. This API uses an asynchronous callback to return the
* result.
*
* @param { number } connection - ID of the ServiceAbility to disconnect.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the disconnection is successful,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function disconnectAbility(connection: number, callback: AsyncCallback<void>): void;
/**
* Disconnects this ability from a specific ServiceAbility. This API uses a promise to return the result.
*
* @param { number } connection - ID of the ServiceAbility to disconnect.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function disconnectAbility(connection: number): Promise<void>;
/**
* Obtains the window corresponding to this ability. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<window.Window> } callback - Callback used to return the window.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function getWindow(callback: AsyncCallback<window.Window>): void;
/**
* Obtains the window corresponding to this ability. This API uses a promise to return the result.
*
* @returns { Promise<window.Window> } Promise used to return the window.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function getWindow(): Promise<window.Window>;
/**
* Defines the window configuration corresponding to this ability. The configuration is obtained through
* **featureAbility.AbilityWindowConfiguration**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
export enum AbilityWindowConfiguration {
/**
* The PageAbility is in an undefined window display mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_UNDEFINED = 0,
/**
* The PageAbility is in full screen mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_FULLSCREEN = 1,
/**
* The left screen in horizontal direction or the upper screen in vertical direction is the primary window.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_SPLIT_PRIMARY = 100,
/**
* The right screen in horizontal direction or the lower screen in vertical direction is the secondary window.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_SPLIT_SECONDARY = 101,
/**
* The PageAbility is displayed in floating window mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_FLOATING = 102
}
/**
* Defines the window property corresponding to this ability. The **abilityStartSetting** property is an object
* defined in the format of [**key: string]: any**, where **key** is an enumerated value of **
* AbilityStartSetting** and **value** is an enumerated value of **AbilityWindowConfiguration**.
*
* The value is obtained through **featureAbility.AbilityStartSetting**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
export enum AbilityStartSetting {
/**
* Ability window size.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
BOUNDS_KEY = 'abilityBounds',
/**
* Ability window display mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
WINDOW_MODE_KEY = 'windowMode',
/**
* Display device ID.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
DISPLAY_ID_KEY = 'displayId'
}
/**
* Enumerates the error codes that may be returned when an ability is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
export enum ErrorCode {
/**
* No error.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
NO_ERROR = 0,
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
INVALID_PARAMETER = -1,
/**
* The ability is not found.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
ABILITY_NOT_FOUND = -2,
/**
* Permission denied.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
PERMISSION_DENY = -3
}
/**
* Enumerates the operation types of a DataAbility. The DataAbility can use an enumerated value to specify the
* operation type when operating data in batches.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
export enum DataAbilityOperationType {
/**
* Insert operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
TYPE_INSERT = 1,
/**
* Update operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
TYPE_UPDATE = 2,
/**
* Deletion operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
TYPE_DELETE = 3,
/**
* Assert operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
TYPE_ASSERT = 4
}
/**
* Defines the Context module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @famodelonly
* @since 9
*/
export type Context = _Context;
/**
* Defines an AppVersionInfo object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @famodelonly
* @since 9
*/
export type AppVersionInfo = _AppVersionInfo;
/**
* Defines a ProcessInfo object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @famodelonly
* @since 9
*/
export type ProcessInfo = _ProcessInfo;
}
export default featureAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.particleAbility.d.ts.md
# @ohos.ability.particleAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
import { StartAbilityParameter } from './ability/startAbilityParameter';
import { DataAbilityHelper } from './ability/dataAbilityHelper';
import { NotificationRequest } from './notification/notificationRequest';
import { ConnectOptions } from './ability/connectOptions';
import Want from './@ohos.app.ability.Want';
/**
* The particleAbility module provides APIs for operating a DataAbility and ServiceAbility. You can use the APIs to
* start and terminate a ParticleAbility, obtain a dataAbilityHelper object, and connect to or disconnect from a
* ServiceAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
declare namespace particleAbility {
/**
* Starts a ParticleAbility. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the ParticleAbility is started, **err**
* is **undefined**; otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<void>): void;
/**
* Starts a ParticleAbility. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
*
* @param { StartAbilityParameter } parameter - Ability to start.
* @returns { Promise<void> } Promise used to return the result. Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function startAbility(parameter: StartAbilityParameter): Promise<void>;
/**
* Terminates this ParticleAbility. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the ParticleAbility is terminated,
* **err** is **undefined**; otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelf(callback: AsyncCallback<void>): void;
/**
* Terminates this ParticleAbility. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise used to return the result. Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function terminateSelf(): Promise<void>;
/**
* Obtains a dataAbilityHelper object.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
* > To access a DataAbility of another application, the target application must be configured with associated
* > startup (**AssociateWakeUp** set to **true**).
*
* @param { string } uri - URI of the file to open.
* @returns { DataAbilityHelper } A utility class used to help other abilities access a DataAbility.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function acquireDataAbilityHelper(uri: string): DataAbilityHelper;
/**
* Requests a continuous task from the system. This API uses an asynchronous callback to return the result.
*
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param { number } id - Notification ID of the continuous task.
* @param { NotificationRequest } request - Notification parameter, which is used to display information in the
* notification bar.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the continuous task is requested,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @famodelonly
* @since 7
* @deprecated since 9
* @useinstead @ohos.resourceschedule.backgroundTaskManager:backgroundTaskManager.startBackgroundRunning
*/
function startBackgroundRunning(id: number, request: NotificationRequest, callback: AsyncCallback<void>): void;
/**
* Requests a continuous task from the system. This API uses a promise to return the result.
*
* @permission ohos.permission.KEEP_BACKGROUND_RUNNING
* @param { number } id - Notification ID of the continuous task.
* @param { NotificationRequest } request - Notification parameter, which is used to display information in the
* notification bar.
* @returns { Promise<void> } Promise used to return the result. Promise that returns no value.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @famodelonly
* @since 7
* @deprecated since 9
* @useinstead @ohos.resourceschedule.backgroundTaskManager:backgroundTaskManager.startBackgroundRunning
*/
function startBackgroundRunning(id: number, request: NotificationRequest): Promise<void>;
/**
* Requests to cancel a continuous task from the system. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the continuous task is canceled,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @famodelonly
* @since 7
* @deprecated since 9
* @useinstead @ohos.resourceschedule.backgroundTaskManager:backgroundTaskManager.stopBackgroundRunning
*/
function cancelBackgroundRunning(callback: AsyncCallback<void>): void;
/**
* Requests to cancel a continuous task from the system. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise used to return the result. Promise that returns no value.
* @syscap SystemCapability.ResourceSchedule.BackgroundTaskManager.ContinuousTask
* @famodelonly
* @since 7
* @deprecated since 9
* @useinstead @ohos.resourceschedule.backgroundTaskManager:backgroundTaskManager.stopBackgroundRunning
*/
function cancelBackgroundRunning(): Promise<void>;
/**
* Connects this ability to a ServiceAbility.
*
* > **NOTE**
* >
* > For details about the startup rules for the components in the FA model, see
* > [Component Startup Rules (FA Model)](docroot://application-models/component-startup-rules-fa.md).
* > > To connect to a ServiceAbility of another application, the target application must be configured with
* > associated startup (**AssociateWakeUp** set to **true**).
*
* @param { Want } request - ServiceAbility to connect.
* @param { ConnectOptions } options - Connection options.
* @returns { number } ID of the connected ServiceAbility. The ID starts from 0 and is incremented by 1 each time a
* connection is set up.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function connectAbility(request: Want, options: ConnectOptions): number;
/**
* Disconnects this ability from a specific ServiceAbility. This API uses an asynchronous callback to return the
* result.
*
* @param { number } connection - ID of the ServiceAbility to disconnect.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the disconnection is successful,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function disconnectAbility(connection: number, callback: AsyncCallback<void>): void;
/**
* Disconnects this ability from a specific ServiceAbility. This API uses a promise to return the result.
*
* @param { number } connection - ID of the ServiceAbility to disconnect.
* @returns { Promise<void> } Promise used to return the result. Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
function disconnectAbility(connection: number): Promise<void>;
/**
* Enumerates the error codes that may be returned when an ability is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
export enum ErrorCode {
/**
* Invalid parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.FAModel
* @famodelonly
* @since 7
*/
INVALID_PARAMETER = -1
}
}
export default particleAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.screenLockFileManager.d.ts.md
# @ohos.ability.screenLockFileManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (C) 2024-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Sensitive Data Access Management Under Lock Screen
* @kit AbilityKit
*/
/**
* This module provides the capability to protect app sensitive data under the lock screen, supporting requesting and
* releasing access permissions for sensitive data under the lock screen, as well as querying the status of sensitive
* data keys. When the reference count of a sensitive data key reaches zero and the screen has been locked for a
* duration reaching the system-configured lock duration threshold, the key is destroyed, and operations on that data
* become impossible. These keys can be restored only after the screen is unlocked. By calling the
* [acquireAccess]{@link screenLockFileManager.acquireAccess} API of this module, you can prevent the key from being
* destroyed after the screen has been locked for a duration reaching the system-configured lock duration threshold.
*
* > **NOTE**
* >
* > - To enable the sensitive data protection function under the lock screen for an app, you need to configure the
* > ohos.permission.PROTECT_SCREEN_LOCK_DATA permission in
* > [requestPermissions](docroot://security/AccessToken/declare-permissions.md#declaring-permissions-in-the-configuration-file).
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
declare namespace screenLockFileManager {
/**
* Enumerates the types of sensitive data that can be accessed under the lock screen.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum DataType {
/**
* Media data type.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
MEDIA_DATA = 0x00000001,
/**
* All sensitive data types.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ALL_DATA = 0xffffffff
}
/**
* Enumerates the statuses for requesting access permissions for sensitive data under the lock screen.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum AccessStatus {
/**
* The request for access permission for sensitive data under lock screen is denied.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ACCESS_DENIED = -1,
/**
* The request for access permission for sensitive data under lock screen is granted.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
ACCESS_GRANTED = 0
}
/**
* Enumerates the statuses for releasing access permissions for sensitive data under the lock screen.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
export enum ReleaseStatus {
/**
* Release of access permission for sensitive data under lock screen is denied.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
RELEASE_DENIED = -1,
/**
* Release of access permission for sensitive data under lock screen is granted.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
RELEASE_GRANTED = 0
}
/**
* Enumerates the statuses of sensitive data keys under the lock screen.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 18
*/
export enum KeyStatus {
/**
* The key does not exist. This status indicates that the app has not enabled the sensitive data protection function
* under lock screen, or the protection function is unavailable on the current device.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 18
*/
KEY_NOT_EXIST = -2,
/**
* The key has been released. This status indicates that sensitive data under lock screen cannot be operated.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 18
*/
KEY_RELEASED = -1,
/**
* The key exists. This status indicates that sensitive data under lock screen can be operated normally.
*
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 18
*/
KEY_EXIST = 0
}
/**
* Requests the access permission for the caller app's sensitive data under the lock screen in synchronous mode. After
* the request is successful, the reference count of the sensitive data key increases, preventing the key from being
* destroyed after the screen has been locked for a duration reaching the system-configured lock duration threshold.
* This method must be used in pair with [releaseAccess]{@link screenLockFileManager.releaseAccess}.
*
* Before calling this API, ensure that the app has enabled the sensitive data protection function under the lock
* screen, and that the key status queried through the
* [queryAppKeyState]{@link screenLockFileManager.queryAppKeyState} API is KEY_EXIST.
*
* @returns { AccessStatus } Application status for access permission for sensitive data under lock screen.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300002 - The system ability works abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300004 - File access is denied.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
function acquireAccess(): AccessStatus;
/**
* Releases the access permission for the caller app's sensitive data under the lock screen in synchronous mode. After
* the release is successful, the reference count of the sensitive data key decreases. When the count reaches zero,
* the key can be destroyed after the screen has been locked for a duration reaching the system-configured lock
* duration threshold.
*
* Before calling this API, ensure that the app has enabled the sensitive data protection function under the lock
* screen, and that the [acquireAccess]{@link screenLockFileManager.acquireAccess} API has been called to request the
* permission successfully first.
*
* @returns { ReleaseStatus } Release status of the access permission for sensitive data under lock screen.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300002 - The system ability works abnormally.
* @throws { BusinessError } 29300003 - The application is not enabled the data protection under lock screen.
* @throws { BusinessError } 29300005 - File access was not acquired.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 12
*/
function releaseAccess(): ReleaseStatus;
/**
* Queries the status of the caller app's sensitive data key under the lock screen in synchronous mode.
*
* @returns { KeyStatus } Status of the key for sensitive data under lock screen.
* @throws { BusinessError } 801 - The specified SystemCapability name was not found.
* @throws { BusinessError } 29300002 - The system ability works abnormally.
* @syscap SystemCapability.Security.ScreenLockFileManager
* @since 18
*/
function queryAppKeyState(): KeyStatus;
}
export default screenLockFileManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ability.wantConstant.d.ts.md
# @ohos.ability.wantConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
/**
* The module provides the actions, entities, and flags used in Want objects.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant/wantConstant
*/
declare namespace wantConstant {
/**
* Enumerates the action constants of the Want object. **action** specifies the operation to execute.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
export enum Action {
/**
* Action of returning to the home page.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_HOME = 'ohos.want.action.home',
/**
* Action of launching the numeric keypad.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_DIAL = 'ohos.want.action.dial',
/**
* Action of launching the search function.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SEARCH = 'ohos.want.action.search',
/**
* Action of launching the UI that provides wireless network settings, for example, Wi-Fi options.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_WIRELESS_SETTINGS = 'ohos.settings.wireless',
/**
* Action of launching the UI for managing installed applications.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_MANAGE_APPLICATIONS_SETTINGS = 'ohos.settings.manage.applications',
/**
* Action of launching the UI that displays the details of an application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_APPLICATION_DETAILS_SETTINGS = 'ohos.settings.application.details',
/**
* Action of launching the UI for setting the alarm clock.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SET_ALARM = 'ohos.want.action.setAlarm',
/**
* Action of launching the UI that displays all alarms.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SHOW_ALARMS = 'ohos.want.action.showAlarms',
/**
* Action of launching the UI for snoozing an alarm.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SNOOZE_ALARM = 'ohos.want.action.snoozeAlarm',
/**
* Action of launching the UI for deleting an alarm.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_DISMISS_ALARM = 'ohos.want.action.dismissAlarm',
/**
* Action of launching the UI for dismissing a timer.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_DISMISS_TIMER = 'ohos.want.action.dismissTimer',
/**
* Action of launching the UI for sending an SMS message.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SEND_SMS = 'ohos.want.action.sendSms',
/**
* Action of launching the UI for opening a contact or picture.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_CHOOSE = 'ohos.want.action.choose',
/**
* Action of launching the UI for photographing.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
*/
ACTION_IMAGE_CAPTURE = 'ohos.want.action.imageCapture',
/**
* Action of launching the UI for shooting a video.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
*/
ACTION_VIDEO_CAPTURE = 'ohos.want.action.videoCapture',
/**
* Action of launching the UI for application selection.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SELECT = 'ohos.want.action.select',
/**
* Action of launching the UI for sending a single data record.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SEND_DATA = 'ohos.want.action.sendData',
/**
* Action of launching the UI for sending multiple data records.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SEND_MULTIPLE_DATA = 'ohos.want.action.sendMultipleData',
/**
* Action of requesting a media scanner to scan a file and add the file to the media library.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_SCAN_MEDIA_FILE = 'ohos.want.action.scanMediaFile',
/**
* Action of viewing data.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_VIEW_DATA = 'ohos.want.action.viewData',
/**
* Action of editing data.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ACTION_EDIT_DATA = 'ohos.want.action.editData',
/**
* Action of displaying selection options with an action selector.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
INTENT_PARAMS_INTENT = 'ability.want.params.INTENT',
/**
* Title of the character sequence dialog box used with the action selector.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
INTENT_PARAMS_TITLE = 'ability.want.params.TITLE',
/**
* Action of selecting a file.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 7
* @deprecated since 9
*/
ACTION_FILE_SELECT = 'ohos.action.fileSelect',
/**
* URI of the data stream associated with the target when the data is sent. The value must be an array of the string
* type.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 7
* @deprecated since 9
*/
PARAMS_STREAM = 'ability.params.stream',
/**
* Action of providing the OAuth service.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
*/
ACTION_APP_ACCOUNT_OAUTH = 'ohos.account.appAccount.action.oauth'
}
/**
* Enumerates the entity constants of the Want object. **entity** specifies additional information of the target
* ability.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
export enum Entity {
/**
* Default entity. The default entity is used if no entity is specified.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ENTITY_DEFAULT = 'entity.system.default',
/**
* Home screen entity.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ENTITY_HOME = 'entity.system.home',
/**
* Voice interaction entity.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ENTITY_VOICE = 'entity.system.voice',
/**
* Browser type entity.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ENTITY_BROWSABLE = 'entity.system.browsable',
/**
* Video type entity.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
ENTITY_VIDEO = 'entity.system.video'
}
/**
* Enumerates the flags that specify how the Want will be handled.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant/wantConstant#Flags
*/
export enum Flags {
/**
* Grants the permission to read the URI.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_AUTH_READ_URI_PERMISSION
*/
FLAG_AUTH_READ_URI_PERMISSION = 0x00000001,
/**
* Grants the permission to write data to the URI.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_AUTH_WRITE_URI_PERMISSION
*/
FLAG_AUTH_WRITE_URI_PERMISSION = 0x00000002,
/**
* Returns the result to the ability.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_FORWARD_RESULT = 0x00000004,
/**
* Indicates whether the ability on the local device can be continued on a remote device.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_CONTINUATION = 0x00000008,
/**
* Indicates that a component does not belong to OHOS.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_NOT_OHOS_COMPONENT = 0x00000010,
/**
* Indicates that an ability is enabled.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_FORM_ENABLED = 0x00000020,
/**
* Indicates the support for cross-device startup in the distributed scheduler.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITYSLICE_MULTI_DEVICE = 0x00000100,
/**
* Indicates that the ServiceAbility is started regardless of whether the host application has been started.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_START_FOREGROUND_ABILITY = 0x00000200,
/**
* Indicates that the specific ability will be installed if it has not been installed.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
* @useinstead ohos.app.ability.wantConstant/wantConstant.Flags#FLAG_INSTALL_ON_DEMAND
*/
FLAG_INSTALL_ON_DEMAND = 0x00000800,
/**
* Indicates that the specific ability will be installed in the background if it has not been installed.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_INSTALL_WITH_BACKGROUND_MODE = 0x80000000,
/**
* Clears other operation missions. This flag can be set for the Want passed in
* [startAbility]{@link @ohos.ability.featureAbility:featureAbility.startAbility(parameter: StartAbilityParameter, callback: AsyncCallback<number>)}
* . It must be used together with **FLAG_ABILITY_NEW_MISSION**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_CLEAR_MISSION = 0x00008000,
/**
* Creates a mission on the history mission stack.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_NEW_MISSION = 0x10000000,
/**
* Reuses an ability instance if it is on the top of an existing mission stack; creates an ability instance
* otherwise.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 6
* @deprecated since 9
*/
FLAG_ABILITY_MISSION_TOP = 0x20000000
}
}
export default wantConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.abilityAccessCtrl.d.ts.md
# @ohos.abilityAccessCtrl.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Program access control provides permission verification and management capabilities for apps, supporting permission
* status checks before accessing protected resources, runtime authorization requests, settings page authorization
* guidance, and permission status change monitoring. Permissions are divided into three categories: system_grant
* (automatically granted by the system), user_grant (requires manual user authorization), and
* manual_settings (manual setting authorization). Apps must declare the required permissions in the configuration file.
* For details about the permission management mechanism, see
* [Application Permission Management Overview](docroot://security/AccessToken/app-permission-mgmt-overview.md).
*
* This module is mainly used in the following scenarios:
*
* - Before executing a service, verify whether the current app has the permissions required to access protected
* resources.
* - When a permission is not granted, bring up the runtime permission dialog box or the permission settings page to
* request user authorization.
* - Subscribe to permission status change events of the current app, and adjust the service process in a timely manner
* after the permission status changes.
*
* ###### Core Enum Types
*
* - **[GrantStatus]{@link abilityAccessCtrl.GrantStatus}:** Enum for permission authorization status, used to indicate
* the authorization status of the current permission.
* - **[SwitchType]{@link abilityAccessCtrl.SwitchType}:** Enum for global switch types, used to indicate the type of
* system global switch to request.
* - **[PermissionStateChangeType]{@link abilityAccessCtrl.PermissionStateChangeType}:** Enum for permission state
* change types, used to indicate changes such as authorization and deauthorization.
* - **[PermissionStatus]{@link abilityAccessCtrl.PermissionStatus}:** Enum for permission status, used to indicate the
* current permission status.
* - **[SelectedResult]{@link abilityAccessCtrl.SelectedResult}:** Enum for the selection result on the settings page
* authorization, used to indicate the user's selection result in the permission settings dialog box.
*
* ###### Core Interface Types
*
* - **[PermissionStateChangeInfo]{@link abilityAccessCtrl.PermissionStateChangeInfo}:** Permission state change event
* object, used to return the change type, app identity, and permission name.
* - **[PermissionRequestResult]{@link PermissionRequestResult}:** Permission request result object, used to return the
* list of requested permission names, authorization results, and dialog box display results.
* - **[Context]{@link Context}:** Context object, used to initiate a permission request or open the permission
* settings dialog box.
*
* ###### Core Class
*
* - **[AtManager]{@link abilityAccessCtrl.AtManager}:** Program access control management class, providing
* capabilities such as permission verification, permission dialog box request, settings page authorization guidance,
* and permission status monitoring.
*
* 
*
* @file Application Access Control
* @kit AbilityKit
*/
import { AsyncCallback, Callback } from './@ohos.base';
import { Permissions } from './permissions';
import type _Context from './application/Context';
import type _PermissionRequestResult from './security/PermissionRequestResult';
/**
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 8
*/
declare namespace abilityAccessCtrl {
/**
* Creates a program access control management instance for scenarios such as permission verification, runtime
* permission request, settings page authorization guidance, and permission status change monitoring. After the call
* is successful, an AtManager instance is returned, which can be used for subsequent permission management
* operations.
*
* @returns { AtManager } **AtManager** instance obtained.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
*/
function createAtManager(): AtManager;
/**
* Program access control management class, providing capabilities such as permission verification, runtime
* permission dialog box request, settings page authorization guidance, global switch request, and permission
* status monitoring. Obtain an instance through [createAtManager]{@link abilityAccessCtrl.createAtManager}.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice [since 11]
* @since 8
*/
interface AtManager {
/**
* Verifies whether an app has been granted the specified permission. After the call is successful, the
* authorization status of the current permission is returned. The developer can decide accordingly whether to
* directly execute subsequent services, continue to initiate a permission request, or guide the user to go to
* system settings to modify the authorization status. This API uses a promise to return the result.
*
* Applicable to scenarios where a pre-permission check is performed before an app accesses protected resources.
*
* > **NOTE**
* > You are advised to use [checkAccessToken]{@link abilityAccessCtrl.AtManager.checkAccessToken}.
*
* @param { number } tokenID - Identity identifier of the target app to be verified. It can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo
* of BundleInfo. Passing an invalid value returns error code 12100001.
* <br>The value should be an integer. Value constraint: This parameter must be an integer greater than 0.
* <br>
* For BundleInfo acquisition, please refer to: [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* <br>If verifying the current app, it can also be obtained through
* [bundleManager.getBundleInfoForSelfSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoForSelfSync}.
* @param { Permissions } permissionName - Name of the permission to be verified. Passing an invalid value returns
* error code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { Promise<GrantStatus> } Promise used to return the authorization status result.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @since 9
*/
verifyAccessToken(tokenID: number, permissionName: Permissions): Promise<GrantStatus>;
/**
* Verifies whether an app has been granted the specified permission. After the call is successful, the
* authorization status of the current permission is returned, and the developer can decide on subsequent
* operations accordingly. This API uses a promise to return the result.
*
* > **NOTE**
* > This API is supported since API version 8 and deprecated since API version 9. It is recommended to use
* > [checkAccessToken]{@link abilityAccessCtrl.AtManager.checkAccessToken} instead.
*
* @param { number } tokenID - Identity identifier of the target app to be verified. It can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo
* of BundleInfo. Passing an invalid value returns error code 12100001.
* <br>The value should be an integer. Value constraint: This parameter must be an integer greater than 0.
* <br>
* For BundleInfo acquisition, please refer to: [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* <br>If verifying the current app, it can also be obtained through
* [bundleManager.getBundleInfoForSelfSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoForSelfSync}.
* @param { string } permissionName - Name of the permission to be verified. Passing an invalid value returns error
* code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { Promise<GrantStatus> } Promise used to return the authorization status result.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @since 8
* @deprecated since 9
* @useinstead ohos.abilityAccessCtrl.AtManager#checkAccessToken
*/
verifyAccessToken(tokenID: number, permissionName: string): Promise<GrantStatus>;
/**
* Verifies whether an app has been granted the specified permission, and synchronously returns the authorization
* status of the permission. The developer can decide accordingly whether to directly execute subsequent service
* processes, continue to initiate a permission request, or guide the user to go to system settings to modify the
* authorization status.
*
* Applicable to scenarios where a pre-permission check is performed before an app accesses protected resources
* such as the camera, microphone, or location.
*
* It is recommended to use [checkAccessTokenSync]{@link abilityAccessCtrl.AtManager.checkAccessTokenSync} instead.
*
* @param { number } tokenID - Identity identifier of the target app to be verified. It can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo
* of BundleInfo. Passing an invalid value returns error code 12100001.
* <br>The value should be an integer. Value constraint: This parameter must be an integer greater than 0.
* <br>
* For BundleInfo acquisition, please refer to: [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* <br>If verifying the current app, it can also be obtained through
* [bundleManager.getBundleInfoForSelfSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoForSelfSync}.
* @param { Permissions } permissionName - Name of the permission to be verified. Passing an invalid value returns
* error code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { GrantStatus } Permission grant state.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256
* characters.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @since 9
*/
verifyAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus;
/**
* Verifies whether an app has been granted the specified permission. After the call is successful, the
* authorization status of the current permission is returned. The developer can decide accordingly whether to
* directly execute subsequent services, continue to initiate a permission request, or guide the user to go to
* system settings to modify the authorization status. This API uses a promise to return the result.
*
* Applicable to scenarios where a pre-permission check is performed before an app accesses protected resources
* such as the camera, microphone, or location.
*
* @param { number } tokenID - Identity identifier of the target app to be verified. It can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo
* of BundleInfo. Passing an invalid value returns error code 12100001.
* <br>The value should be an integer. Value constraint: This parameter must be an integer greater than 0.
* <br>
* For BundleInfo acquisition, please refer to: [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* <br>If verifying the current app, it can also be obtained through
* [bundleManager.getBundleInfoForSelfSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoForSelfSync}.
* @param { Permissions } permissionName - Name of the permission to be verified. Passing an invalid value returns
* error code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { Promise<GrantStatus> } Promise used to return the authorization status result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256
* characters.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
checkAccessToken(tokenID: number, permissionName: Permissions): Promise<GrantStatus>;
/**
* Verifies whether an app has been granted the specified permission, and synchronously returns the authorization
* status of the permission. The developer can decide accordingly whether to directly execute subsequent service
* processes, continue to initiate a permission request, or guide the user to go to the settings page to modify the
* authorization status.
*
* Compared with [checkAccessToken]{@link abilityAccessCtrl.AtManager.checkAccessToken}, this API returns the
* authorization status synchronously, making it suitable for permission verification scenarios that do not require
* asynchronous processing.
*
* Applicable to scenarios where a pre-permission check is performed before an app accesses protected resources
* such as the camera, microphone, or location.
*
* @param { number } tokenID - Identity identifier of the target app to be verified. It can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo
* of BundleInfo. Passing an invalid value returns error code 12100001.
* <br>The value should be an integer. Value constraint: This parameter must be an integer greater than 0.
* <br>
* For BundleInfo acquisition, please refer to: [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* <br>If verifying the current app, it can also be obtained through
* [bundleManager.getBundleInfoForSelfSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoForSelfSync}.
* @param { Permissions } permissionName - Name of the permission to be verified. Passing an invalid value returns
* error code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { GrantStatus } Permission grant state.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - Invalid parameter. The tokenID is 0, or the permissionName exceeds 256
* characters.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
checkAccessTokenSync(tokenID: number, permissionName: Permissions): GrantStatus;
/**
* Used by <!--RP1-->[UIAbility]{@link @ohos.app.ability.UIAbility:UIAbility}<!--RP1End--> to bring up a dialog box
* to request [user authorization](docroot://security/AccessToken/request-user-authorization.md), and returns the
* authorization result of the permissions requested this time. This API uses an asynchronous callback to return
* the result.
*
* Applicable to scenarios where an app proactively applies for
* [user_grant](docroot://security/AccessToken/app-permission-mgmt-overview.md#user_grant-user-authorization)
* permissions from the user before accessing protected resources for the first time.
*
* If the user denies authorization, the authorization dialog box cannot be brought up again through this API.
* The developer can guide the user to go to the system settings interface for manual authorization, or call
* [requestPermissionOnSetting]{@link abilityAccessCtrl.AtManager.requestPermissionOnSetting} to bring up the
* permission settings dialog box to guide the user to complete authorization.
*
* <!--RP3-->
*
* 
*
* <!--RP3End-->
*
* @param { Context } context - Context of the <!--RP1-->UIAbility<!--RP1End--> requesting the permission.
* <br>If the context of another app, an invalid page, or a non-stage model is passed in, the API may report an
* error or fail to display the dialog box.
* @param { Array<Permissions> } permissionList - List of permission names. It is recommended to pass in only the
* sensitive permissions necessary for the current business scenario, avoiding requesting too many permissions at
* once.
* <br>The minimum length is 1. Value constraint: The permission name can contain a maximum of 256 characters.
* @param { AsyncCallback<PermissionRequestResult> } requestCallback - Callback function. After the call is
* complete, error information is returned through **err**, and the permission request result object is
* returned through **data**. The developer can determine whether the user has authorized, whether a dialog box
* has been displayed, and the reason for failure based on the permission request result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left
* unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - (Deprecated in 12) Invalid parameter. The context is invalid when it
* does not belong to the application itself.
* @throws { BusinessError } 12100009 - Common inner error. An error occurs when creating the pop-up window
* or obtaining user operation results.
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 12]
* @since 9
*/
requestPermissionsFromUser(context: Context, permissionList: Array<Permissions>, requestCallback: AsyncCallback<PermissionRequestResult>): void;
/**
* Used by <!--RP1-->[UIAbility]{@link @ohos.app.ability.UIAbility:UIAbility}<!--RP1End--> to bring up a dialog box
* to request [user authorization](docroot://security/AccessToken/request-user-authorization.md), and returns the
* authorization result of the permissions requested this time. This API uses a promise to return the result.
*
* Applicable to scenarios where an app proactively applies for user_grant permissions from the user before
* accessing protected resources for the first time.
*
* If the user denies authorization, the authorization dialog box cannot be brought up again through this API.
* The developer can guide the user to go to the system settings interface for manual authorization, or call
* [requestPermissionOnSetting]{@link abilityAccessCtrl.AtManager.requestPermissionOnSetting} to bring up the
* permission settings dialog box to guide the user to complete authorization.
*
* @param { Context } context - Context of the <!--RP1-->UIAbility<!--RP1End--> requesting the permission. If the
* context of another app, an invalid page, or a non-stage model is passed in, the API may report an error or fail
* to display the dialog box.
* @param { Array<Permissions> } permissionList - List of permission names. This array cannot be empty. It is
* recommended to pass in only the sensitive permissions necessary for the current business scenario and avoid
* requesting too many permissions at once.
* <br>The minimum length is 1. Value constraint: The length of a permission name cannot exceed 256 characters.
* @returns { Promise<PermissionRequestResult> } Promise used to return the permission request result object, which
* contains information such as the permission array, the authorization result of each permission, whether to
* show a dialog box, and the failure reason.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left
* unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - (Deprecated in 12) Invalid parameter. The context is invalid when it
* does not belong to the application itself.
* @throws { BusinessError } 12100009 - Common inner error. An error occurs when creating the pop-up window or
* obtaining the user operation result. [since 11]
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
requestPermissionsFromUser(context: Context, permissionList: Array<Permissions>): Promise<PermissionRequestResult>;
/**
* Subscribes to permission authorization status change events for a specified permission list of this app,
* using an asynchronous callback. It can be used in scenarios such as updating the UI or service logic
* in real time based on permission status, and monitoring user authorization behavior.
* When monitoring is no longer needed, call [off]{@link abilityAccessCtrl.AtManager.off} to unsubscribe.
*
* - When this subscription API is called for multiple times, if the subscribed permission lists are the same but
* the callbacks are different, the subscription is successful.
* - When this subscription API is called for multiple times, if the subscribed permission lists contain the same
* subset and the callbacks are the same, the subscription fails.
*
* There are two possible scenarios when the permission status changes from "authorized" to "unauthorized":
*
* - User actively revokes: The system will terminate the corresponding app process.
* - System actively reclaims: The app process will not be terminated. A typical scenario is the one-time
* authorization of a security component, which is automatically reclaimed by the system after the authorization
* period ends.
*
* This API is usually used in conjunction with [off]{@link abilityAccessCtrl.AtManager.off}.
* When monitoring is no longer needed, call off to unsubscribe.
*
* @param { 'selfPermissionStateChange' } type - Event type. The value is **'selfPermissionStateChange'**, which
* indicates the changes in the permission states specific to this application alone.
* @param { Array<Permissions> } permissionList - List of permission names to subscribe to. Passing an invalid value
* returns error code 12100001.
* <br>The maximum length is 1024. Value constraint: Each permission name in the list must be a valid permission
* name, and its length cannot exceed 256 characters.
* @param { Callback<PermissionStateChangeInfo> } callback - Callback used to return the result. Callback for
* subscribing to status change events of the specified permission name.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left
* unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - Invalid parameter. Possible causes: 1. The permissionList exceeds
* the size limit; 2. The permissionNames in the list are all invalid.
* @throws { BusinessError } 12100004 - The API is used repeatedly with the same input.
* @throws { BusinessError } 12100005 - The registration time has exceeded the limit.
* @throws { BusinessError } 12100007 - Service exception.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
on(type: 'selfPermissionStateChange', permissionList: Array<Permissions>, callback: Callback<PermissionStateChangeInfo>): void;
/**
* Unsubscribes from permission status change events for the specified permission list of itself. After the
* unsubscription is successful, status change notifications for the specified permission list will no longer be
* received.
*
* This API can be called to unsubscribe in scenarios such as when there is no need to continue monitoring
* permission changes, when the app exits, or when switching pages.
*
* When the callback parameter is not passed in, all callback functions associated with the permissionList will be
* deleted in batch.
*
* This API is usually used in conjunction with [on]{@link abilityAccessCtrl.AtManager.on}
* to cancel the monitoring relationship created through on.
*
* @param { 'selfPermissionStateChange' } type - Type of the unsubscription event, which is fixed as
* 'selfPermissionStateChange', indicating a permission status change event.
* @param { Array<Permissions> } permissionList - List of permission names to unsubscribe from. If empty, it
* indicates unsubscribing from all permission status changes, and must match the permission list used during
* [on]{@link abilityAccessCtrl.AtManager.on} subscription (order insensitive).
* <br>The maximum length is 1024. Value constraint: Each permission name in the list must be a valid permission
* name, and its length cannot exceed 256 characters.
* @param { Callback<PermissionStateChangeInfo> } [callback] - Callback function. Callback for unsubscribing from
* the status change event of the specified permission names. If this parameter is not passed, all callback
* functions associated with permissionList will be deleted in batch.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left
* unspecified; 2. Incorrect parameter types.
* @throws { BusinessError } 12100004 - The API is not used in pair with 'on'.
* @throws { BusinessError } 12100007 - Service exception.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
off(type: 'selfPermissionStateChange', permissionList: Array<Permissions>, callback?: Callback<PermissionStateChangeInfo>): void;
/**
* Used by [UIAbility]{@link @ohos.app.ability.UIAbility:UIAbility}/
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility} to bring up the permission
* settings dialog box for a second time, and returns an array of authorization statuses.
* This API uses a promise to return the result.
*
* Applicable to scenarios where the user has already denied the permission grant in the first dialog box and needs
* to continue applying for the permission through the settings page.
*
* Before calling this API, the app needs to call
* [requestPermissionsFromUser]{@link abilityAccessCtrl.AtManager.requestPermissionsFromUser} first.
* If the user has already authorized in the first dialog box, calling this API will not bring up the
* authorization dialog box.
*
* <!--RP4-->
*
* 
*
* <!--RP4End-->
*
* @param { Context } context - Context of the UIAbility or UIExtensionAbility requesting the permission. If the
* context of another app, an invalid page, or a non-stage model is passed in, the API may report an error or
* fail to display the pop-up window.
* @param { Array<Permissions> } permissionList - List of permission names. This array cannot be empty. Only
* user_grant permissions that have been declared and for which the user has revoked authorization can be
* passed in, and the permissions passed in must belong to the same
* [permission group](docroot://security/AccessToken/app-permission-group-list.md).
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { Promise<Array<GrantStatus>> } Promise used to return an array of authorization statuses. Each element
* in the array corresponds to the authorization result of the respective permission in permissionList.
* @throws { BusinessError } 12100001 - Invalid parameter. Possible causes: 1. The context is invalid
* because it does not belong to the application itself; 2. The permission list contains the permission
* that is not declared in the module.json file; 3. The permission list is invalid because the permissions in it
* do not belong to the same permission group; 4. The permission list contains one or more system_grant
* permissions.
* @throws { BusinessError } 12100009 - Common inner error. An error occurs when creating the pop-up window or
* obtaining the user operation result.
* @throws { BusinessError } 12100010 - The request already exists. [since 12 - 20]
* @throws { BusinessError } 12100011 - All permissions in the permission list have been granted.
* @throws { BusinessError } 12100012 - The permission list contains the permission that has not been
* revoked by the user.
* @throws { BusinessError } 12100014 - Unexpected permission. You cannot request this type of permission
* from users via a pop-up window. [since 21]
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
requestPermissionOnSetting(context: Context, permissionList: Array<Permissions>): Promise<Array<GrantStatus>>;
/**
* Used by [UIAbility]{@link @ohos.app.ability.UIAbility:UIAbility}/
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility} to bring up the permission
* settings page. After the call is successful, the permission settings page will be opened. After the user operates
* on the page, the user's selection result on the settings page will be returned. This API uses a promise to return
* the result.
*
* Applicable to scenarios where
* [manual_settings](docroot://security/AccessToken/app-permission-mgmt-overview.md#manual_settings-manual-authorization)
* type permissions cannot be applied for through the normal authorization dialog box and the user must be
* guided to enter system settings to complete authorization. manual_settings type permissions are permissions that
* can only be manually enabled by the user in system settings and cannot be directly applied for through the normal
* authorization dialog box.
*
* @param { Context } context - Context of the UIAbility or UIExtensionAbility requesting the permission. If the
* context of another app, an invalid page, or a non-stage model is passed in, the API may report an error or
* fail to open the settings page.
* @param { Permissions } permission - Name of the permission for which the settings page needs to be opened. If an
* invalid permission or a permission not declared in module.json is passed in, error code 12100001 is returned.
* Only permissions of the
* [manual_settings](docroot://security/AccessToken/app-permission-mgmt-overview.md#manual_settings-manual-authorization)
* type are supported. If a permission of another type is passed in, error code 12100014 is returned.
* <br>Value constraint: The permission name cannot exceed 256 characters.
* @returns { Promise<SelectedResult> } Promise used to return the user's selection result on the settings page.
* @throws { BusinessError } 12100001 - Invalid parameter. Possible causes: 1. The context is invalid
* because it does not belong to the application itself; 2. The permission is invalid or not
* declared in the module.json file.
* @throws { BusinessError } 12100009 - Common inner error. An error occurs when creating the pop-up window or
* obtaining the user operation result.
* @throws { BusinessError } 12100014 - Unexpected permission. The permission is not a manual_settings
* permission.
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @since 22
*/
openPermissionOnSetting(context: Context, permission: Permissions): Promise<SelectedResult>;
/**
* Used by UIAbility/UIExtensionAbility to bring up the global switch settings dialog box. After the call is
* successful, if the global switch is off, the global switch settings interface will pop up for the user to
* operate. If the global switch is already on, the dialog box will not be brought up and **true** will be returned.
* This API uses a promise to return the result.
*
* Applicable to scenarios that depend on system-level global switches (such as camera, microphone, and location)
* being turned on.
*
* When an app needs to use functions such as the camera, microphone, or location that require global switch
* control, if the corresponding global switch is turned off, the app can bring up this dialog box to request the
* user to turn on the corresponding function. If the current global switch status is on, the dialog box will not
* be brought up.
*
* <!--RP5-->
*
* 
*
* <!--RP5End-->
*
* @param { Context } context - Context of the UIAbility or UIExtensionAbility that requests the global switch. If
* the context of another app, an invalid page, or a non-stage model is passed in, the API may report an error
* or fail to display the dialog box.
* @param { SwitchType } type - Specifies the type of global switch to request to enable.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** indicates the current global
* switch is enabled, and **false** indicates the current global switch is still disabled.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 12100001 - Invalid parameter. Possible causes: 1. The context is invalid because
* it does not belong to the application itself; 2. The type of global switch is not supported.
* @throws { BusinessError } 12100009 - Common inner error. An error occurs when creating the pop-up window
* or obtaining user operation result.
* @throws { BusinessError } 12100013 - The specific global switch is already open.
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
requestGlobalSwitch(context: Context, type: SwitchType): Promise<boolean>;
/**
* Queries the permission status of the current app and returns the result synchronously. After the call is
* successful, the status of the current permission is returned. Unlike
* [checkAccessToken]{@link abilityAccessCtrl.AtManager.checkAccessToken}, this API does not require passing in the
* app identity and is only used to query the permission status of the current app itself.
*
* Applicable to scenarios such as before determining whether to request a permission, confirming the authorization
* result after a permission request, or re-querying after monitoring a permission status change.
*
* @param { Permissions } permissionName - Name of the permission whose status is to be queried. Passing an invalid
* value returns error code 12100001.
* <br>Value constraint: The permission name length cannot exceed 256 characters.
* @returns { PermissionStatus } Permission status.
* @throws { BusinessError } 12100001 - Invalid parameter. The permissionName is empty or exceeds 256 characters.
* @throws { BusinessError } 12100007 - Service exception.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
getSelfPermissionStatus(permissionName: Permissions): PermissionStatus;
}
/**
* Enumerates the permission grant states.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
*/
export enum GrantStatus {
/**
* The permission is not granted.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
*/
PERMISSION_DENIED = -1,
/**
* The permission is granted.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
*/
PERMISSION_GRANTED = 0
}
/**
* Enumerates the results of the dialog box for redirection to the settings page.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @since 22
*/
export enum SelectedResult {
/**
* The user chooses not to go to the settings.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @since 22
*/
REJECTED = -1,
/**
* The user chooses to go to the settings.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @since 22
*/
OPENED = 0,
/**
* The permission has been granted and no dialog box is displayed.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @since 22
*/
GRANTED = 1
}
/**
* Enumerates the operations that trigger permission state changes.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
export enum PermissionStateChangeType {
/**
* Operation to revoke a permission.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
PERMISSION_REVOKED_OPER = 0,
/**
* Operation to grant a permission.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
PERMISSION_GRANTED_OPER = 1
}
/**
* Represents the permission state change details.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
* @name PermissionStateChangeInfo
*/
interface PermissionStateChangeInfo {
/**
* Operation that triggers the permission state change.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
change: PermissionStateChangeType;
/**
* ID of the subscribed application, which can be obtained through the
* [accessTokenId]{@link ./bundleManager/ApplicationInfo:ApplicationInfo.accessTokenId} field in ApplicationInfo of
* BundleInfo. <br>For BundleInfo acquisition, please refer to:
* [bundleManager.getBundleInfoSync]{@link @ohos.bundle.bundleManager:bundleManager.getBundleInfoSync}.
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
tokenID: number;
/**
* Permissions whose authorization state changes. For details about the permissions, see
* [Application Permissions](docroot://security/AccessToken/app-permissions.md).
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 18
*/
permissionName: Permissions;
}
/**
* Enumerates the permission states.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
export enum PermissionStatus {
/**
* The permission is not granted.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
DENIED = -1,
/**
* The permission is granted.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
GRANTED = 0,
/**
* Indicates not operated. The app declares a [user authorization permission]{@link permissions:Permissions} but has
* not yet called the [requestPermissionsFromUser]{@link abilityAccessCtrl.AtManager.requestPermissionsFromUser}
* API to request authorization, or the user has changed the permission status to asking eve
* this value is returned when querying the permission status.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
NOT_DETERMINED = 1,
/**
* The permission is invalid. The application does not
* [declare permissions](docroot://security/AccessToken/declare-permissions.md) or cannot process the request. For
* example, if the status of the approximate location permission is **NOT_DETERMINED**, this value will be returned
* when the status of the precise location permission is queried.
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
INVALID = 2,
/**
* Indicates restricted. <!--RP2-->The app is prohibited from requesting user authorization through the
* [requestPermissionsFromUser]{@link abilityAccessCtrl.AtManager.requestPermissionsFromUser} API. <!--RP2End-->
*
* @syscap SystemCapability.Security.AccessToken
* @FaAndStageModel
* @atomicservice
* @since 20
*/
RESTRICTED = 3
}
/**
* Enumerates the global switch types.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
export enum SwitchType {
/**
* Global switch of the camera.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
CAMERA = 0,
/**
* Global switch of the microphone.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
MICROPHONE = 1,
/**
* Global switch of the location service.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @atomicservice
* @since 12
*/
LOCATION = 2
}
}
export { Permissions };
/**
* Permission request result object, containing information such as the list of requested permission names, the
* authorization result of each permission, the dialog box display result, and the failure reason.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export type PermissionRequestResult = _PermissionRequestResult;
/**
* Provides the context for the ability or application, which can be used to access application resources.
*
* @syscap SystemCapability.Security.AccessToken
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export type Context = _Context;
export default abilityAccessCtrl;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.d.ts.md
# @ohos.accessibility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (C) 2021-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **Accessibility** module implements the accessibility features, including obtaining the accessibility application
* list, accessibility application enabling state, and captions configuration.
*
* @file
* @kit AccessibilityKit
*/
import type { AsyncCallback } from './@ohos.base';
import type { Callback } from './@ohos.base';
import { Resource } from './global/resource';
/**
* Accessibility
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 20]
* @form [since 23]
* @atomicservice [since 11]
* @since 7
*/
declare namespace accessibility {
/**
* Enumerates the types of accessibility applications.
*
* @unionmember { 'audible' } The accessibility application provides audible feedback.
* @unionmember { 'generic' } The accessibility application provides generic feedback.
* @unionmember { 'haptic' } The accessibility application provides haptic feedback.
* @unionmember { 'spoken' } The accessibility application provides spoken feedback.
* @unionmember { 'visual' } The accessibility application provides visual feedback.
* @unionmember { 'all' } All the preceding types. [since 9]
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type AbilityType = 'audible' | 'generic' | 'haptic' | 'spoken' | 'visual' | 'all';
/**
* Target actions supported by the application. The target actions for which parameters need to be set have been
* specified in the description of the following table.
*
* @unionmember { 'accessibilityFocus' } Obtain an accessibility focus.
* @unionmember { 'clearAccessibilityFocus' } Clear an accessibility focus.
* @unionmember { 'focus' } Obtain a focus.
* @unionmember { 'clearFocus' } Clear a focus.
* @unionmember { 'clearSelection' } Clear selection. Not supported yet.
* @unionmember { 'click' } Click.
* @unionmember { 'longClick' } Long press.
* @unionmember { 'cut' } Cut.
* @unionmember { 'copy' } Copy.
* @unionmember { 'paste' } Paste.
* @unionmember { 'select' } Select.
* @unionmember { 'setText' } Set text. You need to set the **setText** parameter.
* @unionmember { 'delete' } Delete. Not supported yet.
* @unionmember { 'scrollForward' } Scroll forward.
* @unionmember { 'scrollBackward' } Scroll backward.
* @unionmember { 'setSelection' } Select. You need to set the **selectTextBegin**, **selectTextEnd** and
* **selectTextInForWard** parameters.
* @unionmember { 'setCursorPosition' } Set cursor location. You need to set the **offset** parameter. [since 12]
* @unionmember { 'home' } Return to the home screen. [since 12]
* @unionmember { 'back' } Return to the previous screen. [since 12]
* @unionmember { 'recentTask' } Open a recent task. [since 12]
* @unionmember { 'notificationCenter' } Open the notification bar. [since 12]
* @unionmember { 'controlCenter' } Open the control center. [since 12]
* @unionmember { 'common' } Common actions used in auto-focusing and auto-broadcasting. [since 12]
* @unionmember { 'injectAction' } Injection action. The **injectActionType** parameter must be set. [since 26.0.0]
* @unionmember {'executeCustomAction'} [since 26.0.0]
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type Action = 'accessibilityFocus' | 'clearAccessibilityFocus' | 'focus' | 'clearFocus' | 'clearSelection' | 'click' | 'longClick' | 'cut' | 'copy' | 'paste' | 'select' | 'setText' | 'delete' | 'scrollForward' | 'scrollBackward' | 'setSelection' | 'setCursorPosition' | 'home' | 'back' | 'recentTask' | 'notificationCenter' | 'controlCenter' | 'common' | 'injectAction' | 'executeCustomAction';
/**
* Accessibility event types.
*
* @unionmember { 'accessibilityFocus' } Event indicating that the accessibility focus is obtained.
* @unionmember { 'accessibilityFocusClear' } Event indicating that the accessibility focus is cleared.
* @unionmember { 'click' } Event of clicking a component.
* @unionmember { 'longClick' } Event indicating that the component is long pressed.
* @unionmember { 'focus' } Event indicating that the component obtains the focus. Not supported currently.
* @unionmember { 'select' } Event of selecting a component.
* @unionmember { 'hoverEnter' } Event indicating that the hover enters a component.
* @unionmember { 'hoverExit' } Event indicating that the hover exits a component.
* @unionmember { 'textUpdate' } Event indicating that the component text has been updated.
* @unionmember { 'textSelectionUpdate' } Event indicating that the selected text has been updated. Not supported
* currently.
* @unionmember { 'scroll' } Event of the scroll view.
* @unionmember { 'requestFocusForAccessibility' } Event of the auto-focusing. [since 12]
* @unionmember { 'announceForAccessibility' } Event of the auto-broadcasting. [since 12]
* @unionmember { 'requestFocusForAccessibilityNotInterrupt' } Event of the auto-focusing without
* interruption. [since 18]
* @unionmember { 'announceForAccessibilityNotInterrupt' } Event of the auto-broadcasting without
* interruption. [since 18]
* @unionmember { 'scrolling' } Event indicating that an item is scrolled out of the screen in the scrolling
* view. [since 18]
* @unionmember { 'pageActive' } Event indicating that a page changes. The value is fixed at **'pageActive'**
* . [since 23]
* @unionmember { 'notificationUpdate' } Event indicating that a notification changes. The value is fixed at
* **'notificationUpdate'**. [since 26.0.0]
* @unionmember {'focusInvisible'} [since 26.0.0]
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type EventType = 'accessibilityFocus' | 'accessibilityFocusClear' | 'click' | 'longClick' | 'focus' | 'select' | 'hoverEnter' | 'hoverExit' | 'textUpdate' | 'textSelectionUpdate' | 'scroll' | 'requestFocusForAccessibility' | 'announceForAccessibility' | 'requestFocusForAccessibilityNotInterrupt' | 'announceForAccessibilityNotInterrupt' | 'scrolling' | 'pageActive' | 'notificationUpdate' | 'focusInvisible';
/**
* Window update type.
*
* @unionmember { 'add' } Window adding.
* @unionmember { 'remove' } Window deletion.
* @unionmember { 'bounds' } Window boundary change.
* @unionmember { 'active' } Window activity change.
* @unionmember { 'focus' } Window focus change.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type WindowUpdateType = 'add' | 'remove' | 'bounds' | 'active' | 'focus';
/**
* Enumerates the states of an accessibility application.
*
* @unionmember { 'enable' } The accessibility application is enabled.
* @unionmember { 'disable' } The accessibility application is disabled.
* @unionmember { 'install' } The accessibility application has been installed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type AbilityState = 'enable' | 'disable' | 'install';
/**
* Enumerates the capabilities of an accessibility application.
*
* @unionmember { 'retrieve' } Capability to retrieve the window content.
* @unionmember { 'touchGuide' } Capability of touch guide mode.
* @unionmember { 'keyEventObserver' } Capability to filter key events.
* @unionmember { 'zoom' } Capability to control the display zoom level. Not supported currently.
* @unionmember { 'gesture' } Capability to perform gesture actions.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type Capability = 'retrieve' | 'touchGuide' | 'keyEventObserver' | 'zoom' | 'gesture';
/**
* Enumerates the movement units for traversing the node text.
*
* @unionmember { 'char' } The movement unit for traversing the node text is by character.
* @unionmember { 'word' } The movement unit for traversing the node text is by word.
* @unionmember { 'line' } The movement unit for traversing the node text is by line.
* @unionmember { 'page' } The movement unit for traversing the node text is by page.
* @unionmember { 'paragraph' } The movement unit for traversing the node text is by paragraph.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type TextMoveUnit = 'char' | 'word' | 'line' | 'page' | 'paragraph';
/**
* Checks whether an accessibility application is enabled. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. Returns **true** if the
* accessibility application is enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 10
* @useinstead accessibility.isOpenAccessibilitySync
*/
function isOpenAccessibility(callback: AsyncCallback<boolean>): void;
/**
* Checks whether an accessibility application is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. Returns **true** if the accessibility application
* is enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 10
* @useinstead accessibility.isOpenAccessibilitySync
*/
function isOpenAccessibility(): Promise<boolean>;
/**
* Checks whether any accessibility application has been enabled in the system. To obtain information about
* accessibility applications in the system, use
* [accessibility.getAccessibilityExtensionListSync]{@link accessibility.getAccessibilityExtensionListSync}.
*
* @returns { boolean } Whether any accessibility application has been enabled in the system. Returns **true** if one
* or more accessibility applications are enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 20]
* @form [since 23]
* @atomicservice [since 11]
* @since 10
*/
function isOpenAccessibilitySync(): boolean;
/**
* Checks whether touch guide mode is enabled. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. Returns **true** if touch guide
* mode is enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @since 7
* @deprecated since 10
* @useinstead accessibility.isOpenTouchGuideSync
*/
function isOpenTouchGuide(callback: AsyncCallback<boolean>): void;
/**
* Checks whether touch guide mode is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. Returns **true** if touch guide mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @since 7
* @deprecated since 10
* @useinstead accessibility.isOpenTouchGuideSync
*/
function isOpenTouchGuide(): Promise<boolean>;
/**
* Checks whether touch guide mode is enabled.
*
* @returns { boolean } Whether touch guide mode is enabled. Returns **true** if touch guide mode is enabled; returns
* **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 11]
* @since 10
*/
function isOpenTouchGuideSync(): boolean;
/**
* Checks whether screen reader mode is enabled.
*
* @returns { boolean } Whether the screen reader is enabled. Returns **true** if the screen reader is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 18
*/
function isScreenReaderOpenSync(): boolean;
/**
* Obtains the accessibility application list. This API uses an asynchronous callback to return the result.
*
* @param { AbilityType } abilityType - Accessibility application type.
* @param { AbilityState } stateType - Accessibility application status.
* @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback - Callback used to return the accessibility
* application list. If the operation is successful, **err** is **undefined** and **data** is the accessibility
* application list. Otherwise, it is an error object.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 9
* @useinstead accessibility.getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback<Array<AccessibilityAbilityInfo>>)
*/
function getAbilityLists(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback<Array<AccessibilityAbilityInfo>>): void;
/**
* Obtains the accessibility application list. This API uses a promise to return the result.
*
* @param { AbilityType } abilityType - Accessibility application type.
* @param { AbilityState } stateType - Accessibility application status.
* @returns { Promise<Array<AccessibilityAbilityInfo>> } Promise used to return the accessibility application list.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 9
* @useinstead accessibility.getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState)
*/
function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise<Array<AccessibilityAbilityInfo>>;
/**
* Obtains the accessibility application list. This API uses a promise to return the result.
*
* @param { AbilityType } abilityType - Accessibility application type.
* @param { AbilityState } stateType - Accessibility application status.
* @returns { Promise<Array<AccessibilityAbilityInfo>> } Promise used to return the accessibility application list.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 9
*/
function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState): Promise<Array<AccessibilityAbilityInfo>>;
/**
* Obtains the accessibility application list. This API uses an asynchronous callback to return the result.
*
* @param { AbilityType } abilityType - Accessibility application type.
* @param { AbilityState } stateType - Accessibility application status.
* @param { AsyncCallback<Array<AccessibilityAbilityInfo>> } callback - Callback used to return the accessibility
* application list. If the operation is successful, **err** is **undefined** and **data** is the accessibility
* application list. Otherwise, it is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 9
*/
function getAccessibilityExtensionList(abilityType: AbilityType, stateType: AbilityState, callback: AsyncCallback<Array<AccessibilityAbilityInfo>>): void;
/**
* Query the list of accessibility applications in the current system, which can be queried by criteria.
*
* @param { AbilityType } abilityType - Accessibility application type.
* @param { AbilityState } stateType - Accessibility application status.
* @returns { Array<AccessibilityAbilityInfo> } Promise used to return the accessibility application list.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
function getAccessibilityExtensionListSync(abilityType: AbilityType, stateType: AbilityState): Array<AccessibilityAbilityInfo>;
/**
* Sends an accessibility event. This API uses an asynchronous callback to return the result.
*
* @param { EventInfo } event - Accessibility event.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation fails, **err** that
* contains data is returned.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 9
* @useinstead accessibility.sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback<void>)
*/
function sendEvent(event: EventInfo, callback: AsyncCallback<void>): void;
/**
* Sends an accessibility event. This API uses a promise to return the result.
*
* @param { EventInfo } event - Accessibility event.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 7
* @deprecated since 9
* @useinstead accessibility.sendAccessibilityEvent(event: EventInfo)
*/
function sendEvent(event: EventInfo): Promise<void>;
/**
* Sends an accessibility event. This API uses an asynchronous callback to return the result.
*
* @param { EventInfo } event - Accessibility event.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation fails, **err** that
* contains data is returned.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 9
*/
function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback<void>): void;
/**
* Sends an accessibility event. This API uses a promise to return the result.
*
* @param { EventInfo } event - Accessibility event.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 9
*/
function sendAccessibilityEvent(event: EventInfo): Promise<void>;
/**
* Queries single- or double-touch mode.
*
* @returns { string } Touch mode.
* <br>- **singleTouchMode**: Single-touch mode.
* <br>- **doubleTouchMode**: Double-touch mode.
* <br>- **none**: Touch guide mode is disabled.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 20
*/
function getTouchModeSync(): string;
/**
* Subscribes to the state changes of the accessibility application. This API uses an asynchronous callback to return
* the result. To obtain information about accessibility applications in the system, use
* [accessibility.getAccessibilityExtensionListSync]{@link accessibility.getAccessibilityExtensionListSync}.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.off('accessibilityStateChange')]{@link accessibility.off(type: 'accessibilityStateChange', callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'accessibilityStateChange' } type - Event type, which is set to **'accessibilityStateChange'** in this
* API.
* @param { Callback<boolean> } callback - Callback invoked when the enabled status of accessibility application
* changes. The returned result indicates the global enabled status of the accessibility application. The value
* **true** indicates that the accessibility application is enabled, and **false** indicates that the
* accessibility application is disabled.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 20]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
function on(type: 'accessibilityStateChange', callback: Callback<boolean>): void;
/**
* Subscribes to the state changes in touch guide mode. This API uses an asynchronous callback to return the result.
* To obtain information about accessibility applications in the system, use
* [accessibility.getAccessibilityExtensionListSync]{@link accessibility.getAccessibilityExtensionListSync}.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.off('touchGuideStateChange')]{@link accessibility.off(type: 'touchGuideStateChange', callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'touchGuideStateChange' } type - Event type, which is set to **'touchGuideStateChange'** in this API.
* @param { Callback<boolean> } callback - Callback invoked when the enabling state of touch guide mode changes. The
* value **true** indicates that the touch guide mode is enabled, and the value **false** indicates that the touch
* guide mode is disabled.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Vision
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
function on(type: 'touchGuideStateChange', callback: Callback<boolean>): void;
/**
* Subscribes to the state changes of the screen reader. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.off('screenReaderStateChange')]{@link accessibility.off(type: 'screenReaderStateChange', callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'screenReaderStateChange' } type - Event type, which is set to **'screenReaderStateChange'** in this API.
* @param { Callback<boolean> } callback - Callback invoked when the enabling state of screen reader changes. The
* value **true** indicates that the screen reader is enabled, and the value **false** indicates that the screen
* reader is disabled.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 18
*/
function on(type: 'screenReaderStateChange', callback: Callback<boolean>): void;
/**
* Subscribes to the single- or double-touch event changes in touch guide mode. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.off('touchModeChange')]{@link accessibility.off(type: 'touchModeChange', callback?: Callback<string>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'touchModeChange' } type - Event type, which is set to **'touchModeChange'** in this API.
* @param { Callback<string> } callback - Callback to be invoked when the single- or double-touch event changes.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
* Incorrect parameter types. 3.Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 20
*/
function on(type: 'touchModeChange', callback: Callback<string>): void;
/**
* Unsubscribes from the state changes of the accessibility application. This API uses an asynchronous callback to
* return the result.
*
* @param { 'accessibilityStateChange' } type - Event type, which is set to **'accessibilityStateChange'** in this
* API.
* @param { Callback<boolean> } callback - Callback used to unregister. It must be consistent with the callback used
* in
* [accessibility.on('accessibilityStateChange')]{@link accessibility.on(type: 'accessibilityStateChange', callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type. [since 7 - 19]
* @param { Callback<boolean> } [callback] - Callback used to unregister. It must be consistent with the callback used
* in
* [accessibility.on('accessibilityStateChange')]{@link accessibility.on(type: 'accessibilityStateChange', callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type. [since 20]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 20]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
function off(type: 'accessibilityStateChange', callback?: Callback<boolean>): void;
/**
* Unsubscribes from the state changes in touch guide mode. This API uses an asynchronous callback to return the
* result.
*
* @param { 'touchGuideStateChange' } type - Event type, which is set to **'touchGuideStateChange'** in this API.
* @param { Callback<boolean> } [callback] - Callback used to unregister. It must be consistent with the callback used
* in
* [accessibility.on('touchGuideStateChange')]{@link accessibility.on(type: 'touchGuideStateChange', callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
function off(type: 'touchGuideStateChange', callback?: Callback<boolean>): void;
/**
* Unsubscribes from the state changes of the screen reader. This API uses an asynchronous callback to return the
* result.
*
* @param { 'screenReaderStateChange' } type - Event type, which is set to **'screenReaderStateChange'** in this API.
* @param { Callback<boolean> } [callback] - Callback used to unregister. It must be consistent with the callback used
* in
* [accessibility.on('screenReaderStateChange')]{@link accessibility.on(type: 'screenReaderStateChange', callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 18
*/
function off(type: 'screenReaderStateChange', callback?: Callback<boolean>): void;
/**
* Unsubscribes from the single- or double-touch event changes in touch guide mode. This API uses an asynchronous
* callback to return the result.
*
* @param { 'touchModeChange' } type - Event type, which is set to **'touchModeChange'** in this API.
* @param { Callback<string> } [callback] - Callback used to unregister. The value must be the same as the value of
* callback in
* [accessibility.on('touchModeChange')]{@link accessibility.on(type: 'touchModeChange', callback: Callback<string>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. 2.
* Incorrect parameter types. 3.Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 20
*/
function off(type: 'touchModeChange', callback?: Callback<string>): void;
/**
* Obtains a **CaptionsManager** instance.
*
* @returns { CaptionsManager } Captions configuration.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @deprecated since 12
*/
function getCaptionsManager(): CaptionsManager;
/**
* Subscribes to the state changes in animation reduction mode. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.offAnimationReduceStateChange]{@link accessibility.offAnimationReduceStateChange(callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { Callback<boolean> } callback - Callback function. Returns **true** if animation reduction mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function onAnimationReduceStateChange(callback: Callback<boolean>): void;
/**
* Unsubscribes from the state changes in animation reduction mode. This API uses an asynchronous callback to return
* the result.
*
* @param { Callback<boolean> } [callback] - Callback function. Cancels the event response of a specified callback
* object. The value must be the same as the value of callback in
* [accessibility.onAnimationReduceStateChange]{@link accessibility.onAnimationReduceStateChange(callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function offAnimationReduceStateChange(callback?: Callback<boolean>): void;
/**
* Checks whether animation reduction mode is enabled with a synchronous method.
*
* @returns { boolean } Whether animation reduction mode is enabled. Returns **true** if animation reduction mode is
* enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isAnimationReduceEnabledSync(): boolean;
/**
* Checks whether animation reduction mode is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. Returns **true** if animation reduction mode is
* enabled; returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isAnimationReduceEnabled(): Promise<boolean>;
/**
* Subscribes to the state changes in flash alerts mode. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.offFlashReminderStateChange]{@link accessibility.offFlashReminderStateChange(callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { Callback<boolean> } callback - Callback function. Returns **true** if flash alerts mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function onFlashReminderStateChange(callback: Callback<boolean>): void;
/**
* Unsubscribes from the state changes in flash alerts mode. This API uses an asynchronous callback to return the
* result.
*
* @param { Callback<boolean> } [callback] - Callback function. Cancels the event response of a specified callback
* object. The value must be the same as the value of callback in
* [accessibility.onFlashReminderStateChange]{@link accessibility.onFlashReminderStateChange(callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function offFlashReminderStateChange(callback?: Callback<boolean>): void;
/**
* Checks whether flash alerts mode is enabled with a synchronous method.
*
* @returns { boolean } Whether flash alerts mode is enabled. Returns **true** if flash alerts mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isFlashReminderEnabledSync(): boolean;
/**
* Checks whether flash alerts mode is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. Returns **true** if flash alerts mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isFlashReminderEnabled(): Promise<boolean>;
/**
* Subscribes to the state changes in mono audio mode. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.offAudioMonoStateChange]{@link accessibility.offAudioMonoStateChange(callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { Callback<boolean> } callback - Callback function. Returns **true** if mono audio mode is enabled; returns
* **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function onAudioMonoStateChange(callback: Callback<boolean>): void;
/**
* Unsubscribes from the state changes in mono audio mode. This API uses an asynchronous callback to return the
* result.
*
* @param { Callback<boolean> } [callback] - Callback function. Cancels the event response of a specified callback
* object. The value must be the same as the value of callback in
* [accessibility.onAudioMonoStateChange]{@link accessibility.onAudioMonoStateChange(callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function offAudioMonoStateChange(callback?: Callback<boolean>): void;
/**
* Checks whether mono audio mode is enabled with a synchronous mode.
*
* @returns { boolean } Whether mono audio mode is enabled. Returns **true** if mono audio mode is enabled; returns
* **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isAudioMonoEnabledSync(): boolean;
/**
* Checks whether mono audio mode is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. Returns **true** if mono audio mode is enabled;
* returns **false** otherwise.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 23
*/
function isAudioMonoEnabled(): Promise<boolean>;
/**
* Checks whether the senior mode is enabled. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** indicates that the senior mode
* is enabled, and the value **false** indicates that the senior mode is disabled.
* @throws { BusinessError } 9300000 - System abnormality.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function isSeniorModeEnabled(): Promise<boolean>;
/**
* Listens for enabling status changes of the senior mode. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [accessibility.offSeniorModeStateChange]{@link accessibility.offSeniorModeStateChange(callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { Callback<boolean> } callback - Callback function. The value **true** indicates that the senior mode is
* enabled, and the value **false** indicates that the senior mode is disabled.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function onSeniorModeStateChange(callback: Callback<boolean>): void;
/**
* Cancels listening for the senior mode change event. This API uses an asynchronous callback to return the result.
*
* @param { Callback<boolean> } [callback] - Callback function. The value **true** indicates that the senior mode is
* enabled, and the value **false** indicates that the senior mode is disabled. Cancels the event response of a
* specified callback object. It must be consistent with the callback used in
* [accessibility.onSeniorModeStateChange]{@link accessibility.onSeniorModeStateChange(callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function offSeniorModeStateChange(callback?: Callback<boolean>): void;
/**
* Register an observer for this application's senior mode state changes.
*
* @param { Callback<boolean> } callback - Asynchronous callback interface.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function onSeniorModeStateChangeForSelf(callback: Callback<boolean>): void;
/**
* Unregister the observer for this application's senior mode state changes.
*
* @param { Callback<boolean> } [callback] - Asynchronous callback interface.
* <br>Default behavior: Unregister all callbacks for app senior mode state changes.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function offSeniorModeStateChangeForSelf(callback?: Callback<boolean>): void;
/**
* Check if this application's senior mode is enabled.
*
* @returns { Promise<boolean> } Returns {@code true} if senior mode is enabled; returns {@code false} otherwise.
* @throws { BusinessError } 9300000 - System abnormality.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function getSeniorModeStateForSelf(): Promise<boolean>;
/**
* Set this application's senior mode.
*
* @param { boolean } state - Indicates whether to enable senior mode for this application.
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 9300000 - System abnormality.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 26.0.0
*/
function setSeniorModeStateForSelf(state: boolean): Promise<void>;
/**
* Implements configuration management for captions. Before calling any API of **CaptionsManager**, you must use the
* [accessibility.getCaptionsManager()]{@link accessibility.getCaptionsManager} API to obtain a **CaptionsManager**
* instance.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
interface CaptionsManager {
/**
* Whether to enable captions configuration. The value **true** indicates that the caption configuration is enabled,
* and **false** indicates the opposite.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
enabled: boolean;
/**
* Style of captions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
style: CaptionsStyle;
/**
* Subscribes to the state changes of captions configuration. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [off('enableChange')]{@link accessibility.CaptionsManager.off(type: 'enableChange', callback?: Callback<boolean>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'enableChange' } type - Event type, which is set to **'enableChange'** in this API.
* @param { Callback<boolean> } callback - Callback invoked when the enabled status of captions configuration
* changes. The value **true** indicates that the subtitle configuration is enabled, and the value **false**
* indicates that the subtitle configuration is disabled.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @deprecated since 12
*/
on(type: 'enableChange', callback: Callback<boolean>): void;
/**
* Subscribes to captions style changes. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - The callback parameter for registering a listener must use a named function instead of an anonymous function.
* > Otherwise, a new underlying object is created each time the function is called, causing memory leakage.
* >
* > - After calling this method, you must use
* > [off('styleChange')]{@link accessibility.CaptionsManager.off(type: 'styleChange', callback?: Callback<CaptionsStyle>)}
* > to cancel the listener before the object's lifecycle ends. Otherwise, a crash may occur.
*
* @param { 'styleChange' } type - Event type, which is set to **'styleChange'** in this API.
* @param { Callback<CaptionsStyle> } callback - Callback invoked when the style of captions changes.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @deprecated since 12
*/
on(type: 'styleChange', callback: Callback<CaptionsStyle>): void;
/**
* Unsubscribes from the state changes of captions configuration. This API uses an asynchronous callback to return
* the result.
*
* @param { 'enableChange' } type - Event type, which is set to **'enableChange'** in this API.
* @param { Callback<boolean> } [callback] - Callback used to unregister. It must be consistent with the callback
* used in
* [on('enableChange')]{@link accessibility.CaptionsManager.on(type: 'enableChange', callback: Callback<boolean>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @deprecated since 12
*/
off(type: 'enableChange', callback?: Callback<boolean>): void;
/**
* Unsubscribes from the captions style changes. This API uses an asynchronous callback to return the result.
*
* @param { 'styleChange' } type - Event type, which is set to **'styleChange'** in this API.
* @param { Callback<CaptionsStyle> } [callback] - Callback used to unregister. It must be consistent with the
* callback used in
* [on('styleChange')]{@link accessibility.CaptionsManager.on(type: 'styleChange', callback: Callback<CaptionsStyle>)}
* . If this parameter is not specified, listening will be disabled for all callbacks corresponding to the
* specified type.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @since 8
* @deprecated since 12
*/
off(type: 'styleChange', callback?: Callback<CaptionsStyle>): void;
}
/**
* Enumerates the font edge types of captions.
*
* @unionmember { 'none' } No effect.
* @unionmember { 'raised' } Raised effect.
* @unionmember { 'depressed' } Depressed effect.
* @unionmember { 'uniform' } Uniform effect.
* @unionmember { 'dropShadow' } Drop shadow effect.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
type CaptionsFontEdgeType = 'none' | 'raised' | 'depressed' | 'uniform' | 'dropShadow';
/**
* Enumerates the font families of captions.
*
* @unionmember { 'default' } Default font family.
* @unionmember { 'monospacedSerif' } Monospaced Serif fonts, which use the same width for each character.
* @unionmember { 'serif' } Serif fonts.
* @unionmember { 'monospacedSansSerif' } Monospaced Sans Serif fonts, which use the same width for each character.
* @unionmember { 'sansSerif' } Sans Serif fonts.
* @unionmember { 'casual' } Casual fonts.
* @unionmember { 'cursive' } Cursive fonts.
* @unionmember { 'smallCapitals' } Small caps fonts.
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
type CaptionsFontFamily = 'default' | 'monospacedSerif' | 'serif' | 'monospacedSansSerif' | 'sansSerif' | 'casual' | 'cursive' | 'smallCapitals';
/**
* Describes the style of captions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
interface CaptionsStyle {
/**
* Font family of captions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
fontFamily: CaptionsFontFamily;
/**
* Font scale factor of captions, in percentage. The value ranges from 1 to 200.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
fontScale: number;
/**
* Font color of captions.
*
* **number**: HEX format, used to represent colors defined in either the RGB or ARGB color models.
*
* **string**: #rrggbb, #rrggbbaa, #rgb, or #rgba format.
*
* Example: opaque red; number: 0xffff0000; string: '#ff0000', '#ff0000ff', '#f00', or '#f00f'
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
fontColor: number | string;
/**
* Font edge type of captions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
fontEdgeType: CaptionsFontEdgeType;
/**
* Background color of captions.
*
* **number**: HEX format, used to represent colors defined in either the RGB or ARGB color models.
*
* **string**: #rrggbb, #rrggbbaa, #rgb, or #rgba format.
*
* Example: opaque red; number: 0xffff0000; string: '#ff0000', '#ff0000ff', '#f00', or '#f00f'
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
backgroundColor: number | string;
/**
* Window color of captions.
*
* **number**: HEX format, used to represent colors defined in either the RGB or ARGB color models.
*
* **string**: #rrggbb, #rrggbbaa, #rgb, or #rgba format.
*
* Example: opaque red; number: 0xffff0000; string: '#ff0000', '#ff0000ff', '#f00', or '#f00f'
*
* @syscap SystemCapability.BarrierFree.Accessibility.Hearing
* @form [since 23]
* @atomicservice [since 23]
* @since 8
*/
windowColor: number | string;
}
/**
* Provides information about an accessibility application.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
interface AccessibilityAbilityInfo {
/**
* Ability ID.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly id: string;
/**
* Ability name.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly name: string;
/**
* Bundle name.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly bundleName: string;
/**
* Name of the target bundle.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 9
*/
readonly targetBundleNames: Array<string>;
/**
* Accessibility application type.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly abilityTypes: Array<AbilityType>;
/**
* Capabilities list of the accessibility application.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly capabilities: Array<Capability>;
/**
* Description of the accessibility application.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly description: string;
/**
* List of events that the accessibility application focuses on.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
readonly eventTypes: Array<EventType>;
/**
* Whether the auxiliary application is hidden in the list of installed extended services. The value **true** means
* the auxiliary application is hidden, and the value **false** means the opposite.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
readonly needHide: boolean;
/**
* Name of the application in the extended service list.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
readonly label: string;
}
/**
* Describes a GUI change event.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
class EventInfo {
/**
* Constructor, which is used to construct an EventInfo instance using a JSON object.
*
* @param { Object } jsonObject - JSON object that contains the **type**, **bundleName**, and **triggerAction**
* fields.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
constructor(jsonObject: Object);
/**
* Constructor, which is used to construct an EventInfo instance using independent parameters.
*
* @param { EventType } type - Accessibility event types.
* @param { string } bundleName - Target application name.
* @param { Action } triggerAction - Action that triggers the event.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 11
*/
constructor(type: EventType, bundleName: string, triggerAction: Action);
/**
* Accessibility event type (mandatory).
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
type: EventType;
/**
* Window update type.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
windowUpdateType?: WindowUpdateType;
/**
* Name of the target application (mandatory).
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
bundleName: string;
/**
* It should correspond to the event source component type, and the default value is empty.
*
* Example:
*
* - Button type - > 'Button'
* - Image type - > 'Image'
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
componentType?: string;
/**
* ID of the page where the event occurs. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
pageId?: number;
/**
* Event description, which is set according to the actual scenario with no special restrictions, and the default
* value is empty.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
description?: string;
/**
* Action that triggers the event (mandatory).
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
triggerAction: Action;
/**
* Text moving granularity. The default value is char.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
textMoveUnit?: TextMoveUnit;
/**
* Content list, which is set according to the actual scenario with no special restrictions. The default value is
* empty.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
contents?: Array<string>;
/**
* Latest content, which is set according to the actual scenario with no special restrictions. The default value is
* empty.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
lastContent?: string;
/**
* Start index. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
beginIndex?: number;
/**
* Current index. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
currentIndex?: number;
/**
* End index. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
endIndex?: number;
/**
* Total number of items. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 7
*/
itemCount?: number;
/**
* Element ID of the component. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
elementId?: number;
/**
* Content for auto-broadcasting. When the application needs to proactively broadcast, set the broadcast content
* according to the actual scenario with no special restrictions, and the default value is empty.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
textAnnouncedForAccessibility?: string;
/**
* Content for auto-broadcasting. The value is a string of the **Resource** type.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @form [since 23]
* @atomicservice [since 23]
* @since 18
*/
textResourceAnnouncedForAccessibility?: Resource;
/**
* Component ID for active focusing, and the default value is empty.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @crossplatform [since 23]
* @form [since 23]
* @atomicservice [since 23]
* @since 12
*/
customId?: string;
}
}
export default accessibility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.GesturePath.d.ts.md
# @ohos.accessibility.GesturePath.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AccessibilityKit
*/
import type { GesturePoint } from './@ohos.accessibility.GesturePoint';
/**
* The **GesturePath** module provides APIs for creating gesture path information required for an accessibility
* application to inject gestures.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
export declare class GesturePath {
/**
* Defines a constructor used to create a **GesturePath** instance.
*
* @param { number } durationTime - Total gesture duration, in milliseconds.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
constructor(durationTime: number);
/**
* Gesture touch point.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
points: Array<GesturePoint>;
/**
* Total gesture duration, in milliseconds.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
durationTime: number;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.accessibility.GesturePoint.d.ts.md
# @ohos.accessibility.GesturePoint.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AccessibilityKit
*/
/**
* The **GesturePoint** module provides APIs
* for creating gesture touch point information required for an accessibility application to inject gestures.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
export declare class GesturePoint {
/**
* Defines a constructor used to create a **GesturePoint** instance.
*
* @param { number } positionX - X coordinate of the touch point, in pixels (px).
* @param { number } positionY - Y coordinate of the touch point, in pixels (px).
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
constructor(positionX: number, positionY: number);
/**
* X coordinate of the touch point, in pixels (px).
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
positionX: number;
/**
* Y coordinate of the touch point, in pixels (px).
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
positionY: number;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.account.appAccount.d.ts.md
# @ohos.account.appAccount.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit BasicServicesKit
*/
import type { AsyncCallback, Callback } from './@ohos.base';
import type Want from './@ohos.app.ability.Want';
import type rpc from './@ohos.rpc';
/**
* The **appAccount** module provides APIs for adding, deleting, modifying, and querying application account information
* , and supports inter-application authentication and distributed data synchronization.
*
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
declare namespace appAccount {
/**
* Creates an **AppAccountManager** object.
*
* @returns { AppAccountManager } **AppAccountManager** object created.
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
function createAppAccountManager(): AppAccountManager;
/**
* Defines the application account manager, which is used to manage account information of applications.
*
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
interface AppAccountManager {
/**
* Adds an application account with the given name. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [createAccount]{@link appAccount.AppAccountManager.createAccount(name: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.createAccount(name: string, callback: AsyncCallback<void>)
*/
addAccount(name: string, callback: AsyncCallback<void>): void;
/**
* Adds an application account name and additional information. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [createAccount]{@link appAccount.AppAccountManager.createAccount(name: string, options: CreateAccountOptions, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } extraInfo - Additional information (information that can be converted to the string type).
* It cannot contain sensitive information, such as the application account password and token.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.createAccount(name: string, options: CreateAccountOptions, callback: AsyncCallback<void>)
*/
addAccount(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
/**
* Adds an application account name and additional information. This API uses a promise to return the result.
*
* > **NOTE**
* > > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [createAccount]{@link appAccount.AppAccountManager.createAccount(name: string, options?: CreateAccountOptions)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } [extraInfo] - Additional information (information that can be converted to the string type).
* <br>The additional information cannot be sensitive information (such as the password and token)
* of the application account. <br>By default, no value is passed, which means no additional information
* needs to be added for the account.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.createAccount(name: string, options?: CreateAccountOptions)
*/
addAccount(name: string, extraInfo?: string): Promise<void>;
/**
* Creates an application account with the given name. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300004 - Account already exists.
* @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccount(name: string, callback: AsyncCallback<void>): void;
/**
* Creates an application account with custom data. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { CreateAccountOptions } options - Options for creating the application account. You can customize
* data based on service requirements, but do not add sensitive data (such as passwords and tokens).
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or options.
* @throws { BusinessError } 12300004 - Account already exists.
* @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccount(name: string, options: CreateAccountOptions, callback: AsyncCallback<void>): void;
/**
* Creates an application account with custom data. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { CreateAccountOptions } [options] - Options for creating the application account.
* You can customize data based on service requirements, but do not add sensitive data
* (such as passwords and tokens).<br>By default, no value is passed in, which means no additional
* information needs to be added for the account.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or options.
* @throws { BusinessError } 12300004 - Account already exists.
* @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccount(name: string, options?: CreateAccountOptions): Promise<void>;
/**
* Adds an application account implicitly based on the specified owner. This API uses an asynchronous callback to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [createAccountImplicitly]{@link appAccount.AppAccountManager.createAccountImplicitly(owner: string, callback: AuthCallback)}
* > instead.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { object } options - Options for the authentication, which can be set as required.
* @param { AuthenticatorCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.createAccountImplicitly(owner: string, callback: AuthCallback)
*/
addAccountImplicitly(owner: string, authType: string, options: {
[key: string]: any;
}, callback: AuthenticatorCallback): void;
/**
* Creates an application account implicitly based on the specified account owner. This API uses an asynchronous
* callback to return the result.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccountImplicitly(owner: string, callback: AuthCallback): void;
/**
* Creates an application account implicitly based on the specified account owner and options. This API uses an
* asynchronous callback to return the result.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { CreateAccountImplicitlyOptions } options - Options for implicitly creating the account.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner or options.
* @throws { BusinessError } 12300007 - The number of accounts reaches the upper limit.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccountImplicitly(owner: string, options: CreateAccountImplicitlyOptions, callback: AuthCallback): void;
/**
* Deletes an application account. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [removeAccount]{@link appAccount.AppAccountManager.removeAccount(name: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.removeAccount(name: string, callback: AsyncCallback<void>)
*/
deleteAccount(name: string, callback: AsyncCallback<void>): void;
/**
* Deletes an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [removeAccount]{@link appAccount.AppAccountManager.removeAccount(name: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.removeAccount(name: string)
*/
deleteAccount(name: string): Promise<void>;
/**
* Removes an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
removeAccount(name: string, callback: AsyncCallback<void>): void;
/**
* Removes an application account. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
removeAccount(name: string): Promise<void>;
/**
* Disables an application account from accessing an application. This API uses an asynchronous callback to return
* the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setAppAccess]{@link appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>)
*/
disableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
/**
* Disables an application account from accessing an application. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setAppAccess]{@link appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean)}
* > instead.
*
* @param { string } name - Name of the target application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean)
*/
disableAppAccess(name: string, bundleName: string): Promise<void>;
/**
* Enables an application account to access an application. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setAppAccess]{@link appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>)
*/
enableAppAccess(name: string, bundleName: string, callback: AsyncCallback<void>): void;
/**
* Enables an application account to access an application. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setAppAccess]{@link appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAppAccess(name: string, bundleName: string, isAccessible: boolean)
*/
enableAppAccess(name: string, bundleName: string): Promise<void>;
/**
* Sets the access to the data of an account for an application. This API uses an asynchronous callback to return
* the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isAccessible - Whether the access is allowed. The value **true** means to allow the access;
* the value **false** means the opposite.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. [since 14]
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAppAccess(name: string, bundleName: string, isAccessible: boolean, callback: AsyncCallback<void>): void;
/**
* Sets the access to the data of an account for an application. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isAccessible - Whether the access is allowed. The value **true** means to allow the access;
* the value **false** means the opposite.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit. [since 14]
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAppAccess(name: string, bundleName: string, isAccessible: boolean): Promise<void>;
/**
* Checks whether an application can access the data of an account. This API uses an asynchronous callback to return
* the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true** means the
* application can access the account data; the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAppAccess(name: string, bundleName: string, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an application can access the data of an account. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the application can
* access the account data; the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAppAccess(name: string, bundleName: string): Promise<boolean>;
/**
* Checks whether data synchronization is enabled for an application account. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkDataSyncEnabled]{@link appAccount.AppAccountManager.checkDataSyncEnabled(name: string, callback: AsyncCallback<boolean>)}
* > instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true** means data
* synchronization is enabled for the application account; the value **false** means the opposite.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.checkDataSyncEnabled(name: string, callback: AsyncCallback<boolean>)
*/
checkAppAccountSyncEnable(name: string, callback: AsyncCallback<boolean>): void;
/**
* Checks whether data synchronization is enabled for an application account. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkDataSyncEnabled]{@link appAccount.AppAccountManager.checkDataSyncEnabled(name: string)} instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* data synchronization is enabled for the application account; the value **false** means the opposite.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.checkDataSyncEnabled(name: string)
*/
checkAppAccountSyncEnable(name: string): Promise<boolean>;
/**
* Checks whether data synchronization is enabled for an application account. This API uses an asynchronous callback
* to return the result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true** means data
* synchronization is enabled for the application account; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkDataSyncEnabled(name: string, callback: AsyncCallback<boolean>): void;
/**
* Checks whether data synchronization is enabled for an application account. This API uses a promise to return the
* result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* data synchronization is enabled for the application account; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkDataSyncEnabled(name: string): Promise<boolean>;
/**
* Sets a credential for an application account. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCredential]{@link appAccount.AppAccountManager.setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { string } credential - Credential value. The custom value, the value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>)
*/
setAccountCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>): void;
/**
* Sets a credential for an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCredential]{@link appAccount.AppAccountManager.setCredential(name: string, credentialType: string, credential: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { string } credential - Credential value. The custom value, the value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCredential(name: string, credentialType: string, credential: string)
*/
setAccountCredential(name: string, credentialType: string, credential: string): Promise<void>;
/**
* Sets a credential for an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { string } credential - Credential value. The custom value, the value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the credential is set
* successfully, **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, credentialType or credential.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback<void>): void;
/**
* Sets a credential for an application account. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { string } credential - Credential value. The custom value, the value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, credentialType or credential.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setCredential(name: string, credentialType: string, credential: string): Promise<void>;
/**
* Sets additional information for an application account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCustomData]{@link appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } extraInfo - Additional information (information that can be converted to the string type).
* It cannot contain sensitive information, such as the application account password and token.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>)
*/
setAccountExtraInfo(name: string, extraInfo: string, callback: AsyncCallback<void>): void;
/**
* Sets additional information for an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCustomData]{@link appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } extraInfo - Additional information (information that can be converted to the string type).
* It cannot contain sensitive information, such as the application account password and token.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string)
*/
setAccountExtraInfo(name: string, extraInfo: string): Promise<void>;
/**
* Sets data synchronization for an application account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setDataSyncEnabled]{@link appAccount.AppAccountManager.setDataSyncEnabled(name: string, isEnabled: boolean, callback: AsyncCallback<void>)}
* > instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { boolean } isEnable - Whether to enable data synchronization. The value **true** means that
* data synchronization is enabled, and **false** means the opposite.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setDataSyncEnabled(name: string, isEnabled: boolean, callback: AsyncCallback<void>)
*/
setAppAccountSyncEnable(name: string, isEnable: boolean, callback: AsyncCallback<void>): void;
/**
* Sets data synchronization for an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setDataSyncEnabled]{@link appAccount.AppAccountManager.setDataSyncEnabled(name: string, isEnabled: boolean)}
* > instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { boolean } isEnable - Whether to enable data synchronization. The value **true** means that
* data synchronization is enabled, and **false** means the opposite.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setDataSyncEnabled(name: string, isEnabled: boolean)
*/
setAppAccountSyncEnable(name: string, isEnable: boolean): Promise<void>;
/**
* Sets data synchronization for an application account. This API uses an asynchronous callback to return the
* result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { boolean } isEnabled - Whether to enable data synchronization. The value **true** means that data
* synchronization is enabled, and **false** means the opposite.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setDataSyncEnabled(name: string, isEnabled: boolean, callback: AsyncCallback<void>): void;
/**
* Sets data synchronization for an application account. This API uses a promise to return the result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { boolean } isEnabled - Whether to enable data synchronization. The value **true** means that data
* synchronization is enabled, and **false** means the opposite.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setDataSyncEnabled(name: string, isEnabled: boolean): Promise<void>;
/**
* Sets data to be associated with an application account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCustomData]{@link appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the associated data.
* @param { string } value - Value of the data to set.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>)
*/
setAssociatedData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;
/**
* Sets data to be associated with an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setCustomData]{@link appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the associated data.
* @param { string } value - Value of the data to set.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setCustomData(name: string, key: string, value: string)
*/
setAssociatedData(name: string, key: string, value: string): Promise<void>;
/**
* Sets custom data for an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the custom data. The value cannot exceed 512 characters.
* @param { string } value - Value of the custom data. The value cannot exceed 512 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, key or value.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setCustomData(name: string, key: string, value: string, callback: AsyncCallback<void>): void;
/**
* Sets custom data for an application account. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the custom data. The value cannot exceed 512 characters.
* @param { string } value - Value of the custom data. The value cannot exceed 512 characters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, key or value.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400003 - The number of custom data reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setCustomData(name: string, key: string, value: string): Promise<void>;
/**
* Obtains information about all accessible application accounts. This API uses an asynchronous callback to return
* the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getAllAccounts]{@link appAccount.AppAccountManager.getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>)}
* > instead.
*
* @permission ohos.permission.GET_ALL_APP_ACCOUNTS
* @param { AsyncCallback<Array<AppAccountInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of accessible application
* accounts. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>)
*/
getAllAccessibleAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;
/**
* Obtains information about all accessible application accounts. This API uses a promise to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getAllAccounts]{@link appAccount.AppAccountManager.getAllAccounts()} instead.
*
* @permission ohos.permission.GET_ALL_APP_ACCOUNTS
* @returns { Promise<Array<AppAccountInfo>> } Promise used to return information about all accessible accounts.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAllAccounts()
*/
getAllAccessibleAccounts(): Promise<Array<AppAccountInfo>>;
/**
* Obtains information about all accessible application accounts. This API uses an asynchronous callback to return
* the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications or
* <br> have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.
*
* @param { AsyncCallback<Array<AppAccountInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of accessible application
* accounts. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAllAccounts(callback: AsyncCallback<Array<AppAccountInfo>>): void;
/**
* Obtains information about all accessible application accounts. This API uses a promise to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications or
* <br> have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.
*
* @returns { Promise<Array<AppAccountInfo>> } Promise used to return information about all accessible accounts.
* @throws { BusinessError } 12300001 - System service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAllAccounts(): Promise<Array<AppAccountInfo>>;
/**
* Obtains the application accounts that can be accessed by the invoker based on the application account owner. This
* API uses an asynchronous callback to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getAccountsByOwner]{@link appAccount.AppAccountManager.getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>)}
* > instead.
*
* @permission ohos.permission.GET_ALL_APP_ACCOUNTS
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<AppAccountInfo>> } callback - Callback used to return information about
* all accessible application accounts.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>)
*/
getAllAccounts(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;
/**
* Obtains the application accounts that can be accessed by the invoker based on the application account owner. This
* API uses a promise to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getAccountsByOwner]{@link appAccount.AppAccountManager.getAccountsByOwner(owner: string)} instead.
*
* @permission ohos.permission.GET_ALL_APP_ACCOUNTS
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<Array<AppAccountInfo>> } Promise used to return the application accounts that can be
* accessed by the invoker.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAccountsByOwner(owner: string)
*/
getAllAccounts(owner: string): Promise<Array<AppAccountInfo>>;
/**
* Obtains the application accounts that can be accessed by the invoker based on the application account owner. This
* API uses an asynchronous callback to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications or
* <br> have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<AppAccountInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is null and **data** is the application account information
* obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAccountsByOwner(owner: string, callback: AsyncCallback<Array<AppAccountInfo>>): void;
/**
* Obtains the application accounts that can be accessed by the invoker based on the application account owner. This
* API uses a promise to return the result.
* This method applies to the following accounts:
* <br> Accounts of this application.
* <br> Accounts of third-party applications. To obtain such information,
* <br> your application must have gained authorization from the third-party applications or
* <br> have gained the ohos.permission.GET_ALL_APP_ACCOUNTS permission.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<Array<AppAccountInfo>> } Promise used to return the application account information obtained.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAccountsByOwner(owner: string): Promise<Array<AppAccountInfo>>;
/**
* Obtains the credential of an application account. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCredential]{@link appAccount.AppAccountManager.getCredential(name: string, credentialType: string, callback: AsyncCallback<string>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null** and **data** is the credential obtained. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCredential(name: string, credentialType: string, callback: AsyncCallback<string>)
*/
getAccountCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;
/**
* Obtains the credential of an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCredential]{@link appAccount.AppAccountManager.getCredential(name: string, credentialType: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @returns { Promise<string> } Promise used to return the credential obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCredential(name: string, credentialType: string)
*/
getAccountCredential(name: string, credentialType: string): Promise<string>;
/**
* Obtains the credential of an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null** and **data** is the credential obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or credentialType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300102 - Credential not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getCredential(name: string, credentialType: string, callback: AsyncCallback<string>): void;
/**
* Obtains the credential of an application account. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @returns { Promise<string> } Promise used to return the credential obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or credentialType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300102 - Credential not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getCredential(name: string, credentialType: string): Promise<string>;
/**
* Obtains additional information of an application account. Additional information refers to other information that
* can be converted to the string type. It cannot contain sensitive information, such as the application account
* password and token. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCustomData]{@link appAccount.AppAccountManager.getCustomData(name: string, key: string, callback: AsyncCallback<string>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the additional information
* obtained. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCustomData(name: string, key: string, callback: AsyncCallback<string>)
*/
getAccountExtraInfo(name: string, callback: AsyncCallback<string>): void;
/**
* Obtains additional information of an application account. Additional information refers to other information that
* can be converted to the string type. It cannot contain sensitive information, such as the application account
* password and token. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCustomData]{@link appAccount.AppAccountManager.getCustomData(name: string, key: string)} instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @returns { Promise<string> } Promise used to return the additional information obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCustomData(name: string, key: string)
*/
getAccountExtraInfo(name: string): Promise<string>;
/**
* Obtains the associated data of an application account based on the specified key. This API uses an asynchronous
* callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCustomData]{@link appAccount.AppAccountManager.getCustomData(name: string, key: string, callback: AsyncCallback<string>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the associated data.
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the data obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCustomData(name: string, key: string, callback: AsyncCallback<string>)
*/
getAssociatedData(name: string, key: string, callback: AsyncCallback<string>): void;
/**
* Obtains data associated with an application account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getCustomData]{@link appAccount.AppAccountManager.getCustomData(name: string, key: string)} instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the associated data.
* @returns { Promise<string> } Promise used to return the data obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getCustomData(name: string, key: string)
*/
getAssociatedData(name: string, key: string): Promise<string>;
/**
* Obtains the custom data of an application account based on the specified key. This API uses an asynchronous
* callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the custom data. The value cannot exceed 512 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the custom data value
* obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or key.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400002 - Custom data not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getCustomData(name: string, key: string, callback: AsyncCallback<string>): void;
/**
* Obtains the custom data of an application account based on the specified key. This API uses a promise to return
* the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the custom data. The value cannot exceed 512 characters.
* @returns { Promise<string> } Promise used to return the custom data value obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or key.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400002 - Custom data not found
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getCustomData(name: string, key: string): Promise<string>;
/**
* Obtains the custom data of an application account based on the specified key. The API returns the result
* synchronously.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } key - Key of the custom data. The value cannot exceed 512 characters.
* @returns { string } Value of the custom data, by default, no value is passed in.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or key.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400002 - Custom data not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getCustomDataSync(name: string, key: string): string;
/**
* Subscribes to account information changes of apps.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [on('accountChange')]{@link appAccount.AppAccountManager.on(type: 'accountChange', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>)}
* > instead.
*
* @param { 'change' } type - Event type to subscribe to. The value is **'change'**.
* An event will be reported when the account information changes.
* @param { Array<string> } owners - Application bundle names of the account.
* @param { Callback<Array<AppAccountInfo>> } callback - Callback registered to return the list of
* changed application accounts.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.on(type: 'accountChange', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>)
*/
on(type: 'change', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void;
/**
* Subscribes to account information changes of apps.
*
* @param { 'accountChange' } type - Event type to subscribe to. The value is **'accountChange'**.
* An event will be reported when the account information of the target application changes.
* @param { Array<string> } owners - Application bundle names of the account.
* @param { Callback<Array<AppAccountInfo>> } callback - Callback registered to return the list
* of changed application accounts.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid type or owners.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
on(type: 'accountChange', owners: Array<string>, callback: Callback<Array<AppAccountInfo>>): void;
/**
* Unsubscribes from account information changes.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [off('accountChange')]{@link appAccount.AppAccountManager.off(type: 'accountChange', callback?: Callback<Array<AppAccountInfo>>)}
* > instead.
*
* @param { 'change' } type - Event type to subscribe to. The value is **'change'**.
* An event will be reported when the account information changes.
* @param { Callback<Array<AppAccountInfo>> } [callback] - Callback to unregister.
* By default, no value is passed, which means to unregister all callbacks for
* the specified event.
* @syscap SystemCapability.Account.AppAccount
* @since 7
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.off(type: 'accountChange', callback?: Callback<Array<AppAccountInfo>>)
*/
off(type: 'change', callback?: Callback<Array<AppAccountInfo>>): void;
/**
* Unsubscribes from account information changes.
*
* @param { 'accountChange' } type - Event type to unsubscribe from. The value is **'accountChange'**.
* @param { Callback<Array<AppAccountInfo>> } [callback] - Callback to unregister. By default, no value is passed,
* which means to unregister all callbacks for the specified event.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid type.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
off(type: 'accountChange', callback?: Callback<Array<AppAccountInfo>>): void;
/**
* Authenticates an application account. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [auth]{@link appAccount.AppAccountManager.auth(name: string, owner: string, authType: string, callback: AuthCallback)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { object } options - Options for the authentication.
* @param { AuthenticatorCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.auth(name: string, owner: string, authType: string, callback: AuthCallback)
*/
authenticate(name: string, owner: string, authType: string, options: {
[key: string]: any;
}, callback: AuthenticatorCallback): void;
/**
* Authenticates an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or authType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
auth(name: string, owner: string, authType: string, callback: AuthCallback): void;
/**
* Authenticates an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { Record<string, Object> } options - Options for the authentication.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner, authType or options.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
auth(name: string, owner: string, authType: string, options: Record<string, Object>, callback: AuthCallback): void;
/**
* Obtains the authorization token of the specified authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthToken]{@link appAccount.AppAccountManager.getAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null** and **data** is the authorization token value obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>)
*/
getOAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>): void;
/**
* Obtains the authorization token of the specified authentication type for an application account. This API uses a
* promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthToken]{@link appAccount.AppAccountManager.getAuthToken(name: string, owner: string, authType: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @returns { Promise<string> } Promise used to return the authorization token obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthToken(name: string, owner: string, authType: string)
*/
getOAuthToken(name: string, owner: string, authType: string): Promise<string>;
/**
* Obtains the authorization token of the specified authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the
* authorization token value obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or authType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthToken(name: string, owner: string, authType: string, callback: AsyncCallback<string>): void;
/**
* Obtains the authorization token of the specified authentication type for an application account. This API uses a
* promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @returns { Promise<string> } Promise used to return the authorization token obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or authType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthToken(name: string, owner: string, authType: string): Promise<string>;
/**
* Sets an authorization token of the specific authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [setAuthToken]{@link appAccount.AppAccountManager.setAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>)
*/
setOAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>): void;
/**
* Sets an authorization token of the specific authentication type for an application account. This API uses a
* promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [setAuthToken]{@link appAccount.AppAccountManager.setAuthToken(name: string, authType: string, token: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAuthToken(name: string, authType: string, token: string)
*/
setOAuthToken(name: string, authType: string, token: string): Promise<void>;
/**
* Sets an authorization token of the specific authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or token.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthToken(name: string, authType: string, token: string, callback: AsyncCallback<void>): void;
/**
* Sets an authorization token of the specific authentication type for an application account. This API uses a
* promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or token.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12400004 - The number of tokens reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthToken(name: string, authType: string, token: string): Promise<void>;
/**
* Deletes the authorization token of the specified authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [deleteAuthToken]{@link appAccount.AppAccountManager.deleteAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.deleteAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>)
*/
deleteOAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>): void;
/**
* Deletes the authorization token of the specified authentication type for an application account. This API uses a
* promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [deleteAuthToken]{@link appAccount.AppAccountManager.deleteAuthToken(name: string, owner: string, authType: string, token: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.deleteAuthToken(name: string, owner: string, authType: string, token: string)
*/
deleteOAuthToken(name: string, owner: string, authType: string, token: string): Promise<void>;
/**
* Deletes the authorization token of the specified authentication type for an application account. This API uses an
* asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters. If the token
* does not exist, no operation is performed.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner, authType or token.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
deleteAuthToken(name: string, owner: string, authType: string, token: string, callback: AsyncCallback<void>): void;
/**
* Deletes the authorization token of the specified authentication type for an application account. This API uses a
* promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } token - Authorization token. The value cannot exceed 1024 characters. If the token
* does not exist, no operation is performed.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner, authType or token.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
deleteAuthToken(name: string, owner: string, authType: string, token: string): Promise<void>;
/**
* Sets the visibility of an authorization token to an application. This API uses an asynchronous callback to return
* the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [setAuthTokenVisibility]{@link appAccount.AppAccountManager.setAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isVisible - Whether the authorization token is visible to the application.
* The value **true** means the authorization token is visible to the application;
* the value **false** means the opposite.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )
*/
setOAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void>): void;
/**
* Sets the visibility of an authorization token to an application. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [setAuthTokenVisibility]{@link appAccount.AppAccountManager.setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isVisible - Whether the authorization token is visible to the application. The value **true** means
* the authorization token is visible to the application; the value **false** means the opposite.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean)
*/
setOAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise<void>;
/**
* Sets the visibility of an authorization token to an application. This API uses an asynchronous callback to return
* the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isVisible - Whether the authorization token is visible to the application.
* The value **true** means the authorization token is visible to the application;
* the value **false** means the opposite.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void>): void;
/**
* Sets the visibility of an authorization token to an application. This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { boolean } isVisible - Whether the authorization token is visible to the application.
* The value **true** means the authorization token is visible to the application;
* the value **false** means the opposite.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @throws { BusinessError } 12400001 - Application not found. [since 9 - 13]
* @throws { BusinessError } 12400005 - The size of authorization list reaches the upper limit.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthTokenVisibility(name: string, authType: string, bundleName: string, isVisible: boolean): Promise<void>;
/**
* Checks the visibility of an authorization token of the specified authentication type to an application. This API
* uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [checkAuthTokenVisibility]{@link appAccount.AppAccountManager.checkAuthTokenVisibility(name: string, authType: string, bundleName: string, callback: AsyncCallback<boolean>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null** and **data** can be **true** (the authorization token is visible to the application)
* or **false** (the authorization token is not visible to the application).
* If the operation fails, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.checkAuthTokenVisibility(name: string, authType: string, bundleName: string, callback: AsyncCallback<boolean>)
*/
checkOAuthTokenVisibility(name: string, authType: string, bundleName: string, callback: AsyncCallback<boolean>): void;
/**
* Checks the visibility of an authorization token of the specified authentication type to an application. This API
* uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [checkAuthTokenVisibility]{@link appAccount.AppAccountManager.checkAuthTokenVisibility(name: string, authType: string, bundleName: string)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the authorization token is visible to the application; the value **false** means the opposite.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.checkAuthTokenVisibility(name: string, authType: string, bundleName: string)
*/
checkOAuthTokenVisibility(name: string, authType: string, bundleName: string): Promise<boolean>;
/**
* Checks the visibility of an authorization token of the specified authentication type to an application. This API
* uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null** and **data** can be **true** (the authorization token is visible to the application)
* or **false** (the authorization token is not visible to the application). If the operation fails,
* **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAuthTokenVisibility(name: string, authType: string, bundleName: string, callback: AsyncCallback<boolean>): void;
/**
* Checks the visibility of an authorization token of the specified authentication type to an application. This API
* uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } bundleName - Bundle name of the application. The value cannot exceed 512 characters.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the
* authorization token is visible to the application; the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, authType or bundleName.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAuthTokenVisibility(name: string, authType: string, bundleName: string): Promise<boolean>;
/**
* Obtains all tokens visible to the invoker for an application account. This API uses an asynchronous callback to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAllAuthTokens]{@link appAccount.AppAccountManager.getAllAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<AuthTokenInfo>>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<OAuthTokenInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of all tokens visible to
* the invoker. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAllAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<AuthTokenInfo>>)
*/
getAllOAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<OAuthTokenInfo>>): void;
/**
* Obtains all tokens visible to the invoker for an application account. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAllAuthTokens]{@link appAccount.AppAccountManager.getAllAuthTokens(name: string, owner: string)} instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<Array<OAuthTokenInfo>> } Promise used to return the tokens obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAllAuthTokens(name: string, owner: string)
*/
getAllOAuthTokens(name: string, owner: string): Promise<Array<OAuthTokenInfo>>;
/**
* Obtains all tokens visible to the invoker for an application account. This API uses an asynchronous callback to
* return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<AuthTokenInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of all tokens visible
* to the invoker. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or owner.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAllAuthTokens(name: string, owner: string, callback: AsyncCallback<Array<AuthTokenInfo>>): void;
/**
* Obtains all tokens visible to the invoker for an application account. This API uses a promise to return the
* result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<Array<AuthTokenInfo>> } Promise used to return the tokens obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or owner.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAllAuthTokens(name: string, owner: string): Promise<Array<AuthTokenInfo>>;
/**
* Obtains the authorization list of the specified authentication type for an application account. The authorization
* list contains all authorized bundles. The token authorization list is set by
* [setOAuthTokenVisibility]{@link appAccount.AppAccountManager.setOAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )}
* . This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthList]{@link appAccount.AppAccountManager.getAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>)}
* > instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<string>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of authorized
* bundles obtained. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>)
*/
getOAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>): void;
/**
* Obtains the authorization list of the specified authentication type for an application account. The authorization
* list contains all authorized bundles. The token authorization list is set by
* [setOAuthTokenVisibility]{@link appAccount.AppAccountManager.setOAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )}
* . This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthList]{@link appAccount.AppAccountManager.getAuthList(name: string, authType: string)} instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @returns { Promise<Array<string>> } Promise used to return a list of authorized bundles.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthList(name: string, authType: string)
*/
getOAuthList(name: string, authType: string): Promise<Array<string>>;
/**
* Obtains the authorization list of the specified authentication type for an application account. The authorization
* list contains all authorized bundles. The token authorization list is set by
* [setAuthTokenVisibility]{@link appAccount.AppAccountManager.setAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )}
* . This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { AsyncCallback<Array<string>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of authorized
* bundles obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or authType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthList(name: string, authType: string, callback: AsyncCallback<Array<string>>): void;
/**
* Obtains the authorization list of the specified authentication type for an application account. The authorization
* list contains all authorized bundles. The token authorization list is set by
* [setAuthTokenVisibility]{@link appAccount.AppAccountManager.setAuthTokenVisibility( name: string, authType: string, bundleName: string, isVisible: boolean, callback: AsyncCallback<void> )}
* . This API uses a promise to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @returns { Promise<Array<string>> } Promise used to return a list of authorized bundles.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or authType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300107 - AuthType not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthList(name: string, authType: string): Promise<Array<string>>;
/**
* Obtains the authenticator callback for an authentication session. This API uses an asynchronous callback to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthCallback]{@link appAccount.AppAccountManager.getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>)}
* > instead.
*
* @param { string } sessionId - ID of the authentication session.
* @param { AsyncCallback<AuthenticatorCallback> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the authenticator callback
* obtained. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>)
*/
getAuthenticatorCallback(sessionId: string, callback: AsyncCallback<AuthenticatorCallback>): void;
/**
* Obtains the authenticator callback for an authentication session. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getAuthCallback]{@link appAccount.AppAccountManager.getAuthCallback(sessionId: string)} instead.
*
* @param { string } sessionId - ID of the authentication session.
* @returns { Promise<AuthenticatorCallback> } Promise used to return the authenticator callback obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.getAuthCallback(sessionId: string)
*/
getAuthenticatorCallback(sessionId: string): Promise<AuthenticatorCallback>;
/**
* Obtains the authenticator callback for an authentication session. This API uses an asynchronous callback to
* return the result.
*
* @param { string } sessionId - ID of the authentication session.
* @param { AsyncCallback<AuthCallback> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the authenticator
* callback object obtained. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid sessionId.
* @throws { BusinessError } 12300108 - Session not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthCallback(sessionId: string, callback: AsyncCallback<AuthCallback>): void;
/**
* Obtains the authenticator callback for an authentication session. This API uses a promise to return the result.
*
* @param { string } sessionId - ID of the authentication session.
* @returns { Promise<AuthCallback> } Promise used to return the authenticator callback obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid sessionId.
* @throws { BusinessError } 12300108 - Session not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getAuthCallback(sessionId: string): Promise<AuthCallback>;
/**
* Obtains the authenticator information of an application. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [queryAuthenticatorInfo]{@link appAccount.AppAccountManager.queryAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>)}
* > instead.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<AuthenticatorInfo> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the authenticator information obtained. Otherwise,
* **err** is an error object.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.queryAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>)
*/
getAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>): void;
/**
* Obtains the authenticator information of an application. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [queryAuthenticatorInfo]{@link appAccount.AppAccountManager.queryAuthenticatorInfo(owner: string)} instead.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<AuthenticatorInfo> } Promise used to return the authenticator information obtained.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AppAccountManager.queryAuthenticatorInfo(owner: string)
*/
getAuthenticatorInfo(owner: string): Promise<AuthenticatorInfo>;
/**
* Obtains the authenticator information of an application. This API uses an asynchronous callback to return the
* result.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AsyncCallback<AuthenticatorInfo> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the authenticator information obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
queryAuthenticatorInfo(owner: string, callback: AsyncCallback<AuthenticatorInfo>): void;
/**
* Obtains the authenticator information of an application. This API uses a promise to return the result.
*
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @returns { Promise<AuthenticatorInfo> } Promise used to return the authenticator information obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
queryAuthenticatorInfo(owner: string): Promise<AuthenticatorInfo>;
/**
* Checks whether an application account has specific labels. This API uses an asynchronous callback to return the
* result. The labels are checked by the authenticator of the target application.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { Array<string> } labels - Labels to check.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** can be **true** or **false**.
* The value **true** means the application account has the labels; the value **false** means the opposite.
* If the operation fails, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or labels.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAccountLabels(name: string, owner: string, labels: Array<string>, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an application account has specific labels. This API uses a promise to return the result. The
* labels are checked by the authenticator of the target application.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { Array<string> } labels - Labels to check.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the application
* account has the labels; the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or labels.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAccountLabels(name: string, owner: string, labels: Array<string>): Promise<boolean>;
/**
* Deletes the credential of the specified type from an application account. This API uses an asynchronous callback
* to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **null**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or credentialType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300102 - Credential not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
deleteCredential(name: string, credentialType: string, callback: AsyncCallback<void>): void;
/**
* Deletes the credential of the specified type from an application account. This API uses a promise to return the
* result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } credentialType - Credential type. The custom type, the value cannot exceed 1024 characters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or credentialType.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300102 - Credential not found.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
deleteCredential(name: string, credentialType: string): Promise<void>;
/**
* Selects the accounts that can be accessed by the invoker based on the options. This API uses an asynchronous
* callback to return the result. If the options contain label constraints, the authenticator of the target
* application provides the capability of checking the labels.
*
* @param { SelectAccountsOptions } options - Options for selecting accounts.
* @param { AsyncCallback<Array<AppAccountInfo>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of accounts selected.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid options.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
selectAccountsByOptions(options: SelectAccountsOptions, callback: AsyncCallback<Array<AppAccountInfo>>): void;
/**
* Selects the accounts that can be accessed by the invoker based on the options. This API uses a promise to return
* the result. If the options contain label constraints, the authenticator of the target application provides the
* capability of checking the labels.
*
* @param { SelectAccountsOptions } options - Options for selecting accounts.
* @returns { Promise<Array<AppAccountInfo>> } Promise used to return the accounts selected.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid options.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
selectAccountsByOptions(options: SelectAccountsOptions): Promise<Array<AppAccountInfo>>;
/**
* Verifies the credential of an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AuthCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name or owner.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
verifyCredential(name: string, owner: string, callback: AuthCallback): void;
/**
* Verifies the user credential. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } owner - Owner of the application account. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { VerifyCredentialOptions } options - Options for credential verification.
* @param { AuthCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid name, owner or options.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
verifyCredential(name: string, owner: string, options: VerifyCredentialOptions, callback: AuthCallback): void;
/**
* Sets the authenticator attributes of an application. This API uses an asynchronous callback to return the result.
*
* @param { string } owner - Owner of the authenticator. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { AuthCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthenticatorProperties(owner: string, callback: AuthCallback): void;
/**
* Sets the authenticator properties. This API uses an asynchronous callback to return the result.
*
* @param { string } owner - Owner of the authenticator. The value is the Bundle name of the application.
* The value cannot exceed 1024 characters.
* @param { SetPropertiesOptions } options - Authenticator properties to set.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid owner or options.
* @throws { BusinessError } 12300010 - Account service busy.
* @throws { BusinessError } 12300113 - Authenticator service not found.
* @throws { BusinessError } 12300114 - Authenticator service exception.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setAuthenticatorProperties(owner: string, options: SetPropertiesOptions, callback: AuthCallback): void;
}
/**
* Defines application account information.
*
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
interface AppAccountInfo {
/**
* Owner of the application account. The value is the bundle name of the application.
*
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
owner: string;
/**
* Name of the application account.
*
* @syscap SystemCapability.Account.AppAccount
* @since 7
*/
name: string;
}
/**
* Defines authorization token information.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [AuthTokenInfo]{@link appAccount.AuthTokenInfo} instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AuthTokenInfo
*/
interface OAuthTokenInfo {
/**
* Authentication type.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AuthTokenInfo.authType
*/
authType: string;
/**
* Value of the authorization token.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AuthTokenInfo.token
*/
token: string;
}
/**
* Defines authorization token information.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface AuthTokenInfo {
/**
* Authentication type.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
authType: string;
/**
* Value of the authorization token.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
token: string;
/**
* Information about the account to which the token belongs. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
account?: AppAccountInfo;
}
/**
* Defines OAuth authenticator information.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
interface AuthenticatorInfo {
/**
* Owner of the authenticator. The value is the Bundle name of the application.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
owner: string;
/**
* ID of the authenticator icon.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
iconId: number;
/**
* ID of the authenticator label.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
labelId: number;
}
/**
* Defines the authentication result.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface AuthResult {
/**
* Information about the account to which the token belongs. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
account?: AppAccountInfo;
/**
* Token information. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
tokenInfo?: AuthTokenInfo;
}
/**
* Defines the options for creating an application account.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface CreateAccountOptions {
/**
* Custom data. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
customData?: Record<string, string>;
}
/**
* Defines the options for implicitly creating an application account.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface CreateAccountImplicitlyOptions {
/**
* Required labels. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
requiredLabels?: Array<string>;
/**
* Authentication type.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
authType?: string;
/**
* Custom parameter object. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
parameters?: Record<string, Object>;
}
/**
* Defines the options for selecting accounts.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface SelectAccountsOptions {
/**
* Array of allowed accounts. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
allowedAccounts?: Array<AppAccountInfo>;
/**
* Array of the owners of the allowed accounts. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
allowedOwners?: Array<string>;
/**
* Labels of the authenticator. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
requiredLabels?: Array<string>;
}
/**
* Represents the options for verifying the user credential.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface VerifyCredentialOptions {
/**
* Credential type. The custom type, the value cannot exceed 1024 characters. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
credentialType?: string;
/**
* Credential value. The custom value, the value cannot exceed 1024 characters. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
credential?: string;
/**
* Custom parameter object. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
parameters?: Record<string, Object>;
}
/**
* Represents the options for setting authenticator properties.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface SetPropertiesOptions {
/**
* Property object. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
properties?: Record<string, Object>;
/**
* Custom parameter object. By default, no value is passed in.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
parameters?: Record<string, Object>;
}
/**
* Enumerates the constants.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
enum Constants {
/**
* Operation of adding an account implicitly.
*
* Note: This API is supported since API version 8 and deprecated since API version 9. Use
* **ACTION_CREATE_ACCOUNT_IMPLICITLY** instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.Constants.ACTION_CREATE_ACCOUNT_IMPLICITLY
*/
ACTION_ADD_ACCOUNT_IMPLICITLY = 'addAccountImplicitly',
/**
* Authentication operation.
*
* Note: This API is supported since API version 8 and deprecated since API version 9. Use **ACTION_AUTH** instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.Constants.ACTION_AUTH
*/
ACTION_AUTHENTICATE = 'authenticate',
/**
* Operation of creating an account implicitly.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
ACTION_CREATE_ACCOUNT_IMPLICITLY = "createAccountImplicitly",
/**
* Authentication operation.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
ACTION_AUTH = "auth",
/**
* Operation of verifying credentials.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
ACTION_VERIFY_CREDENTIAL = "verifyCredential",
/**
* Operation of setting authenticator properties.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
ACTION_SET_AUTHENTICATOR_PROPERTIES = "setAuthenticatorProperties",
/**
* Name of the application account.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_NAME = "name",
/**
* Bundle name of the application account owner.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_OWNER = "owner",
/**
* Token.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_TOKEN = "token",
/**
* Operation.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_ACTION = "action",
/**
* Authentication type.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_AUTH_TYPE = "authType",
/**
* Session ID.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_SESSION_ID = "sessionId",
/**
* PID of the caller.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_CALLER_PID = "callerPid",
/**
* UID of the caller.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_CALLER_UID = "callerUid",
/**
* Bundle name of the caller.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
*/
KEY_CALLER_BUNDLE_NAME = "callerBundleName",
/**
* Required labels.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
KEY_REQUIRED_LABELS = "requiredLabels",
/**
* Return value of the Boolean type.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
KEY_BOOLEAN_RESULT = "booleanResult"
}
/**
* Enumerates the result codes.
*
* > **NOTE**<br>
* > > This API is supported since API version 8 and deprecated since API version 9. For details, see
* > [Account Management Error Codes](docroot://reference/apis-basic-services-kit/errorcode-account.md).
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
enum ResultCode {
/**
* The operation is successful.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
SUCCESS = 0,
/**
* The application account does not exist.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_ACCOUNT_NOT_EXIST = 10001,
/**
* The **AppAccountManager** service is abnormal.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_APP_ACCOUNT_SERVICE_EXCEPTION = 10002,
/**
* The password is invalid.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_INVALID_PASSWORD = 10003,
/**
* The request is invalid.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_INVALID_REQUEST = 10004,
/**
* The response is invalid.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_INVALID_RESPONSE = 10005,
/**
* The network is abnormal.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_NETWORK_EXCEPTION = 10006,
/**
* The authenticator does not exist.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_AUTHENTICATOR_NOT_EXIST = 10007,
/**
* The authentication is canceled.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_CANCELED = 10008,
/**
* The size of the OAuth list exceeds the limit.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_LIST_TOO_LARGE = 10009,
/**
* The OAuth service is busy.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_SERVICE_BUSY = 10010,
/**
* The OAuth service is abnormal.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_SERVICE_EXCEPTION = 10011,
/**
* The session to be authenticated does not exist.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_SESSION_NOT_EXIST = 10012,
/**
* The authentication timed out.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_TIMEOUT = 10013,
/**
* The authorization token does not exist.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_TOKEN_NOT_EXIST = 10014,
/**
* The number of OAuth tokens reaches the limit.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_TOKEN_TOO_MANY = 10015,
/**
* The authentication operation is not supported.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_UNSUPPORT_ACTION = 10016,
/**
* The authentication type is not supported.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_OAUTH_UNSUPPORT_AUTH_TYPE = 10017,
/**
* The required permission is missing.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
*/
ERROR_PERMISSION_DENIED = 10018
}
/**
* Provides OAuth authenticator callbacks.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [AuthCallback]{@link appAccount.AuthCallback} instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.AuthCallback
*/
interface AuthenticatorCallback {
/**
* Called to return the result of an authentication request.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. Use [onResult](#onresult9) instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead AppAccount.AuthCallback.onResult
*/
onResult: (code: number, result: {
[key: string]: any;
}) => void;
/**
* Called to redirect a request.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. Use [onRequestRedirected](#onrequestredirected9) instead.
*
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead AppAccount.AuthCallback.onRequestRedirected
*/
onRequestRedirected: (request: Want) => void;
}
/**
* Implements authenticator callbacks.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
interface AuthCallback {
/**
*
* Called to return the result of an authentication request.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
onResult: (code: number, result?: AuthResult) => void;
/**
* Called to redirect a request.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
onRequestRedirected: (request: Want) => void;
/**
* Called to continue to process the request.
*
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
onRequestContinued?: () => void;
}
/**
* Provides APIs to operate the authenticator.
*
* @syscap SystemCapability.Account.AppAccount
* @name Authenticator
* @since 8
*/
class Authenticator {
/**
* Adds an application account implicitly based on the specified authentication type and options. This API uses an
* asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [createAccountImplicitly](docroot://reference/apis-basic-services-kit/js-apis-appAccount.md#createaccountimplicitly9-2)
* > instead.
*
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } callerBundleName - Bundle name of the authentication requester.
* @param { object } options - Options for the authentication.
* @param { AuthenticatorCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.Authenticator.createAccountImplicitly(options: CreateAccountImplicitlyOptions, callback: AuthCallback)
*/
addAccountImplicitly(authType: string, callerBundleName: string, options: {
[key: string]: any;
}, callback: AuthenticatorCallback): void;
/**
* Creates an application account implicitly based on the specified account owner. This API uses an asynchronous
* callback to return the result.
*
* @param { CreateAccountImplicitlyOptions } options - Options for implicitly creating the account.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
createAccountImplicitly(options: CreateAccountImplicitlyOptions, callback: AuthCallback): void;
/**
* Authenticates an application account to obtain the OAuth token. This API uses an asynchronous callback to return
* the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [auth](docroot://reference/apis-basic-services-kit/js-apis-appAccount.md#auth9-2) instead.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { string } callerBundleName - Bundle name of the authentication requester.
* @param { object } options - Options for the authentication.
* @param { AuthenticatorCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 8
* @deprecated since 9
* @useinstead appAccount.Authenticator.auth(name: string, authType: string, options: Record<string, Object>, callback: AuthCallback)
*/
authenticate(name: string, authType: string, callerBundleName: string, options: {
[key: string]: any;
}, callback: AuthenticatorCallback): void;
/**
* Authenticates an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { string } authType - Authentication type. The custom type, The value cannot exceed 1024 characters.
* @param { Record<string, Object> } options - Options for the authentication.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
auth(name: string, authType: string, options: Record<string, Object>, callback: AuthCallback): void;
/**
* Verifies the credential of an application account. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { VerifyCredentialOptions } options - Options for credential verification.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
verifyCredential(name: string, options: VerifyCredentialOptions, callback: AuthCallback): void;
/**
* Sets the authenticator properties. This API uses an asynchronous callback to return the result.
*
* @param { SetPropertiesOptions } options - Authenticator properties to set.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
setProperties(options: SetPropertiesOptions, callback: AuthCallback): void;
/**
* Checks the account labels. This API uses an asynchronous callback to return the result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { Array<string> } labels - Labels to check.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAccountLabels(name: string, labels: Array<string>, callback: AuthCallback): void;
/**
* Checks whether an application account can be deleted. This API uses an asynchronous callback to return the
* result.
*
* @param { string } name - Name of the application account. The value cannot exceed 512 characters.
* @param { AuthCallback } callback - Authenticator callback used to return the result.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
checkAccountRemovable(name: string, callback: AuthCallback): void;
/**
* Obtains the remote object of an authenticator. This API cannot be overloaded.
*
* @returns { rpc.RemoteObject } Remote object of the authenticator, which is used for inter-process communication.
* @syscap SystemCapability.Account.AppAccount
* @since 9
*/
getRemoteObject(): rpc.RemoteObject;
}
}
export default appAccount;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.account.distributedAccount.d.ts.md
# @ohos.account.distributedAccount.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit BasicServicesKit
*/
import type { AsyncCallback } from './@ohos.base';
/**
* The **distributedAccount** module provides APIs for managing distributed accounts, including querying and updating
* account login states.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
declare namespace distributedAccount {
/**
* Obtains a **DistributedAccountAbility** instance.
*
* @returns { DistributedAccountAbility } **DistributedAccountAbility** instance obtained.
* This instance provides APIs for querying and updating the login state of a distributed account.
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
function getDistributedAccountAbility(): DistributedAccountAbility;
/**
* Provides APIs for querying and updating the login state of a distributed account. You must obtain a
* **DistributedAccountAbility** instance first.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
interface DistributedAccountAbility {
/**
* Queries the distributed account information. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountDistributedInfo]{@link distributedAccount.DistributedAccountAbility.getOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC
* @param { AsyncCallback<DistributedInfo> } callback - Callback used to return the result. If the operation is
* successful, **err** is **undefined** and **data** is the distributed account information obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead distributedAccount.DistributedAccountAbility.getOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>)
*/
queryOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): void;
/**
* Queries the distributed account information. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountDistributedInfo]{@link distributedAccount.DistributedAccountAbility.getOsAccountDistributedInfo()}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.DISTRIBUTED_DATASYNC
* @returns { Promise<DistributedInfo> } Promise used to return the distributed account information obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead distributedAccount.DistributedAccountAbility.getOsAccountDistributedInfo()
*/
queryOsAccountDistributedInfo(): Promise<DistributedInfo>;
/**
* Obtains the distributed account information. This API uses an asynchronous callback to return the result.
*
* @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or
* ohos.permission.DISTRIBUTED_DATASYNC
* @param { AsyncCallback<DistributedInfo> } callback - Callback used to return the result. If the operation is
* successful, **err** is **undefined** and **data** is the distributed account information obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountDistributedInfo(callback: AsyncCallback<DistributedInfo>): void;
/**
* Obtains the distributed account information. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.GET_DISTRIBUTED_ACCOUNTS or
* ohos.permission.DISTRIBUTED_DATASYNC
* @returns { Promise<DistributedInfo> } Promise used to return the distributed account information obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - System service exception.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountDistributedInfo(): Promise<DistributedInfo>;
/**
* Updates the distributed account information. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setOsAccountDistributedInfo]{@link distributedAccount.DistributedAccountAbility.setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DistributedInfo } accountInfo - Distributed account information to update.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the distributed account
* information is updated successfully, **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead distributedAccount.DistributedAccountAbility.setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>)
*/
updateOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>): void;
/**
* Updates the distributed account information. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [setOsAccountDistributedInfo]{@link distributedAccount.DistributedAccountAbility.setOsAccountDistributedInfo(accountInfo: DistributedInfo)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DistributedInfo } accountInfo - Distributed account information to update.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead distributedAccount.DistributedAccountAbility.setOsAccountDistributedInfo(accountInfo: DistributedInfo)
*/
updateOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void>;
/**
* Sets the distributed account information. This API uses an asynchronous callback to return the result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS
* @param { DistributedInfo } accountInfo - Distributed account information to set.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the distributed account
* information is set successfully, **err** is **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid accountInfo.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300406 - The distributed account information has already been bound to
* a sub-profile of the same OS account. [since 26.0.0]
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
setOsAccountDistributedInfo(accountInfo: DistributedInfo, callback: AsyncCallback<void>): void;
/**
* Sets the distributed account information. This API uses a promise to return the result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS
* @param { DistributedInfo } accountInfo - Distributed account information to set.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - System service exception.
* @throws { BusinessError } 12300002 - Invalid accountInfo.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300406 - The distributed account information has already been bound to
* a sub-profile of the same OS account. [since 26.0.0]
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
setOsAccountDistributedInfo(accountInfo: DistributedInfo): Promise<void>;
}
/**
* Enumerates the statuses of a distributed account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 10
*/
enum DistributedAccountStatus {
/**
* The account has not logged in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 10
*/
NOT_LOGGED_IN = 0,
/**
* The account has logged in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 10
*/
LOGGED_IN = 1
}
/**
* Represents the distributed information about an OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
interface DistributedInfo {
/**
* Name of the distributed account. It must be a non-null string.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
name: string;
/**
* UID of the distributed account. It must be a non-null string.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
id: string;
/**
* Login state of the distributed account. The state can be login, logout, token invalid, or logoff, which
* correspond to the following strings respectively:
*
* - Ohos.account.event.LOGIN
*
* - Ohos.account.event.LOGOUT
*
* - Ohos.account.event.TOKEN_INVALID
*
* - Ohos.account.event.LOGOFF
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
event: string;
/**
* Nickname of the distributed account. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
nickname?: string;
/**
* Avatar of the distributed account. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
avatar?: string;
/**
* Status of the distributed account. The value is of the enumerated type. The default status is unlogged.
*
* @syscap SystemCapability.Account.OsAccount
* @since 10
*/
readonly status?: DistributedAccountStatus;
/**
* Additional information about the distributed account, in the form of KV pairs. This parameter is left empty by
* default.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
scalableData?: object;
}
}
export default distributedAccount;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.account.osAccount.d.ts.md
# @ohos.account.osAccount.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit BasicServicesKit
*/
import type distributedAccount from './@ohos.account.distributedAccount';
import type { AsyncCallback } from './@ohos.base';
/**
* The **osAccount** module provides basic capabilities for managing system (OS) accounts, including adding, deleting,
* querying, setting, subscribing to, and enabling an OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
declare namespace osAccount {
/**
* Obtains an **AccountManager** instance.
*
* @returns { AccountManager } **AccountManager** instance obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
function getAccountManager(): AccountManager;
/**
* Checks whether this domain account is supported. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means this domain account is
* supported; the value **false** means the opposite.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @stagemodelonly
* @since 26.0.0
*/
function isDomainAccountSupported(): Promise<boolean>;
/**
* Provides APIs for managing OS accounts.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
interface AccountManager {
/**
* Checks whether multiple OS accounts are supported. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkMultiOsAccountEnabled]{@link osAccount.AccountManager.checkMultiOsAccountEnabled(callback: AsyncCallback<boolean>)}
* > instead.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result.
* The value **true** means multiple OS accounts are supported;
* the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkMultiOsAccountEnabled(callback: AsyncCallback<boolean>)
*/
isMultiOsAccountEnable(callback: AsyncCallback<boolean>): void;
/**
* Checks whether multiple OS accounts are supported. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkMultiOsAccountEnabled]{@link osAccount.AccountManager.checkMultiOsAccountEnabled()} instead.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* multiple OS accounts are supported; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkMultiOsAccountEnabled()
*/
isMultiOsAccountEnable(): Promise<boolean>;
/**
* Checks whether multiple OS accounts are supported. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means multiple OS accounts are supported;
* the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
checkMultiOsAccountEnabled(callback: AsyncCallback<boolean>): void;
/**
* Checks whether multiple OS accounts are supported. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. The value
* **true** means multiple OS accounts are supported;
* the value **false** means the opposite.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
checkMultiOsAccountEnabled(): Promise<boolean>;
/**
* Checks whether an OS account is activated. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the account is activated; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountActivated(localId: number, callback: AsyncCallback<boolean>)
*/
isOsAccountActived(localId: number, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an OS account is activated. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the account is activated; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountActivated(localId: number)
*/
isOsAccountActived(localId: number): Promise<boolean>;
/**
* Checks whether an OS account is activated. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true**
* means the account is activated; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountActivated(localId: number, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an OS account is activated. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the account is activated; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountActivated(localId: number): Promise<boolean>;
/**
* Checks whether the specified constraint is enabled for an OS account. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { string } constraint -
* [Constraint](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) to check.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true**
* means the specified constraint is enabled; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>)
*/
isOsAccountConstraintEnable(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
/**
* Checks whether the specified constraint is enabled for an OS account. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { string } constraint -
* [Constraint](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) to check.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the specified constraint is enabled; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountConstraintEnabled(localId: number, constraint: string)
*/
isOsAccountConstraintEnable(localId: number, constraint: string): Promise<boolean>;
/**
* Checks whether the specified constraint is enabled for an OS account. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { string } constraint -
* [Constraint](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) to check.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the specified constraint is enabled; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId or constraint.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountConstraintEnabled(localId: number, constraint: string, callback: AsyncCallback<boolean>): void;
/**
* Checks whether the specified constraint is enabled for an OS account. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { string } constraint -
* [Constraint](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) to check.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the specified constraint is enabled; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId or constraint.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountConstraintEnabled(localId: number, constraint: string): Promise<boolean>;
/**
* Checks whether a constraint is enabled for this OS account. This API uses a promise to return the result.
*
* @param { string } constraint -
* [Constraint](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) to check.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the specified constraint is enabled; the value **false** means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 11
*/
isOsAccountConstraintEnabled(constraint: string): Promise<boolean>;
/**
* Checks whether this OS account is a test account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkOsAccountTestable]{@link osAccount.AccountManager.checkOsAccountTestable(callback: AsyncCallback<boolean>)}
* > instead.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the account is a test account; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountTestable(callback: AsyncCallback<boolean>)
*/
isTestOsAccount(callback: AsyncCallback<boolean>): void;
/**
* Checks whether this OS account is a test account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkOsAccountTestable]{@link osAccount.AccountManager.checkOsAccountTestable()} instead.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the account is a test account; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountTestable()
*/
isTestOsAccount(): Promise<boolean>;
/**
* Checks whether this OS account is a test account. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the account is a test account; the value **false** means the opposite;
* the default value is **false**.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
checkOsAccountTestable(callback: AsyncCallback<boolean>): void;
/**
* Checks whether this OS account is a test account. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true**
* means the account is a test account; the value **false** means the opposite;
* the default value is **false**.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
checkOsAccountTestable(): Promise<boolean>;
/**
* Checks whether an OS account has been verified. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [checkOsAccountVerified]{@link osAccount.AccountManager.checkOsAccountVerified(callback: AsyncCallback<boolean>)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the OS account has been verified; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountVerified(callback: AsyncCallback<boolean>)
*/
isOsAccountVerified(callback: AsyncCallback<boolean>): void;
/**
* Checks whether an OS account has been verified. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value
* **true** means the OS account has been verified; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>)
*/
isOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an OS account has been verified. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account. If this parameter is not specified,
* this API checks whether the current OS account has been verified. The default value is **-1**.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the
* OS account has been verified; the value **false** means the opposite.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.checkOsAccountVerified(localId: number)
*/
isOsAccountVerified(localId?: number): Promise<boolean>;
/**
* Checks whether this OS account is unlocked. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. You are advised to use
* > [isOsAccountUnlocked]{@link osAccount.AccountManager.isOsAccountUnlocked()} instead.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true**
* means the OS account has been verified; the value **false** means the opposite.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
* @useinstead osAccount.AccountManager.isOsAccountUnlocked()
*/
checkOsAccountVerified(callback: AsyncCallback<boolean>): void;
/**
* Checks whether this OS account has been verified. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. You are advised to use
* > [isOsAccountUnlocked]{@link osAccount.AccountManager.isOsAccountUnlocked()} instead.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the
* OS account has been verified; the value **false** means the opposite.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
* @useinstead osAccount.AccountManager.isOsAccountUnlocked()
*/
checkOsAccountVerified(): Promise<boolean>;
/**
* Checks whether an OS account has been verified. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value **true**
* means the OS account has been verified; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountVerified(localId: number, callback: AsyncCallback<boolean>): void;
/**
* Checks whether an OS account has been verified. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account. If this parameter is not specified,
* this API checks whether the current OS account has been verified.
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means the
* OS account has been verified; the value **false** means the opposite.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
checkOsAccountVerified(localId: number): Promise<boolean>;
/**
* Checks whether this OS account is unlocked. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the result. The value **true** means
* the OS account has been verified; the value **false** means the opposite.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 11
*/
isOsAccountUnlocked(): Promise<boolean>;
/**
* Obtains the name of the OS account of the caller. This API uses a promise to return the result.
*
* @returns { Promise<string> } Promise used to return the OS account name obtained.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 12
*/
getOsAccountName(): Promise<string>;
/**
* Obtains the name of an OS account based on its local ID. This API uses a promise to return the result.
*
* @permission ohos.permission.GET_LOCAL_ACCOUNT_IDENTIFIERS
* @param { number } localId - Local ID of the target OS account.
* @returns { Promise<string> } Promise used to return the name of the target OS account.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300003 - Account not found.
* @throws { BusinessError } 12300008 - Restricted Account.
* @syscap SystemCapability.Account.OsAccount
* @stagemodelonly
* @since 26.0.0
*/
getOsAccountNameByLocalId(localId: number): Promise<string>;
/**
* Obtains the number of OS accounts created. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountCount]{@link osAccount.AccountManager.getOsAccountCount(callback: AsyncCallback<number>)} instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the number of created OS accounts.
* If the operation fails, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountCount(callback: AsyncCallback<int>)
*/
getCreatedOsAccountsCount(callback: AsyncCallback<number>): void;
/**
* Obtains the number of OS accounts created. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountCount]{@link osAccount.AccountManager.getOsAccountCount()} instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @returns { Promise<number> } Promise used to return the number of created OS accounts.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountCount()
*/
getCreatedOsAccountsCount(): Promise<number>;
/**
* Obtains the number of OS accounts created. This API uses an asynchronous callback to return the result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the number of created OS accounts.
* If the operation fails, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountCount(callback: AsyncCallback<number>): void;
/**
* Obtains the number of OS accounts created. This API uses a promise to return the result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @returns { Promise<number> } Promise used to return the number of created OS accounts.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountCount(): Promise<number>;
/**
* Obtains the ID of the OS account to which the current process belongs. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalId]{@link osAccount.AccountManager.getOsAccountLocalId(callback: AsyncCallback<number>)}
* > instead.
*
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalId(callback: AsyncCallback<int>)
*/
getOsAccountLocalIdFromProcess(callback: AsyncCallback<number>): void;
/**
* Obtains the ID of the OS account to which the current process belongs. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalId]{@link osAccount.AccountManager.getOsAccountLocalId()} instead.
*
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalId()
*/
getOsAccountLocalIdFromProcess(): Promise<number>;
/**
* Obtains the ID of the OS account to which the current process belongs. This API uses an asynchronous callback
* to return the result.
*
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalId(callback: AsyncCallback<number>): void;
/**
* Obtains the ID of the OS account to which the current process belongs. This API uses a promise to return the
* result.
*
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalId(): Promise<number>;
/**
* Obtains the local IDs of all non-system-level OS accounts. Non-system-level OS accounts are visible to
* users and are usually used for operations such as login. This API uses a promise to return the result.
*
* @permission ohos.permission.GET_LOCAL_ACCOUNT_IDENTIFIERS
* @returns { Promise<number[]> } Promise used to return the local IDs of all non-system-level OS accounts.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @stagemodelonly
* @since 26.0.0
*/
getOsAccountLocalIds(): Promise<number[]>;
/**
* Obtains the OS account ID based on the process UID. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForUid]{@link osAccount.AccountManager.getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback<number>)}
* > instead.
*
* @param { number } uid - Process UID.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **data** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForUid(uid: int, callback: AsyncCallback<int>)
*/
getOsAccountLocalIdFromUid(uid: number, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the process UID. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForUid]{@link osAccount.AccountManager.getOsAccountLocalIdForUid(uid: number)} instead.
*
* @param { number } uid - Process UID.
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForUid(uid: int)
*/
getOsAccountLocalIdFromUid(uid: number): Promise<number>;
/**
* Obtains the OS account ID based on the process UID. This API uses an asynchronous callback to return the
* result.
*
* @param { number } uid - Process UID.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **data** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid uid.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the process UID. This API uses a promise to return the result.
*
* @param { number } uid - Process UID.
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid uid.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForUid(uid: number): Promise<number>;
/**
* Obtains the OS account ID based on the process UID. The API returns the result synchronously.
*
* @param { number } uid - Process UID.
* @returns { number } OS account ID obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300002 - Invalid uid.
* @syscap SystemCapability.Account.OsAccount
* @since 10
*/
getOsAccountLocalIdForUidSync(uid: number): number;
/**
* Obtains the OS account ID based on the domain account information. This API uses an asynchronous callback to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForDomain]{@link osAccount.AccountManager.getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DomainAccountInfo } domainInfo - Domain account information.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<int>)
*/
getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the domain account information. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForDomain]{@link osAccount.AccountManager.getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo)}
* > instead.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DomainAccountInfo } domainInfo - Domain account information.
* @returns { Promise<number> } Promise used to return the ID of the OS account associated
* with the domain account.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo)
*/
getOsAccountLocalIdFromDomain(domainInfo: DomainAccountInfo): Promise<number>;
/**
* Obtains the OS account ID based on the domain account information. This API uses an asynchronous callback to
* return the result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DomainAccountInfo } domainInfo - Domain account information.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is the ID of the OS account associated with
* the domain account. Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid domainInfo.
* @throws { BusinessError } 12300003 - Domain account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the domain account information. This API uses a promise to return the
* result.
* This API can be called only by system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { DomainAccountInfo } domainInfo - Domain account information.
* @returns { Promise<number> } Promise used to return the ID of the OS account associated with the domain account.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid domainInfo.
* @throws { BusinessError } 12300003 - Domain account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise<number>;
/**
* Obtains all constraints enabled for an OS account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<Array<string>> } callback - Callback used to return the result. If the operation is
* successful, **err** is **null** and **data** is a list of all
* [constraints](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) enabled
* for the OS account. Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountConstraints(localId: number, callback: AsyncCallback<Array<string>>)
*/
getOsAccountAllConstraints(localId: number, callback: AsyncCallback<Array<string>>): void;
/**
* Obtains all constraints enabled for an OS account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @returns { Promise<Array<string>> } Promise used to return all the
* [constraints](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) enabled
* for the OS account.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountConstraints(localId: number)
*/
getOsAccountAllConstraints(localId: number): Promise<Array<string>>;
/**
* Obtains all constraints enabled for an OS account. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<Array<string>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is all
* [constraints](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
getOsAccountConstraints(localId: number, callback: AsyncCallback<Array<string>>): void;
/**
* Obtains all constraints enabled for an OS account. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @returns { Promise<Array<string>> } Promise used to return all the
* [constraints](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) enabled
* for the OS account.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
getOsAccountConstraints(localId: number): Promise<Array<string>>;
/**
* Obtains information about all activated OS accounts. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getActivatedOsAccountLocalIds]{@link osAccount.AccountManager.getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<number>>)}
* > instead.
*
* @param { AsyncCallback<Array<number>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of activated OS accounts.
* Otherwise, **data** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<int>>)
*/
queryActivatedOsAccountIds(callback: AsyncCallback<Array<number>>): void;
/**
* Obtains information about all activated OS accounts. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getActivatedOsAccountLocalIds]{@link osAccount.AccountManager.getActivatedOsAccountLocalIds()} instead.
*
* @returns { Promise<Array<number>> } Promise used to return the information about all activated OS accounts.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getActivatedOsAccountLocalIds()
*/
queryActivatedOsAccountIds(): Promise<Array<number>>;
/**
* Obtains information about all activated OS accounts. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<Array<number>> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is a list of activated OS accounts.
* Otherwise, **data** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getActivatedOsAccountLocalIds(callback: AsyncCallback<Array<number>>): void;
/**
* Obtains information about all activated OS accounts. This API uses a promise to return the result.
*
* @returns { Promise<Array<number>> } Promise used to return the information about all activated OS accounts.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getActivatedOsAccountLocalIds(): Promise<Array<number>>;
/**
* Obtains the ID of the foreground OS account. This API uses a promise to return the result.
*
* @returns { Promise<number> } Promise used to return the ID of the foreground OS account.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 15
*/
getForegroundOsAccountLocalId(): Promise<number>;
/**
* Obtains information about the OS account to which the current process belongs. This API uses an asynchronous
* callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { AsyncCallback<OsAccountInfo> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account information obtained.
* Otherwise, **data** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>)
*/
queryCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>): void;
/**
* Obtains information about the OS account to which the current process belongs. This API uses a promise to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @returns { Promise<OsAccountInfo> } Promise used to return the OS account information obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getCurrentOsAccount()
*/
queryCurrentOsAccount(): Promise<OsAccountInfo>;
/**
* Obtains information about the OS account to which the current process belongs. This API uses an asynchronous
* callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS [since 9 - 9]
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.GET_LOCAL_ACCOUNTS [since 10]
* @param { AsyncCallback<OsAccountInfo> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account information obtained.
* Otherwise, **data** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
getCurrentOsAccount(callback: AsyncCallback<OsAccountInfo>): void;
/**
* Obtains information about the OS account to which the current process belongs. This API uses a promise to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 9 and deprecated since API version 11. The substitute API is available
* > only to system applications.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS [since 9 - 9]
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.GET_LOCAL_ACCOUNTS [since 10]
* @returns { Promise<OsAccountInfo> } Promise used to return the OS account information obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
* @deprecated since 11
*/
getCurrentOsAccount(): Promise<OsAccountInfo>;
/**
* Obtains the domain account information associated with a specified OS account. This API uses a promise to
* return the result.
*
* @permission ohos.permission.GET_DOMAIN_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS
* @param { number } localId - ID of the target OS account.
* @returns { Promise<DomainAccountInfo> } Promise used to return the domain account information obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300003 - OS account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 15
*/
getOsAccountDomainInfo(localId: number): Promise<DomainAccountInfo>;
/**
* Obtains the type of the account to which the current process belongs. This API uses an asynchronous callback to
* return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountType]{@link osAccount.AccountManager.getOsAccountType(callback: AsyncCallback<OsAccountType>)}
* > instead.
*
* @param { AsyncCallback<OsAccountType> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account type obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountType(callback: AsyncCallback<OsAccountType>)
*/
getOsAccountTypeFromProcess(callback: AsyncCallback<OsAccountType>): void;
/**
* Obtains the type of the account to which the current process belongs. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [getOsAccountType]{@link osAccount.AccountManager.getOsAccountType()} instead.
*
* @returns { Promise<OsAccountType> } Promise used to return the OS account type obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountType()
*/
getOsAccountTypeFromProcess(): Promise<OsAccountType>;
/**
* Obtains the type of the account to which the current process belongs. This API uses an asynchronous callback to
* return the result.
*
* @param { AsyncCallback<OsAccountType> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account type obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountType(callback: AsyncCallback<OsAccountType>): void;
/**
* Obtains the type of the account to which the current process belongs. This API uses a promise to return the
* result.
*
* @returns { Promise<OsAccountType> } Promise used to return the OS account type obtained.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountType(): Promise<OsAccountType>;
/**
* Obtains the ID of a distributed virtual device. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [queryDistributedVirtualDeviceId]{@link osAccount.AccountManager.queryDistributedVirtualDeviceId(callback: AsyncCallback<string>)}
* > instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the distributed virtual
* device ID obtained. Otherwise, **data** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.queryDistributedVirtualDeviceId(callback: AsyncCallback<string>)
*/
getDistributedVirtualDeviceId(callback: AsyncCallback<string>): void;
/**
* Obtains the ID of this distributed virtual device. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 7 and deprecated since API version 9. You are advised to use
* > [queryDistributedVirtualDeviceId]{@link osAccount.AccountManager.queryDistributedVirtualDeviceId()} instead.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @returns { Promise<string> } Promise used to return the distributed virtual device ID obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 7
* @deprecated since 9
* @useinstead osAccount.AccountManager.queryDistributedVirtualDeviceId()
*/
getDistributedVirtualDeviceId(): Promise<string>;
/**
* Queries the ID of a distributed virtual device. This API uses an asynchronous callback to return the result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @param { AsyncCallback<string> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the distributed virtual device ID
* obtained. Otherwise, **data** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
queryDistributedVirtualDeviceId(callback: AsyncCallback<string>): void;
/**
* Queries the ID of this distributed virtual device. This API uses a promise to return the result.
*
* @permission ohos.permission.DISTRIBUTED_DATASYNC or ohos.permission.MANAGE_LOCAL_ACCOUNTS
* @returns { Promise<string> } Promise used to return the distributed virtual device ID obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
queryDistributedVirtualDeviceId(): Promise<string>;
/**
* Obtains the OS account ID based on the SN. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForSerialNumber]{@link osAccount.AccountManager.getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback<number>)}
* > instead.
*
* @param { number } serialNumber - Account SN.
* @param { AsyncCallback<number> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForSerialNumber(serialNumber: long, callback: AsyncCallback<int>)
*/
getOsAccountLocalIdBySerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the SN. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getOsAccountLocalIdForSerialNumber]{@link osAccount.AccountManager.getOsAccountLocalIdForSerialNumber(serialNumber: number)}
* > instead.
*
* @param { number } serialNumber - Account SN.
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getOsAccountLocalIdForSerialNumber(serialNumber: long)
*/
getOsAccountLocalIdBySerialNumber(serialNumber: number): Promise<number>;
/**
* Obtains the OS account ID based on the SN. This API uses an asynchronous callback to return the result.
*
* @param { number } serialNumber - Account SN.
* @param { AsyncCallback<number> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the OS account ID obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid serialNumber.
* @throws { BusinessError } 12300003 - The account indicated by serialNumber does not exist.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback<number>): void;
/**
* Obtains the OS account ID based on the SN. This API uses a promise to return the result.
*
* @param { number } serialNumber - Account SN.
* @returns { Promise<number> } Promise used to return the OS account ID obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid serialNumber.
* @throws { BusinessError } 12300003 - The account indicated by serialNumber does not exist.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise<number>;
/**
* Obtains the SN of an OS account based on the account ID. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getSerialNumberForOsAccountLocalId]{@link osAccount.AccountManager.getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback<number>)}
* > instead.
*
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<number> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the SN obtained.
* Otherwise, **err** is an error object.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getSerialNumberForOsAccountLocalId(localId: int, callback: AsyncCallback<long>)
*/
getSerialNumberByOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
/**
* Obtains the SN of an OS account based on the account ID. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > This API is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [getSerialNumberForOsAccountLocalId]{@link osAccount.AccountManager.getSerialNumberForOsAccountLocalId(localId: number)}
* > instead.
*
* @param { number } localId - ID of the target OS account.
* @returns { Promise<number> } Promise used to return the SN obtained.
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 9
* @useinstead osAccount.AccountManager.getSerialNumberForOsAccountLocalId(localId: int)
*/
getSerialNumberByOsAccountLocalId(localId: number): Promise<number>;
/**
* Obtains the SN of an OS account based on the account ID. This API uses an asynchronous callback to return the
* result.
*
* @param { number } localId - ID of the target OS account.
* @param { AsyncCallback<number> } callback - Callback used to return the result.
* If the operation is successful, **err** is **null** and **data** is the SN obtained.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback<number>): void;
/**
* Obtains the SN of an OS account based on the account ID. This API uses a promise to return the result.
*
* @param { number } localId - ID of the target OS account.
* @returns { Promise<number> } Promise used to return the SN obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameter types.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid localId.
* @throws { BusinessError } 12300003 - Account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 9
*/
getSerialNumberForOsAccountLocalId(localId: number): Promise<number>;
}
/**
* Represents information about an OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
interface OsAccountInfo {
/**
* ID of the target OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
localId: number;
/**
* Name of the OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
localName: string;
/**
* Type of the OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
type: OsAccountType;
/**
* [Constraints](docroot://reference/apis-basic-services-kit/js-apis-osAccount.md#constraints) of the system
* account. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
constraints: Array<string>;
/**
* Whether the account has been verified. The value **true** means the specified account has been verified; the
* value **false** means the opposite.
*
* Note: This parameter is supported since API version 7 and deprecated since API version 11. You are advised to use
* **isUnlocked** instead.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 11
* @useinstead osAccount.OsAccountInfo.isUnlocked
*/
isVerified: boolean;
/**
* Whether the account is unlocked (whether the **el2/** directory is decrypted). The value **true** means the
* specified account is unlocked; the value **false** means the opposite.
*
* @syscap SystemCapability.Account.OsAccount
* @since 11
*/
isUnlocked: boolean;
/**
* Avatar of the OS account. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
photo: string;
/**
* OS account creation time. The value is a Unix timestamp (in seconds).
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
createTime: number;
/**
* Last login time of the OS account. The value is a Unix timestamp (in seconds).
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
lastLoginTime: number;
/**
* SN of the OS account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
serialNumber: number;
/**
* Whether the OS account is activated. The value **true** means the specified account is activated; the value
* **false** means the opposite.
*
* Note: This parameter is supported since API version 7 and deprecated since API version 11. You are advised to use
* **isActivated** instead.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
* @deprecated since 11
* @useinstead osAccount.OsAccountInfo.isActivated
*/
isActived: boolean;
/**
* Whether the OS account is activated. The value **true** means the specified account is activated; the value
* **false** means the opposite.
*
* @syscap SystemCapability.Account.OsAccount
* @since 11
*/
isActivated: boolean;
/**
* Whether the OS account information is complete. The value **true** means the specified account is complete;
* the value **false** means the opposite.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
isCreateCompleted: boolean;
/**
* Distributed account information. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
distributedInfo: distributedAccount.DistributedInfo;
/**
* Domain account information. By default, no value is passed in.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
domainInfo: DomainAccountInfo;
}
/**
* Represents the domain account information.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
interface DomainAccountInfo {
/**
* Domain name.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
domain: string;
/**
* Domain account name.
*
* @syscap SystemCapability.Account.OsAccount
* @since 8
*/
accountName: string;
/**
* Domain account configuration ID, which is an empty string by default.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
serverConfigId?: string;
/**
* Additional information about the domain account.
*
* @syscap SystemCapability.Account.OsAccount
* @stagemodelonly
* @since 26.0.0
*/
additionalInfo?: Record<string, Object>;
}
/**
* Enumerates the OS account types.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
enum OsAccountType {
/**
* Administrator account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
ADMIN = 0,
/**
* Normal account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
NORMAL = 1,
/**
* Guest account.
*
* @syscap SystemCapability.Account.OsAccount
* @since 7
*/
GUEST = 2
}
/**
* Provides APIs for domain account management.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
class DomainAccountManager {
/**
* Updates information of a domain account. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.MANAGE_DOMAIN_ACCOUNTS
* @param { DomainAccountInfo } oldAccountInfo - Domain account information.
* @param { DomainAccountInfo } newAccountInfo - New domain account information.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - The new account info is invalid.
* @throws { BusinessError } 12300003 - The old account not found.
* @throws { BusinessError } 12300004 - The new account already exists.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static updateAccountInfo(oldAccountInfo: DomainAccountInfo, newAccountInfo: DomainAccountInfo): Promise<void>;
}
/**
* Represents the configuration of a domain server.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
interface DomainServerConfig {
/**
* Server configuration parameters.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
parameters: Record<string, Object>;
/**
* Server configuration ID.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
id: string;
/**
* Domain to which the server belongs.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
domain: string;
}
/**
* Provides APIs for domain server configuration and management.
*
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
class DomainServerConfigManager {
/**
* Adds domain server configuration. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @param { Record<string, Object> } parameters - Configuration parameters of the domain server.
* @returns { Promise<DomainServerConfig> } Promise used to return the configuration of
* the newly added domain server.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid server config parameters.
* @throws { BusinessError } 12300211 - Server unreachable.
* @throws { BusinessError } 12300213 - Server config already exists.
* @throws { BusinessError } 12300215 - The number of server config reaches the upper limit.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static addServerConfig(parameters: Record<string, Object>): Promise<DomainServerConfig>;
/**
* Removes domain server configuration. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @param { string } configId - Server configuration ID.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300212 - Server config not found.
* @throws { BusinessError } 12300214 - Server config has been associated with an account.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static removeServerConfig(configId: string): Promise<void>;
/**
* Updates the domain server configuration. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @param { string } configId - Server configuration ID.
* @param { Record<string, Object> } parameters - Configuration parameters of the domain server.
* @returns { Promise<DomainServerConfig> } Promise used to return the updated domain server configuration.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300002 - Invalid server config parameters.
* @throws { BusinessError } 12300211 - Server unreachable.
* @throws { BusinessError } 12300212 - Server config not found.
* @throws { BusinessError } 12300213 - Server config already exists.
* @throws { BusinessError } 12300214 - Server config has been associated with an account.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static updateServerConfig(configId: string, parameters: Record<string, Object>): Promise<DomainServerConfig>;
/**
* Obtains the domain server configuration. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @param { string } configId - Server configuration ID.
* @returns { Promise<DomainServerConfig> } Promise used to return the domain server configuration obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300212 - Server config not found.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static getServerConfig(configId: string): Promise<DomainServerConfig>;
/**
* Obtains the configurations of all domain servers. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @returns { Promise<Array<DomainServerConfig>> } Promise used to return the domain server configuration obtained.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static getAllServerConfigs(): Promise<Array<DomainServerConfig>>;
/**
* Obtains the server configuration of a domain account. This API uses a promise to return the result.
*
* @permission ohos.permission.MANAGE_DOMAIN_ACCOUNT_SERVER_CONFIGS
* @param { DomainAccountInfo } domainAccountInfo - Information of the domain account.
* @returns { Promise<DomainServerConfig> } Promise used to return the domain server configuration of the account.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 12300001 - The system service works abnormally.
* @throws { BusinessError } 12300003 - Domain account not found.
* @syscap SystemCapability.Account.OsAccount
* @since 18
*/
static getAccountServerConfig(domainAccountInfo: DomainAccountInfo): Promise<DomainServerConfig>;
}
}
export default osAccount;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.advertising.AdsServiceExtensionAbility.d.ts.md
# @ohos.advertising.AdsServiceExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The AdsServiceExtensionAbility module provides ExtensionAbilities for the ads service. Device vendors can implement
* the callbacks for ads requests.
*
* @file ExtensionAbility for Ads
* @kit AdsKit
*/
import type advertising from './@ohos.advertising';
/**
* Ad request callback.
*
* @syscap SystemCapability.Advertising.Ads
* @since 11
*/
export interface RespCallback {
/**
* Data in the ad request callback.
*
* @param { Map<string, Array<advertising.Advertisement>> } respData - Callback data of ad requests.
* It is a mapping collection that takes ad unit ID as the key and stores acquired ad content.
* @syscap SystemCapability.Advertising.Ads
* @since 11
*/
(respData: Map<string, Array<advertising.Advertisement>>): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.advertising.d.ts.md
# @ohos.advertising.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Ads Service Framework
* @kit AdsKit
*/
import type web_webview from './@ohos.web.webview';
import type common from './@ohos.app.ability.common';
import type { Advertisement as _Advertisement } from './advertising/advertisement';
/**
* The advertising module provides APIs for requesting and displaying ads.
*
* > **NOTE**
* > The initial APIs of this module are supported since API version 11.
* > Newly added APIs will be marked with a superscript to indicate their earliest API version.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
declare namespace advertising {
/**
* Defines the requested ad content.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export type Advertisement = _Advertisement;
/**
* Defines the ad request parameters.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface AdRequestParams {
/**
* Ad slot ID.
*
* Note: The getAdRequestBody API can omit this parameter.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adId: string;
/**
* Requested ad type.
*
* - 1: Splash ad.
* - 3: Native ad.
* - 7: Rewarded ad.
* - 8: Banner ad.
* - 12: Interstitial ad
* - 60: Roll ad.
*
* If not set, the default is the native ad type.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adType?: number;
/**
* Number of ads requested. If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adCount?: number;
/**
* Expected creative width when requesting an ad, in vp (mandatory for banner ads).
* If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adWidth?: number;
/**
* Expected creative height when requesting an ad,
* in vp (mandatory for banner ads). If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adHeight?: number;
/**
* Ad keyword. Defaults to "" if not set.
*
* Note: Not supported for use currently.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adSearchKeyword?: string;
/**
* Custom parameter.
*
* <!--RP2--><!--RP2End-->
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
[key: string]: number | boolean | string | undefined;
}
/**
* Defines the ad configuration.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface AdOptions {
/**
* Whether you want your content to be treated as child-directed for purposes of COPPA.
*
* -1: Default value, unspecified.
* 0: No.
* 1: Yes.
*
* The default value is -1.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
tagForChildProtection?: number;
/**
* Sets the maximum ad content rating.
*
* W: ages 3+, all audiences.
* PI: ages 7+, parental guidance.
* J: ages 12+, teen.
* A: ages 16+/18+, adult audience.
*
* If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
adContentClassification?: string;
/**
* Sets whether to request only non-personalized ads.
*
* 0: Request both personalized and non-personalized ads.
* 1: Request only non-personalized ads.
*
* If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
nonPersonalizedAd?: number;
/**
* Custom parameters.
*
* <!--RP1--><!--RP1End-->
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
[key: string]: number | boolean | string | undefined;
}
/**
* Defines the ad display parameters.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface AdDisplayOptions {
/**
* Media custom data. Used for the server to notify the media server
* that a user should be rewarded for interacting with a rewarded video ad,
* thereby preventing fraudulent behavior (no notification will be sent if not set).
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
customData?: string;
/**
* Media custom user ID.
* Used for the server to notify the media server that
* a user should be rewarded for interacting with a rewarded video ad,
* thereby preventing fraudulent behavior (no notification will be sent if not set).
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
userId?: string;
/**
* Whether to display a pop-up notification to the user when using mobile data
* to play videos or download apps.
*
* - true: Display pop-up notification.
* - false: Do not display pop-up notification.
* - This parameter depends on the traffic pop-up feature,
* which currently does not support full functionality,
* so the default value is temporarily uncertain.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
useMobileDataReminder?: boolean;
/**
* Whether to mute the ad video playback.
*
* - true: Mute playback.
* - false: Non-mute playback.
*
* If not set, the business logic prevails.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
mute?: boolean;
/**
* Scenario type for obtaining audio focus during video playback.
*
* - 0: Obtain focus during both muted and non-muted video playback.
* - 1: Do not obtain focus during muted video playback.
* - 2: Do not obtain focus during either muted or non-muted video playback.
* - The related features that this API depends on are currently not supported for use,
* so the default value is temporarily uncertain.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
audioFocusType?: number;
/**
* Custom parameter.
*
* - refreshTime: An optional custom parameter for the AutoAdComponent,
* used to control the ad rotation interval. Type number, unit: ms, value range [30000, 120000].
* If not set or the value is non-numeric or less than or equal to 0, no rotation occurs,
* and only the first ad content in the ad response is displayed. Values less than 30000 are set to 30000,
* and values greater than 120000 are set to 120000.
*
* <!--RP3--><!--RP3End-->
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
[key: string]: number | boolean | string | undefined;
}
/**
* Defines the ad status change callback.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface AdInteractionListener {
/**
* Called when the ad display status changes.
*
* @param { string } status - Ad show status.
* - onAdLoad: Ad loaded successfully.
* - onAdFail: Ad failed to load.
* - onAdOpen: Ad opened.
* - onAdClick: Ad clicked.
* - onAdClose: Ad closed.
* - onMediaProgress: Ad playback progress.
* - onMediaStart: Ad playback started.
* - onMediaPause: Ad playback paused.
* - onMediaStop: Ad playback stopped.
* - onMediaComplete: Ad playback completed.
* - onMediaCountDown: Ad countdown.
* - onMediaError: Ad playback failed.
* - onLandscape: Full-screen button clicked in portrait mode.
* - onPortrait: Back button clicked in full-screen mode.
* - onBackClicked: Back button clicked.
* - onAdSubWindow: Sheet opened.
* @param { Advertisement } ad - Content of the ad.
* @param { string } data - Extended information.
* When **status** is **onAdClose**,
* the data value is the close reason, described as follows:
* - adShowEnded: Ad show ended.
* - adCloseBtnClicked: Close button clicked.
* - adSkipBtnClicked: Skip button clicked.
* - adFeedbackClosed: The ad is closed due to negative feedback.
* - adBackgroundClosed: The splash ad is closed when the app switches to the background.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
onStatusChanged(status: string, ad: Advertisement, data: string);
}
/**
* Enumerates the callbacks used for the request for loading an ad.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface AdLoadListener {
/**
* Called when an ad request fails.
*
* @param { number } errorCode - Error code for the ad request failure.
* @param { string } errorMsg - Error message for the ad request failure.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
onAdLoadFailure(errorCode: number, errorMsg: string): void;
/**
* Called when an ad request is successful.
*
* @param { Array<Advertisement> } ads - Ad data.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
onAdLoadSuccess(ads: Array<Advertisement>): void;
}
/**
* Enumerates the callbacks used for the request for loading multiple ads.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export interface MultiSlotsAdLoadListener {
/**
* Called when an ad request fails.
*
* @param { number } errorCode - Error code for the ad request failure.
* @param { string } errorMsg - Error message for the ad request failure.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
onAdLoadFailure(errorCode: number, errorMsg: string): void;
/**
* Called when a request for loading multiple ads is successful.
*
* @param { Map<string, Array<Advertisement>> } adsMap - Ad data, which is a mapping set that
* uses ad slot IDs as keys to store the requested ad content.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
onAdLoadSuccess(adsMap: Map<string, Array<Advertisement>>): void;
}
/**
* Shows a full-screen ad.
*
* @param { Advertisement } ad - Ad object.
* @param { AdDisplayOptions } options - Ad display parameters.
* @param { common.UIAbilityContext } context - Context of the UIAbility. If not set, it is obtained from the api:
* [@ohos.app.ability.common](https://developer.huawei.com/consumer/en/doc/harmonyos-references/
* js-apis-app-ability-common). [since 11 - 11]
* @param { common.UIAbilityContext } [context] - Context of the UIAbility. If this parameter is not set, the value is
* obtained from @ohos.app.ability.common. [since 12]
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: 1. Mandatory parameters are left
* unspecified.
* @throws { BusinessError } 21800001 - System internal error.
* @throws { BusinessError } 21800004 - Failed to display the ad.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
function showAd(ad: Advertisement, options: AdDisplayOptions, context?: common.UIAbilityContext): void;
/**
* Provides the APIs for loading ads.
*
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
export class AdLoader {
/**
* Constructor.
*
* @param { common.Context } context - Context of the ability or application.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
constructor(context: common.Context);
/**
* Loads an ad.
*
* @param { AdRequestParams } adParam - Ad request parameters.
* @param { AdOptions } adOptions - Ad configuration parameters.
* @param { AdLoadListener } listener - Callback listener for ad requests.
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: 1. Mandatory parameters are left
* unspecified.2. Incorrect parameter types. 3.Parameter verification failed
* @throws { BusinessError } 21800001 - System internal error.
* @throws { BusinessError } 21800003 - Failed to load the ad request.
* @throws { BusinessError } 801 - Device not supported. [since 12]
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
loadAd(adParam: AdRequestParams, adOptions: AdOptions, listener: AdLoadListener): void;
/**
* Loads multiple ads.
*
* @param { AdRequestParams[] } adParams - Ad request parameters.
* @param { AdOptions } adOptions - Ad configuration parameters.
* @param { MultiSlotsAdLoadListener } listener - Callback listener for ad requests.
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: 1. Mandatory parameters are left
* unspecified.2. Incorrect parameter types. 3.Parameter verification failed
* @throws { BusinessError } 21800001 - System internal error.
* @throws { BusinessError } 21800003 - Failed to load the ad request.
* @throws { BusinessError } 801 - Device not supported. [since 12]
* @syscap SystemCapability.Advertising.Ads
* @atomicservice [since 12]
* @since 11
*/
loadAdWithMultiSlots(adParams: AdRequestParams[], adOptions: AdOptions, listener: MultiSlotsAdLoadListener): void;
}
/**
* Obtains the body of an ad request. This API uses a promise to return the result
* (this API is only open to some pre-installed system applications).
*
* @param { AdRequestParams[] } adParams - Ad request parameters.
* **Note:** The **adId** parameter of this API can be empty.
* @param { AdOptions } adOptions - Ad configuration parameters.
* @returns { Promise<string> } Promise used to return the ad data of the string type.
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: 1. Mandatory parameters are
* left unspecified. 2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Device not supported.
* @throws { BusinessError } 21800001 - System internal error.
* @syscap SystemCapability.Advertising.Ads
* @since 12
*/
function getAdRequestBody(adParams: AdRequestParams[], adOptions: AdOptions): Promise<string>;
/**
* Parses and processes the body of an ad response
* (this API is only open to some pre-installed system applications).
*
* @param { string } adResponse - Ad response body.
* @param { MultiSlotsAdLoadListener } listener - Callback listener for ad requests.
* @param { common.UIAbilityContext } context - Context of the UIAbility.
* @throws { BusinessError } 401 - Invalid input parameter.Possible causes: 1. Mandatory parameters are
* left unspecified. 2. Incorrect parameter types. 3. Parameter verification failed.
* @throws { BusinessError } 801 - Device not supported.
* @throws { BusinessError } 21800001 - System internal error.
* @throws { BusinessError } 21800005 - Failed to parse the ad response.
* @syscap SystemCapability.Advertising.Ads
* @since 12
*/
function parseAdResponse(adResponse: string, listener: MultiSlotsAdLoadListener, context: common.UIAbilityContext): void;
/**
* Injects an ad JavaScript object to the **Web** component
* (this API is only open to some pre-installed system applications).
*
* @param { web_webview.WebviewController } controller - Web component controller.
* @param { common.UIAbilityContext } context - Context of the UIAbility.
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: 1. Mandatory parameters are left
* unspecified.
* @throws { BusinessError } 21800001 - System internal error.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice
* @since 12
*/
function registerWebAdInterface(controller: web_webview.WebviewController, context: common.UIAbilityContext): void;
/**
* Injects an ad JavaScript object to the **Web** component
* (this API is only open to some pre-installed system applications).
*
* @param { web_webview.WebviewController } controller - Web component controller.
* @param { common.UIAbilityContext } context - Context of the UIAbility.
* @param { boolean } needRefresh - Whether to refresh the page (true: yes; false: no).
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: Mandatory parameters are left
* unspecified.
* @throws { BusinessError } 21800001 - System internal error.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice
* @since 16
*/
function registerWebAdInterface(controller: web_webview.WebviewController, context: common.UIAbilityContext, needRefresh: boolean): void;
/**
* Deletes the ad JavaScript object injected through **registerWebAdInterface**
* (this API is only open to some pre-installed system applications).
*
* @param { web_webview.WebviewController } controller - Web component controller.
* @param { boolean } needRefresh - Whether to refresh the page (true: yes; false: no).
* @throws { BusinessError } 401 - Invalid input parameter. Possible causes: Mandatory parameters are left
* unspecified.
* @throws { BusinessError } 21800001 - System internal error.
* @syscap SystemCapability.Advertising.Ads
* @atomicservice
* @since 16
*/
function deleteWebAdInterface(controller: web_webview.WebviewController, needRefresh: boolean): void;
}
export default advertising;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.ai.mindSporeLite.d.ts.md
# @ohos.ai.mindSporeLite.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit MindSporeLiteKit
*/
import { Callback } from './@ohos.base';
/**
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
declare namespace mindSporeLite {
/**
* Create a Model instance from file path
*
* @param { string } model - model indicates model path to be loaded
* @param { Context } context - context indicates model context information
* @returns { Promise<Model> } the promise returned by the function.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFile(model: string, context?: Context): Promise<Model>;
/**
* Create a Model instance from file path.
*
* @param { string } model - model indicates model path to be loaded
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFile(model: string, callback: Callback<Model>): void;
/**
* Create a Model instance from file path.
*
* @param { string } model - model indicates model path to be loaded
* @param { Context } context - context indicates model context information
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFile(model: string, context: Context, callback: Callback<Model>): void;
/**
* Create a Model instance from buffer
*
* @param { ArrayBuffer } model - model indicates model buffer to be loaded
* @param { Context } [context] - context indicates model context information
* @returns { Promise<Model> } the promise returned by the function.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromBuffer(model: ArrayBuffer, context?: Context): Promise<Model>;
/**
* Create a Model instance from buffer
*
* @param { ArrayBuffer } model - model indicates model buffer to be loaded
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromBuffer(model: ArrayBuffer, callback: Callback<Model>): void;
/**
* Create a Model instance from buffer
*
* @param { ArrayBuffer } model - model indicates model buffer to be loaded
* @param { Context } context - context indicates model context information
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromBuffer(model: ArrayBuffer, context: Context, callback: Callback<Model>): void;
/**
* Creates a Model instance file description
*
* @param { number } model - model indicates model file description to be loaded
* @param { Context } [context] - context indicates model context information
* @returns { Promise<Model> } the promise returned by the function.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFd(model: number, context?: Context): Promise<Model>;
/**
* Create a Model instance from file description
*
* @param { number } model - model indicates model file description to be loaded
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFd(model: number, callback: Callback<Model>): void;
/**
* Create a Model instance from file description
*
* @param { number } model - model indicates model file description to be loaded
* @param { Context } context - context indicates model context information
* @param { Callback<Model> } callback - the callback of model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
function loadModelFromFd(model: number, context: Context, callback: Callback<Model>): void;
/**
* Load train model from file
*
* @param { string } model - model file path
* @param { TrainCfg } [trainCfg] - model train configuration
* @param { Context } [context] - model build context
* @returns { Promise<Model> } the promise of the built model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
function loadTrainModelFromFile(model: string, trainCfg?: TrainCfg, context?: Context): Promise<Model>;
/**
* Load train model from buffer
*
* @param { ArrayBuffer } model - model buffer
* @param { TrainCfg } [trainCfg] - model train configuration
* @param { Context } [context] - model build context
* @returns { Promise<Model> } the promise of the built model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
function loadTrainModelFromBuffer(model: ArrayBuffer, trainCfg?: TrainCfg, context?: Context): Promise<Model>;
/**
* Load train model from file description
*
* @param { number } model - model file description
* @param { TrainCfg } [trainCfg] - model train configuration
* @param { Context } [context] - model build context
* @returns { Promise<Model> } the promise of the built model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
function loadTrainModelFromFd(model: number, trainCfg?: TrainCfg, context?: Context): Promise<Model>;
/**
* Provides manages model function. Including get inputs, predict ,resize.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
interface Model {
/**
* The learning rate of the training model
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
learningRate?: number;
/**
* The running mode of the model
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
trainMode?: boolean;
/**
* Get model input tensors.
*
* @returns { MSTensor[] } the MSTensor array of the inputs.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
getInputs(): MSTensor[];
/**
* Infer model
*
* @param { MSTensor[] } inputs - indicates the MSTensor array of the inputs.
* @param { Callback<MSTensor[]> } callback - the callback of MSTensor array.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
predict(inputs: MSTensor[], callback: Callback<MSTensor[]>): void;
/**
* Infer model
*
* @param { MSTensor[] } inputs - indicates the MSTensor array of the inputs.
* @returns { Promise<MSTensor[]> } the promise returned by the function.
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
predict(inputs: MSTensor[]): Promise<MSTensor[]>;
/**
* resize model input
*
* @param { MSTensor[] } inputs - indicates the MSTensor array of the inputs.
* @param { Array<Array<number>> } dims - indicates the target new shape array
* @returns { boolean } the boolean result if the resize operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
resize(inputs: MSTensor[], dims: Array<Array<number>>): boolean;
/**
* Train model by step
*
* @param { MSTensor[] } inputs - indicates the MSTensor array of the inputs.
* @returns { boolean } the boolean result if the runStep operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
runStep(inputs: MSTensor[]): boolean;
/**
* Obtain all weights of the model
*
* @returns { MSTensor[] } the weight tensors of the model
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
getWeights(): MSTensor[];
/**
* Update weights of the model
*
* @param { MSTensor[] } weights - indicates the MSTensor array of the inputs
* @returns { boolean } the boolean result if updating weights operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
updateWeights(weights: MSTensor[]): boolean;
/**
* Setup training with virtual batches
*
* @param { number } virtualBatchMultiplier - virtual batch multiplier, use any number < 1 to disable
* @param { number } lr - learning rate to use for virtual batch, -1 for internal configuration
* @param { number } momentum - batch norm momentum to use for virtual batch, -1 for internal configuration
* @returns { boolean } the boolean result if the operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
setupVirtualBatch(virtualBatchMultiplier: number, lr: number, momentum: number): boolean;
/**
* Export train model to file
*
* @param { string } modelFile - model file path.
* @param { QuantizationType } [quantizationType] - the quantization type, default NO_QUANT.
* @param { boolean } [exportInferenceOnly] - whether to export a inference only model, default true.
* @param { string[] } [outputTensorName] - the set of name of output tensor the exported inference model,
* @returns { boolean } - the boolean result if the operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
exportModel(modelFile: string, quantizationType?: QuantizationType, exportInferenceOnly?: boolean, outputTensorName?: string[]): boolean;
/**
* Export model's weights, which can be used in micro only. Only valid for Lite Train
*
* @param { string } weightFile - weight file path
* @param { boolean } [isInference] - whether to export weights from inference model, only support this is `true`
* for now, default true
* @param { boolean } [enableFp16] - float-weight is whether to be saved in float16 format, default false
* @param { string[] } [changeableWeightsName] - changeable weights name
* @returns { boolean } the boolean result if the operation is successful
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
exportWeightsCollaborateWithMicro(weightFile: string, isInference?: boolean, enableFp16?: boolean, changeableWeightsName?: string[]): boolean;
}
/**
* Enum for quantization type
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
export enum QuantizationType {
/**
* No quantization.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
NO_QUANT = 0,
/**
* Weight quantization.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
WEIGHT_QUANT = 1,
/**
* Full quantization.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
FULL_QUANT = 2
}
/**
* Enum for optimization level
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
export enum OptimizationLevel {
/**
* Do not change
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
O0 = 0,
/**
* Cast network to float16, keep batch norm and loss in float32
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
O2 = 2,
/**
* Cast network to float16, including batch norm
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
O3 = 3,
/**
* Choose optimization based on device
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
AUTO = 4
}
/**
* Provides the train configuration
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
interface TrainCfg {
/**
* Array of loss name
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
lossName?: string[];
/**
* Train optimization level
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
optimizationLevel?: OptimizationLevel;
}
/**
* Provides the device configurations
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
interface Context {
/**
* The target device
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
target?: string[];
/**
* The cpu device information
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
cpu?: CpuDevice;
/**
* The NNRT device information
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
nnrt?: NNRTDevice;
}
/**
* Provides the CPU device info
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
interface CpuDevice {
/**
* The thread num
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
threadNum?: number;
/**
* The thread affinity mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
threadAffinityMode?: ThreadAffinityMode;
/**
* The thread affinity core list
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
threadAffinityCoreList?: number[];
/**
* The precision mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
precisionMode?: string;
}
/**
* Enum for performance mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
export enum PerformanceMode {
/**
* No performance mode preference
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PERFORMANCE_NONE = 0,
/**
* Low power consumption mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PERFORMANCE_LOW = 1,
/**
* Medium performance mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PERFORMANCE_MEDIUM = 2,
/**
* High performance mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PERFORMANCE_HIGH = 3,
/**
* Ultimate performance mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PERFORMANCE_EXTREME = 4
}
/**
* Enum for scheduling priority
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
export enum Priority {
/**
* No priority preference
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PRIORITY_NONE = 0,
/**
* Low priority
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PRIORITY_LOW = 1,
/**
* Medium priority
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PRIORITY_MEDIUM = 2,
/**
* High priority
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
PRIORITY_HIGH = 3
}
/**
* Provides the extension information of nnrt device
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
interface Extension {
/**
* Extension name
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
name: string;
/**
* Extension array buffer
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
value: ArrayBuffer;
}
/**
* Enum for nnrt device type
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
export enum NNRTDeviceType {
/**
* Devices that are not CPU, GPU, or dedicated accelerator
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
NNRTDEVICE_OTHERS = 0,
/**
* CPU device
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
NNRTDEVICE_CPU = 1,
/**
* GPU device
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
NNRTDEVICE_GPU = 2,
/**
* Dedicated hardware accelerator
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
NNRTDEVICE_ACCELERATOR = 3
}
/**
* Provides the nnrt device description
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
interface NNRTDeviceDescription {
/**
* Get device id
*
* @returns { bigint } the number of device id
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
deviceID(): bigint;
/**
* Get device type.
*
* @returns { NNRTDeviceType } the device type
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
deviceType(): NNRTDeviceType;
/**
* Get device name.
*
* @returns { string } device name
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
deviceName(): string;
}
/**
* Obtain the all device descriptions in NNRT.
*
* @returns { NNRTDeviceDescription[] } the array of NNRTDeviceDescription
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
function getAllNNRTDeviceDescriptions(): NNRTDeviceDescription[];
/**
* Provides the NNRT device info
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
interface NNRTDevice {
/**
* NNRT device id.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
deviceID?: bigint;
/**
* NNRT device performance mode.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
performanceMode?: PerformanceMode;
/**
* NNRT device priority.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
priority?: Priority;
/**
* NNRT device extension array.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 12
*/
extensions?: Extension[];
}
/**
* Enum for provides CPU thread affinity mode
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
export enum ThreadAffinityMode {
/**
* Thread affinity mode is no bind.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NO_AFFINITIES = 0,
/**
* Thread affinity mode is big cores first
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
BIG_CORES_FIRST = 1,
/**
* Thread affinity mode is little cores first
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
LITTLE_CORES_FIRST = 2
}
/**
* Provides MSTensor definition
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
interface MSTensor {
/**
* The name of the tensor.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
name: string;
/**
* The shape of the tensor.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
shape: number[];
/**
* The number of elements in the tensor.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
elementNum: number;
/**
* The data size of the tensor, the unit is byte.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
dataSize: number;
/**
* The data type of the tensor.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
dtype: DataType;
/**
* The format of the tensor.
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
format: Format;
/**
* Get MSTensor data
*
* @returns { ArrayBuffer } the data of tensor
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
getData(): ArrayBuffer;
/**
* Set MSTensor data
*
* @param { ArrayBuffer } inputArray - indicates the buffer of tensor
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
setData(inputArray: ArrayBuffer): void;
}
/**
* Enum for provides MSTensor data type
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
export enum DataType {
/**
* data type is unknown
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
TYPE_UNKNOWN = 0,
/**
* data type is int8
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_INT8 = 32,
/**
* data type is int16
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_INT16 = 33,
/**
* data type is int32
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_INT32 = 34,
/**
* data type is int64
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_INT64 = 35,
/**
* data type is uint8
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_UINT8 = 37,
/**
* data type is uint16
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_UINT16 = 38,
/**
* data type is uint32
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_UINT32 = 39,
/**
* data type is uint64
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_UINT64 = 40,
/**
* data type is float16
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_FLOAT16 = 42,
/**
* data type is float32
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_FLOAT32 = 43,
/**
* data type is float64
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NUMBER_TYPE_FLOAT64 = 44
}
/**
* Enum for provides MSTensor format
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
export enum Format {
/**
* data format is default
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
DEFAULT_FORMAT = -1,
/**
* data format is NCHW
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NCHW = 0,
/**
* data format is NHWC
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NHWC = 1,
/**
* data format is NHWC4
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
NHWC4 = 2,
/**
* data format is HWKC
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
HWKC = 3,
/**
* data format is HWCK
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
HWCK = 4,
/**
* data format is KCHW
*
* @syscap SystemCapability.AI.MindSporeLite
* @stagemodelonly
* @since 10
*/
KCHW = 5
}
}
export default mindSporeLite;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.animator.d.ts.md
# @ohos.animator.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2020-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Animator options.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
export interface AnimatorOptions {
/**
* Duration for playing the animation, in milliseconds.
*
* Value range: [0, +∞).
*
* Default value: **0**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
duration: number;
/**
* Animation interpolation curve.
*
* If the provided string is invalid, **"ease"** is used.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
easing: string;
/**
* Animation delay duration, in milliseconds. Value **0** means that there is no delay. If the value specified is a
* negative number, the animation starts playing ahead of its scheduled time. If the amount of time by which the
* playback is advanced exceeds the total duration of the animation, the animation immediately skips to its end state.
*
* Default value: **0**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
delay: number;
/**
* State of the animated target after the animation is executed.
*
* **'none'**: No style is applied to the target before or after the animation is executed.
*
* **'forwards'**: The target keeps the state at the end of the animation (defined in the last key frame) after the
* animation is executed.
*
* **'backwards'**: During the delay period specified in [AnimatorOptions]{@link AnimatorOptions}, the animation uses
* the value defined in the first keyframe. When **direction** in [AnimatorOptions]{@link AnimatorOptions} is
* **'normal'** or **'alternate'**, the animation uses the **from** keyframe value. When **direction** in
* [AnimatorOptions]{@link AnimatorOptions} is **'reverse'** or **'alternate-reverse'**, the animation uses the **to**
* keyframe value.
*
* **'both'**: The animation follows the **'forwards'** and **'backwards'** rules.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
fill: "none" | "forwards" | "backwards" | "both";
/**
* Animation playback mode.
*
* **'normal'**: plays the animation in forward loop mode.
*
* **'reverse'**: plays the animation in reverse loop mode.
*
* **'alternate'**: plays the animation in alternating loop mode. When the animation is played for an odd number of
* times, the playback is in forward direction. When the animation is played for an even number of times, the playback
* is in reverse direction.
*
* **'alternate-reverse'**: plays the animation in reverse alternating loop mode. When the animation is played for an
* odd number of times, the playback is in reverse direction. When the animation is played for an even number of
* times, the playback is in forward direction.
*
* Default value: **'normal'**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
direction: "normal" | "reverse" | "alternate" | "alternate-reverse";
/**
* Number of times that the animation is played. The value **0** means the animation is not played, **-1** means the
* animation is played for an unlimited number of times, and a positive integer means the animation is played that
* specific number of times.
*
* Note: Any negative value other than **-1** is treated as invalid. For invalid values, the animation is played once.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
iterations: number;
/**
* Start point of the animation interpolation.
*
* Note: This setting affects the input parameter value of the
* [onFrame](docroot://reference/apis-arkui/js-apis-animator.md#properties) callback.
*
* Default value: **0**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
begin: number;
/**
* End point of animation interpolation.
*
* Note: This setting affects the input parameter value of the
* [onFrame](docroot://reference/apis-arkui/js-apis-animator.md#properties) callback.
*
* Default value: **1**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
end: number;
}
/**
* Defines a simple animation parameter object. Unlike **AnimatorOptions**, this object comes with some default values
* for certain animation parameters, so you do not have to set them manually.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
export declare class SimpleAnimatorOptions {
/**
* A constructor used to create a **SimpleAnimatorOptions** instance.
*
* @param { number } begin - Start point of the animation interpolation.
* @param { number } end - End point of animation interpolation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
constructor(begin: number, end: number);
/**
* Sets the animation duration.
*
* @param { number } duration - Animation duration, in milliseconds.<br>Default value: **1000**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
duration(duration: number): SimpleAnimatorOptions;
/**
* Sets the interpolation curve for this animation.
*
* @param { string } curve - Interpolation curve. For details, see [AnimatorOptions]{@link AnimatorOptions}.<br>
* Default value: **"ease"**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
easing(curve: string): SimpleAnimatorOptions;
/**
* Sets the playback delay for this animation.
*
* @param { number } delay - Playback delay, in milliseconds. The value **0** indicates no delay. If the value
* specified is a negative number, the animation starts playing ahead of its scheduled time. If the amount of time
* by which the playback is advanced exceeds the total duration of the animation, the animation immediately skips
* to its end state.<br>Default value: **0**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
delay(delay: number): SimpleAnimatorOptions;
/**
* Sets the fill mode for this animation.
*
* @param { FillMode } fillMode - Fill mode, which affects how the animation behaves during the delay period and after
* it ends.<br>Default value: **FillMode.Forwards**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
fill(fillMode: FillMode): SimpleAnimatorOptions;
/**
* Sets the playback direction for this animator animation.
*
* @param { PlayMode } direction - Playback direction.<br>Default value: **PlayMode.Normal**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
direction(direction: PlayMode): SimpleAnimatorOptions;
/**
* Sets the number of times that this animation is played.
*
* @param { number } iterations - Number of times that the animation is played. The value **0** means the animation is
* not played, and **-1** means the animation is played for an unlimited number of times.<br>Default value: **1**
* @returns { SimpleAnimatorOptions } **SimpleAnimatorOptions** object for animation parameters.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
iterations(iterations: number): SimpleAnimatorOptions;
}
/**
* Defines the animator result.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
export interface AnimatorResult {
/**
* Updates this animator.
*
* @param { AnimatorOptions } options - Animator options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
* @deprecated since 9
* @useinstead ohos.animator.reset
*/
update(options: AnimatorOptions): void;
/**
* Resets the animation parameters of this animator.
*
* @param { AnimatorOptions } options - Animator options.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
reset(options: AnimatorOptions): void;
/**
* Resets the animation parameters of this animator. Compared with
* [reset]{@link AnimatorResult.reset(options: AnimatorOptions)}, this API accepts parameters of the
* [SimpleAnimatorOptions]{@link SimpleAnimatorOptions} type.
*
* @param { AnimatorOptions | SimpleAnimatorOptions } options - Animator options.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
reset(options: AnimatorOptions | SimpleAnimatorOptions): void;
/**
* Plays this animation. The animation retains the previous playback state. For example, if the animation is set to
* **reverse** and paused, it will remain in **reverse** when resumed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
play(): void;
/**
* Ends the animation, triggering the [onFinish](docroot://reference/apis-arkui/js-apis-animator.md#properties)
* callback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
finish(): void;
/**
* Pauses this animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
pause(): void;
/**
* Cancels the animation, triggering the [onCancel](docroot://reference/apis-arkui/js-apis-animator.md#properties)
* callback. This API is functionally identical to [finish]{@link AnimatorResult.finish} except for the callback it
* triggers. It is recommended that you use the **finish** API to end animations.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
cancel(): void;
/**
* Plays this animation in reverse order. This API does not take effect when the interpolating spring curve is used.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
reverse(): void;
/**
* Called when a frame is received.
*
* Note: This API is supported since API version 6 and deprecated since API version 12. You are advised to use
* **onFrame** instead.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
* @deprecated since 12
* @useinstead ohos.animator.onFrame
*/
onframe: (progress: number) => void;
/**
* Called when a frame is received.
*
* **progress**: current value of the animation. Value range: [begin, end] defined in
* [AnimatorOptions]{@link AnimatorOptions}. Default value range: [0, 1]
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onFrame: (progress: number) => void;
/**
* Called when this animation is finished.
*
* Note: This API is supported since API version 6 and deprecated since API version 12. You are advised to use
* **onFinish** instead.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
* @deprecated since 12
* @useinstead ohos.animator.onFinish
*/
onfinish: () => void;
/**
* Called when this animation is finished.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onFinish: () => void;
/**
* Called when this animation is canceled.
*
* Note: This API is supported since API version 6 and deprecated since API version 12. You are advised to use
* **onCancel** instead.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
* @deprecated since 12
* @useinstead ohos.animator.onCancel
*/
oncancel: () => void;
/**
* Called when this animation is canceled.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onCancel: () => void;
/**
* Called when this animation repeats.
*
* Note: This API is supported since API version 6 and deprecated since API version 12. You are advised to use
* **onRepeat** instead.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
* @deprecated since 12
* @useinstead ohos.animator.onRepeat
*/
onrepeat: () => void;
/**
* Called when this animation repeats.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onRepeat: () => void;
/**
* Sets the expected frame rate range.
*
* @param { ExpectedFrameRateRange } rateRange - Expected frame rate range.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void;
}
/**
* Creates an **Animator** object.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 6
*/
export default class Animator {
/**
* Creates an animation.
*
* @param { AnimatorOptions } options - Animator options.
* @returns { AnimatorResult } Animator result.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @since 6
* @deprecated since 9
* @useinstead ohos.animator.create
*/
static createAnimator(options: AnimatorOptions): AnimatorResult;
/**
* Creates an **AnimatorResult** object for animations.
*
* > **NOTE**
* >
* > - Since API version 10, you can use the
* > [createAnimator](docroot://reference/apis-arkui/arkts-apis-uicontext-uicontext.md#createanimator) API in
* > [UIContext]{@link @ohos.arkui.UIContext}, which ensures that the object is created in the intended UI instance.
*
* @param { AnimatorOptions } options - Animator options.
* @returns { AnimatorResult } Animator result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIContext#createAnimator
*/
static create(options: AnimatorOptions): AnimatorResult;
/**
* Creates an **AnimatorResult** object for animations. Compared with
* [create]{@link Animator.create(options: AnimatorOptions)}, this API accepts parameters of the
* [SimpleAnimatorOptions]{@link SimpleAnimatorOptions} type.
*
* @param { AnimatorOptions | SimpleAnimatorOptions } options - Parameters of the animation.
* @returns { AnimatorResult } Animator result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Ability.d.ts.md
# @ohos.app.ability.Ability.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import { Configuration } from './@ohos.app.ability.Configuration';
/**
* The Ability class is the fundamental unit for application lifecycle scheduling. It is the base class of
* [UIAbility]{@link @ohos.app.ability.UIAbility} and
* [ExtensionAbility]{@link @ohos.app.ability.ExtensionAbility:ExtensionAbility}, and provides callbacks for system
* configuration updates and memory level updates. However, you cannot inherit directly from this base class. You should
* opt for either [UIAbility]{@link @ohos.app.ability.UIAbility} or
* [ExtensionAbility]{@link @ohos.app.ability.ExtensionAbility:ExtensionAbility} based on your service needs. For
* details, see [Introduction to Ability Kit](docroot://application-models/abilitykit-overview.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
declare class Ability {
/**
* Called when a system environment variable changes. You can override this callback to respond to changes in the
* system environment variables. For example, when the system language changes, the application can perform customized
* processing in the callback.
*
* > **NOTE**
* >
* > There are certain restrictions when this callback is actually triggered. For example, if you set the application
* > language by calling [setLanguage]{@link ./application/ApplicationContext:ApplicationContext.setLanguage}, the
* > system does not trigger the **onConfigurationUpdate** callback even if the system language changes. For details,
* > see [When to Use](docroot://application-models/subscribe-system-environment-variable-changes.md#when-to-use).
*
* @param { Configuration } newConfig - New configuration.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
onConfigurationUpdate(newConfig: Configuration): void;
/**
* Called when the available memory of the entire device changes to a specified level. You can override this callback
* to respond to changes in the memory level, for example, releasing cached data.
*
* > **NOTE**
* >
* > Releasing UI components in the **onMemoryLevel** callback may block the main thread tasks of the current process.
* > Therefore, you are advised not to release UI components in this callback.
*
* @param { AbilityConstant.MemoryLevel } level - Level of the available memory.<br>**NOTE**<br>The trigger conditions may
* differ across various devices. For example, on a standard device with 12 GB of memory:<br>- When the available
* memory of the entire device drops to 1700 MB to 1800 MB, the **onMemoryLevel** callback of the MEMORY_LEVEL_MODERATE
* type is triggered, indicating that the available memory is moderate.<br>- When the available memory of the entire
* device drops to 1600 MB to 1700 MB, the **onMemoryLevel** callback of the MEMORY_LEVEL_LOW type is triggered,
* indicating that the available memory is low.<br>- When the available memory of the entire device drops below 1600 MB
* , the **onMemoryLevel** callback of the MEMORY_LEVEL_CRITICAL type is triggered, indicating that the available
* memory is critically low.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
}
export default Ability;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityConstant.d.ts.md
# @ohos.app.ability.AbilityConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type appManager from './@ohos.app.ability.appManager';
/**
* AbilityConstant provides enums related to abilities, including the window mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare namespace AbilityConstant {
/**
* The UIAbility is launched via a home screen shortcut. If this string is obtained from the **launchReasonMessage**
* property in [LaunchParam]{@link AbilityConstant.LaunchParam}, the UIAbility is initiated by touching a shortcut on
* the home screen.
*
* @syscap SystemCapability.Ability.AbilityBase
* @stagemodelonly
* @atomicservice
* @since 20
*/
const REASON_MESSAGE_DESKTOP_SHORTCUT = 'ReasonMessage_DesktopShortcut';
/**
* Describes the launch parameters, which mainly include the ability launch reasons and reasons for the last exit. The
* parameter values are automatically passed in by the system when the ability is launched. You do not need to change
* the values.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export interface LaunchParam {
/**
* An enumerated value indicating the reason for ability launch (for example, recovery from a fault, intent
* invocation, or atomic service sharing). For details, see [LaunchReason]{@link AbilityConstant.LaunchReason}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
launchReason: LaunchReason;
/**
* Detailed message that describes the reason for the ability launch.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
launchReasonMessage?: string;
/**
* An enumerated value indicating the reason for the last exit of the ability.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
lastExitReason: LastExitReason;
/**
* Detailed message that describes the reason for the last exit of the ability.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
lastExitMessage: string;
/**
* Key runtime information for the last exit of the ability (including process ID, exit timestamp, and RSS memory
* value).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
lastExitDetailInfo?: LastExitDetailInfo;
/**
* UTC timestamp when the UIAbility starts, in milliseconds.
*
* This API can be used in atomic services since API version 23.
*
* **Constraints**:
*
* This feature takes effect only when the UIAbility is started. For other types of abilities (for example,
* UIExtensionAbility), the obtained start time is the default value **0**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
launchUTCTime?: number;
/**
* System uptime (the time elapsed since the system booted up) when the UIAbility starts, in milliseconds.
*
* **Constraints**:
*
* This feature takes effect only when the UIAbility is started. For other types of abilities (for example,
* UIExtensionAbility), the obtained start time is the default value **0**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
launchUptime?: number;
}
/**
* Describes the key runtime information of the process where the ability last exited.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
export interface LastExitDetailInfo {
/**
* ID of the process where the ability last exited.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
pid: number;
/**
* Name of the process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
processName: string;
/**
* UID of the application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
uid: number;
/**
* Specific reason for the last exit of the ability.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
exitSubReason: number;
/**
* Reason why the process was killed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
exitMsg: string;
/**
* Actual memory usage of the process, in KB.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
rss: number;
/**
* Actual physical memory usage of the process, in KB.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
pss: number;
/**
* Exact time when the ability last exited.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
timestamp: number;
/**
* Process status of the ability when it last exited.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
processState?: appManager.ProcessState;
/**
* Indecates kill reason message.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
killReason?: string;
}
/**
* Enumerates the ability launch reasons. You can use it together with the value of **launchParam.launchReason** in
* [onCreate(want, launchParam)]{@link @ohos.app.ability.UIAbility:UIAbility#onCreate} of the UIAbility to complete
* different operations.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export enum LaunchReason {
/**
* Unknown reason.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
UNKNOWN = 0,
/**
* The ability is started by calling
* [startAbility]{@link ./application/UIAbilityContext:UIAbilityContext.startAbility(want: Want, callback: AsyncCallback<void>)}
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
START_ABILITY = 1,
/**
* The ability is started by calling
* [startAbilityByCall]{@link ./application/UIAbilityContext:UIAbilityContext.startAbilityByCall}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
CALL = 2,
/**
* The ability is started by means of cross-device migration.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
CONTINUATION = 3,
/**
* The ability is automatically started when the application is restored from a fault.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
APP_RECOVERY = 4,
/**
* The ability is started by means of atomic service sharing.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
SHARE = 5,
/**
* The ability is automatically started upon system boot.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
AUTO_STARTUP = 8,
/**
* The ability is started by the InsightIntent framework..
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
INSIGHT_INTENT = 9,
/**
* The ability is started in advance during cross-device migration.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
PREPARE_CONTINUATION = 10,
/**
* The ability is started through preloading.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
PRELOAD = 11
}
/**
* Enumerates the reasons for the last exit of the ability. You can use it together with the value of
* **launchParam.lastExitReason** in [onCreate()]{@link @ohos.app.ability.UIAbility:UIAbility#onCreate} of the
* UIAbility to complete different operations.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export enum LastExitReason {
/**
* Unknown reason.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
UNKNOWN = 0,
/**
* The ability does not respond.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
* @deprecated since 10
* @useinstead AbilityConstant.LastExitReason.APP_FREEZE
*/
ABILITY_NOT_RESPONDING = 1,
/**
* The ability exits normally because the user closes the application.
*
* Note: If the application process is forcibly terminated using methods not provided by Ability Kit, such as
* calling [process.exit()](../apis-arkts/js-apis-process.md#processexitdeprecated) or using the kernel **kill**
* command, the reason for the last exit is also reported as **NORMAL**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
NORMAL = 2,
/**
* The ability exits due to [process crash](docroot://dfx/cppcrash-guidelines.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
CPP_CRASH = 3,
/**
* The ability exits due to a JS_ERROR fault triggered when an application has a JS syntax error that is not
* captured by developers.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
JS_ERROR = 4,
/**
* The ability exits due to [application freeze](docroot://dfx/appfreeze-guidelines.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
APP_FREEZE = 5,
/**
* The ability exits due to system performance problems, for example, insufficient device memory.
*
* Note: This API will be deprecated. You are advised to use **RESOURCE_CONTROL** instead.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
PERFORMANCE_CONTROL = 6,
/**
* The ability exits due to improper use of system resources. The specific error cause can be obtained through
* [LaunchParam.lastExitMessage]{@link AbilityConstant.LaunchParam}. The possible causes are as follows:
*
* - **CPU Highload**: The CPU load is high.
* - **CPU_EXT Highload**: A fast CPU load detection is carried out.
* - **IO Manage Control**: An I/O management and control operation is carried out.
* - **App Memory Deterioration**: The application memory usage exceeds the threshold.
* - **Temperature Control**: The temperature is too high or too low.
* - **Memory Pressure**: The system is low on memory, triggering process termination in ascending order of
* priority.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
RESOURCE_CONTROL = 7,
/**
* The application exits due to an upgrade.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
UPGRADE = 8,
/**
* The ability exits because it receives a request from the multitasking center.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
USER_REQUEST = 9,
/**
* The ability exits because it receives a kill signal from the system.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
SIGNAL = 10
}
/**
* Enumerates the ability continuation results. You can use it in
* [onContinue()]{@link @ohos.app.ability.UIAbility:UIAbility#onContinue} of the UIAbility to complete different
* operations.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export enum OnContinueResult {
/**
* The ability continuation is accepted.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
AGREE = 0,
/**
* The ability continuation is rejected. If the application is abnormal in
* [onContinue]{@link @ohos.app.ability.UIAbility:UIAbility#onContinue}, which results in abnormal display during
* data restoration, this result is returned.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
REJECT = 1,
/**
* The version does not match. The application on the initiator can obtain the version of the target application
* from [onContinue]{@link @ohos.app.ability.UIAbility:UIAbility#onContinue}. If the ability continuation cannot be
* performed due to version mismatch, this result is returned.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
MISMATCH = 2
}
/**
* Enumerates the memory levels of the entire device. You can use it in
* [onMemoryLevel()]{@link @ohos.app.ability.Ability:Ability#onMemoryLevel} of the UIAbility to complete different
* operations.
*
* > **NOTE**
* >
* > - The trigger conditions may differ across various devices. For example, on a standard device with 12 GB of
* > memory:
* > - When the available memory of the entire device drops to 1700 MB to 1800 MB, the **onMemoryLevel** callback
* > with a value of **0** is triggered, indicating that the available memory is moderate.
* > - When the available memory of the entire device drops to 1600 MB to 1700 MB, the **onMemoryLevel** callback
* > with a value of **1** is triggered, indicating that the available memory is low.
* > - When the available memory of the entire device drops below 1600 MB, the **onMemoryLevel** callback with a
* > value of **2** is triggered, indicating that the available memory is critically low.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
export enum MemoryLevel {
/**
* Indicates that the system has a moderate amount of available memory. Due to differences in system-wide memory
* thresholds across devices, the actual performance may vary by product. For details, please refer to the notes
* below.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
MEMORY_LEVEL_MODERATE = 0,
/**
* Indicates that the system has low available memory. Due to differences in system-wide memory thresholds across
* devices, the actual performance may vary by product. For details, please refer to the notes below.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
MEMORY_LEVEL_LOW = 1,
/**
* Indicates that the system has critically low available memory. Due to differences in system-wide memory
* thresholds across devices, the actual performance may vary by product. For details, please refer to the notes
* below.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
MEMORY_LEVEL_CRITICAL = 2,
/**
* All UI elements of the process are hidden.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 24
*/
MEMORY_LEVEL_UI_HIDDEN = 3,
/**
* The process is in the background and the available memory of the entire device is moderate.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 24
*/
MEMORY_LEVEL_BACKGROUND_MODERATE = 4,
/**
* The process is in the background and the available memory of the entire device is low.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 24
*/
MEMORY_LEVEL_BACKGROUND_LOW = 5,
/**
* The process is in the background and the available memory of the entire device is extremely low.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 24
*/
MEMORY_LEVEL_BACKGROUND_CRITICAL = 6
}
/**
* Enumerates the window modes in which a UIAbility can be displayed at startup. It can be used in
* [startAbility]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility(want: Want, options?: StartOptions)}
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export enum WindowMode {
/**
* Full-screen mode. It takes effect only on 2-in-1 devices and tablets.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
WINDOW_MODE_FULLSCREEN = 1,
/**
* Primary screen (left screen in the case of horizontal orientation) in split-screen mode. It is valid only in
* intra-app redirection scenarios. It takes effect only on foldable devices and tablets.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
WINDOW_MODE_SPLIT_PRIMARY = 100,
/**
* Secondary screen (right screen in the case of horizontal orientation) in split-screen mode. It is valid only in
* intra-app redirection scenarios. It takes effect only on foldable devices and tablets.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
WINDOW_MODE_SPLIT_SECONDARY = 101,
/**
* The ability is displayed in split-screen mode. It is valid only in intra-app redirection scenarios.
* It takes effect only on foldable devices and tablets.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
WINDOW_MODE_SPLIT = 105
}
/**
* Enumerates the result types for the operation of saving application data. You can use it in
* [onSaveState()]{@link @ohos.app.ability.UIAbility:UIAbility.onSaveState(reason: AbilityConstant.StateType, wantParam: Record<string, Object>)}
* of the UIAbility to complete
* [UIAbility backup and restore](docroot://application-models/ability-recover-guideline.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export enum OnSaveResult {
/**
* Always agreed to save the status.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
ALL_AGREE = 0,
/**
* Rejected to save the status in continuation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
CONTINUATION_REJECT = 1,
/**
* Continuation mismatch.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
CONTINUATION_MISMATCH = 2,
/**
* Agreed to restore the saved status.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
RECOVERY_AGREE = 3,
/**
* Rejected to restore the saved status.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
RECOVERY_REJECT = 4,
/**
* Always rejected to save the status.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
ALL_REJECT = 5
}
/**
* Enumerates the scenarios for saving application data. You can use it in
* [onSaveState()]{@link @ohos.app.ability.UIAbility:UIAbility.onSaveState(reason: AbilityConstant.StateType, wantParam: Record<string, Object>)}
* of the UIAbility to complete
* [UIAbility backup and restore](docroot://application-models/ability-recover-guideline.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export enum StateType {
/**
* Application migration scenario.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
CONTINUATION = 0,
/**
* Application recovery scenario.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
APP_RECOVERY = 1
}
/**
* Enumerates the mission continuation states of the application. It is used in the
* [setMissionContinueState]{@link ./application/UIAbilityContext:UIAbilityContext.setMissionContinueState(state: AbilityConstant.ContinueState, callback: AsyncCallback<void>)}
* API of [UIAbilityContext]{@link ./application/UIAbilityContext:UIAbilityContext}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
export enum ContinueState {
/**
* Mission continuation is activated for the current application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
ACTIVE = 0,
/**
* Mission continuation is not activated for the current application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
INACTIVE = 1
}
/**
* Enumerates the collaboration request results. You can use it in multi-device collaboration scenarios to specify
* whether the target application accepts the collaboration request from the caller application. You can use it in
* [onCollaborate()]{@link @ohos.app.ability.UIAbility:UIAbility.onCollaborate(wantParam: Record<string, Object>)} of
* the UIAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 15
*/
export enum PrepareTermination {
/**
* Executes the termination action immediately. This is the default behavior.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 15
*/
TERMINATE_IMMEDIATELY = 0,
/**
* Cancels the termination action.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 15
*/
CANCEL = 1
}
/**
* Enumerates the actions triggered when an application is closed by the user. You can use it in
* [onPrepareTermination]{@link @ohos.app.ability.AbilityStage:AbilityStage#onPrepareTermination} or
* [onPrepareTerminationAsync]{@link @ohos.app.ability.AbilityStage:AbilityStage#onPrepareTerminationAsync} of
* [AbilityStage]{@link @ohos.app.ability.AbilityStage:AbilityStage}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 18
*/
export enum CollaborateResult {
/**
* Accepts the collaboration request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 18
*/
ACCEPT = 0,
/**
* Rejects the collaboration request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 18
*/
REJECT = 1
}
}
export default AbilityConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.abilityDelegatorRegistry.d.ts.md
# @ohos.app.ability.abilityDelegatorRegistry.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit TestKit
*/
import { AbilityDelegator as _AbilityDelegator } from './application/AbilityDelegator';
import { AbilityDelegatorArgs as _AbilityDelegatorArgs } from './application/abilityDelegatorArgs';
import { AbilityMonitor as _AbilityMonitor } from './application/AbilityMonitor';
import { AbilityStageMonitor as _AbilityStageMonitor } from './application/AbilityStageMonitor';
import { ShellCmdResult as _ShellCmdResult } from './application/shellCmdResult';
/**
* **AbilityDelegatorRegistry**, a module of the automatic test framework, is used to obtain
* [AbilityDelegator]{@link application/AbilityDelegator:AbilityDelegator} and
* [AbilityDelegatorArgs]{@link application/abilityDelegatorArgs:AbilityDelegatorArgs} objects. **AbilityDelegator**
* provides APIs for creating [AbilityMonitor]{@link application/AbilityMonitor:AbilityMonitor} objects, which can be
* used to listen for ability lifecycle changes. **AbilityDelegatorArgs** provides APIs for obtaining test parameters.
*
* > **NOTE**
* >
* > The APIs of this module can be used only in [JsUnit](docroot://application-test/unittest-guidelines.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare namespace abilityDelegatorRegistry {
/**
* Obtains an [AbilityDelegator]{@link application/AbilityDelegator:AbilityDelegator} object.
*
* @returns { AbilityDelegator } [AbilityDelegator]{@link application/AbilityDelegator:AbilityDelegator} object, which can
* be used to schedule the functionalities of the test framework.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
function getAbilityDelegator(): AbilityDelegator;
/**
* Obtains an [AbilityDelegatorArgs]{@link application/abilityDelegatorArgs:AbilityDelegatorArgs} object.
*
* @returns { AbilityDelegatorArgs } [AbilityDelegatorArgs]{@link application/abilityDelegatorArgs:AbilityDelegatorArgs}
* object, which can be used to obtain test parameters.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
function getArguments(): AbilityDelegatorArgs;
/**
* Enumerates the ability lifecycle states. It can be used in
* [getAbilityState(ability)]{@link application/AbilityDelegator:AbilityDelegator.getAbilityState} of
* [AbilityDelegator]{@link application/AbilityDelegator:AbilityDelegator} to return different ability lifecycle
* states.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export enum AbilityLifecycleState {
/**
* The ability is in an invalid state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
UNINITIALIZED = 0,
/**
* The ability is created.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
CREATE = 1,
/**
* The ability is running in the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
FOREGROUND = 2,
/**
* The ability is running in the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
BACKGROUND = 3,
/**
* The ability is destroyed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
DESTROY = 4
}
/**
* Represents the **AbilityDelegator** module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type AbilityDelegator = _AbilityDelegator;
/**
* Represents the **AbilityDelegatorArgs** module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type AbilityDelegatorArgs = _AbilityDelegatorArgs;
/**
* Represents the **AbilityMonitor** module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type AbilityMonitor = _AbilityMonitor;
/**
* Represents the **ShellCmdResult** module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
export type ShellCmdResult = _ShellCmdResult;
/**
* Represents the **AbilityStageMonitor** module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform
* @atomicservice
* @since 14
*/
export type AbilityStageMonitor = _AbilityStageMonitor;
}
export default abilityDelegatorRegistry;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityLifecycleCallback.d.ts.md
# @ohos.app.ability.AbilityLifecycleCallback.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The lifecycle of a [UIAbility]{@link ./@ohos.app.ability.UIAbility} dynamically changes from creation to
* destruction.
* The AbilityLifecycleCallback module provides the capability to listen for these lifecycle changes, which can be used
* for scenarios such as tracking the runtime duration of each UIAbility and performing data loading decoupled from the
* service logic of UIAbility.
*
* > **NOTE**
* >
* > The APIs provided by this module can listen for lifecycle changes of the UIAbility within the same process.
*
* @file
* @kit AbilityKit
*/
import UIAbility from './@ohos.app.ability.UIAbility';
import window from './@ohos.window';
/**
* The lifecycle of a [UIAbility]{@link ./@ohos.app.ability.UIAbility} dynamically changes from creation to
* destruction.
* The AbilityLifecycleCallback module provides the capability to listen for these lifecycle changes, which can be used
* for scenarios such as tracking the runtime duration of each UIAbility and performing data loading decoupled from the
* service logic of UIAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare class AbilityLifecycleCallback {
/**
* Called after the [onCreate]{@link ./@ohos.app.ability.UIAbility:UIAbility#onCreate} callback of the UIAbility is
* triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onAbilityCreate(ability: UIAbility): void;
/**
* Called before the [onCreate]{@link ./@ohos.app.ability.UIAbility:UIAbility#onCreate} callback of the UIAbility is
* triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillCreate?(ability: UIAbility): void;
/**
* Called after the [onWindowStageCreate]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageCreate} callback of
* the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onWindowStageCreate(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called before the [onWindowStageCreate]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageCreate}
* callback of the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWindowStageWillCreate?(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called before the [onNewWant]{@link ./@ohos.app.ability.UIAbility:UIAbility#onNewWant} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWillNewWant?(ability: UIAbility): void;
/**
* Called after the [onNewWant]{@link ./@ohos.app.ability.UIAbility:UIAbility#onNewWant} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onNewWant?(ability: UIAbility): void;
/**
* Called when the main window of the UIAbility gains focus.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onWindowStageActive(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called when the main window of the UIAbility loses focus.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onWindowStageInactive(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called after the [onWindowStageDestroy]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageDestroy}
* callback of the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onWindowStageDestroy(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called before the [onWindowStageDestroy]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageDestroy}
* callback of the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWindowStageWillDestroy?(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called after the [onDestroy]{@link ./@ohos.app.ability.UIAbility:UIAbility.onDestroy} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onAbilityDestroy(ability: UIAbility): void;
/**
* Called before the [onDestroy]{@link ./@ohos.app.ability.UIAbility:UIAbility.onDestroy} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillDestroy?(ability: UIAbility): void;
/**
* Called after the [onForeground]{@link ./@ohos.app.ability.UIAbility:UIAbility#onForeground} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onAbilityForeground(ability: UIAbility): void;
/**
* Called before the [onForeground]{@link ./@ohos.app.ability.UIAbility:UIAbility#onForeground} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillForeground?(ability: UIAbility): void;
/**
* Called after the [onBackground]{@link ./@ohos.app.ability.UIAbility:UIAbility#onBackground} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onAbilityBackground(ability: UIAbility): void;
/**
* Called before the [onBackground]{@link ./@ohos.app.ability.UIAbility:UIAbility#onBackground} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillBackground?(ability: UIAbility): void;
/**
* Called after the [onContinue]{@link ./@ohos.app.ability.UIAbility:UIAbility#onContinue} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onAbilityContinue(ability: UIAbility): void;
/**
* Called before the [onContinue]{@link ./@ohos.app.ability.UIAbility:UIAbility#onContinue} callback of the UIAbility
* is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillContinue?(ability: UIAbility): void;
/**
* Called before the [onWindowStageRestore]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageRestore}
* callback of the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWindowStageWillRestore?(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called after the [onWindowStageRestore]{@link ./@ohos.app.ability.UIAbility:UIAbility#onWindowStageRestore}
* callback of the UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @param { window.WindowStage } windowStage - Main window manager of the UIAbility associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWindowStageRestore?(ability: UIAbility, windowStage: window.WindowStage): void;
/**
* Called before the [onSaveState]{@link ./@ohos.app.ability.UIAbility:UIAbility.onSaveState} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilityWillSaveState?(ability: UIAbility): void;
/**
* Called after the [onSaveState]{@link ./@ohos.app.ability.UIAbility:UIAbility.onSaveState} callback of the
* UIAbility is triggered.
*
* @param { UIAbility } ability - UIAbility object associated with the callback event.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onAbilitySaveState?(ability: UIAbility): void;
}
export default AbilityLifecycleCallback;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.abilityManager.d.ts.md
# @ohos.app.ability.abilityManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo';
import Context from './application/Context';
import * as _AbilityStateData from './application/AbilityStateData';
/**
* The AbilityManager module provides APIs for obtaining, adding, and updating ability information and running status
* information.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 20]
* @since 9
*/
declare namespace abilityManager {
/**
* Enumerates the ability states. This enum can be used together with
* [AbilityRunningInfo]{@link ./application/AbilityRunningInfo:AbilityRunningInfo} to return the ability state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export enum AbilityState {
/**
* The ability is in the initial state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
INITIAL = 0,
/**
* The ability has the focus.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
FOCUS = 2,
/**
* The ability is in the foreground state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
FOREGROUND = 9,
/**
* The ability is in the background state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
BACKGROUND = 10,
/**
* The ability is in the state of being switched to the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
FOREGROUNDING = 11,
/**
* The ability is in the state of being switched to the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
BACKGROUNDING = 12
}
/**
* Obtains the UIAbility running information. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > If the application has requested the ohos.permission.GET_RUNNING_INFO permission, it can obtain the UIAbility
* > running information of all applications; otherwise, it can obtain the UIAbility running information of the
* > current application.
*
* @permission ohos.permission.GET_RUNNING_INFO
* @returns { Promise<Array<AbilityRunningInfo>> } Promise used to return the UIAbility running information. You can
* perform error handling or other custom processing.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function getAbilityRunningInfos(): Promise<Array<AbilityRunningInfo>>;
/**
* Restarts the current atomic service.
*
* > **NOTE**
* >
* > - Currently, atomic services can be started only in an independent window.
* >
* > - If you call this API,
* > [ApplicationContext.restartApp()]{@link ./application/ApplicationContext:ApplicationContext/restartApp}, or
* > [UIAbilityContext.restartApp()]{@link ./application/UIAbilityContext:UIAbilityContext.restartApp} within 3 seconds
* > after a successful call to this API, the system returns error code 16000064.
*
* @param { Context } context - Context of the ability.<br>Note: Currently, only
* [UIAbilityContext]{@link ./application/UIAbilityContext:UIAbilityContext} is supported.<br>
* @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed;
* 2.Send restart message to system service failed; 3.System service failed to communicate with dependency module.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000064 - Restart too frequently. Try again at least 3s later.
* @throws { BusinessError } 16000086 - The context is not UIAbilityContext.
* @throws { BusinessError } 16000090 - The caller is not an atomic service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
function restartSelfAtomicService(context: Context): void;
/**
* Indicates whether the current device supports EmbeddedUIExtensionAbility.
*
* @returns { boolean } Returns {@code true} if EmbeddedUIExtensionAbility is supported,
* returns {@code false} otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function isEmbeddedUIExtensionSupported(): boolean;
/**
* Defines the level-2 module AbilityRunningInfo.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type AbilityRunningInfo = _AbilityRunningInfo;
/**
* Defines the level-2 module AbilityStateData.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type AbilityStateData = _AbilityStateData.default;
}
export default abilityManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AbilityStage.d.ts.md
# @ohos.app.ability.AbilityStage.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import AbilityStageContext from './application/AbilityStageContext';
import Want from './@ohos.app.ability.Want';
import { Configuration } from './@ohos.app.ability.Configuration';
/**
* AbilityStage is a [module](docroot://quick-start/application-package-overview.md#multi-module-design-mechanism)-level
* component manager. It is used for initializing operations such as resource preloading and thread creation at the
* module level, as well as maintaining the application state under the module. An AbilityStage instance corresponds to
* a module.
*
* When the [HAP](docroot://quick-start/hap-package.md) or [HSP](docroot://quick-start/in-app-hsp.md) of an application
* is first loaded, an AbilityStage instance is created. If a module contains both AbilityStage and other components (
* like UIAbility or ExtensionAbility), the AbilityStage instance is created before the other component instances.
*
* An AbilityStage has the lifecycle callbacks [onCreate()]{@link AbilityStage.onCreate} and
* [onDestroy()]{@link AbilityStage.onDestroy}, and the event callbacks
* [onAcceptWant()]{@link AbilityStage.onAcceptWant},
* [onConfigurationUpdate()]{@link AbilityStage.onConfigurationUpdate}, and
* [onMemoryLevel()]{@link AbilityStage.onMemoryLevel}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare class AbilityStage {
/**
* Context of an AbilityStage.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
context: AbilityStageContext;
/**
* Called when an AbilityStage instance is created. Such an instance is automatically created by the system before it
* loads the first Ability instance of the module.
*
* You can initialize the module (for example, preload resources or create threads) in this callback. This API returns
* the result synchronously and does not support asynchronous callbacks.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onCreate(): void;
/**
* Called when a UIAbility with the launch mode set to
* [specified](docroot://application-models/uiability-launch-type.md#specified) is launched. This API returns a string
* representing the unique ID of the UIAbility instance. This API returns the result synchronously and does not
* support asynchronous callbacks.
*
* If a UIAbility instance with the same ID already exists in the system, that instance is reused. Otherwise, a new
* instance is created.
*
* > **NOTE**
* >
* > Starting from API version 20, this callback is not triggered when
* > [AbilityStage.onAcceptWantAsync]{@link AbilityStage.onAcceptWantAsync} is implemented.
*
* @param { Want } want - Want type parameter that includes the launch parameters provided by the caller, such as the
* ability name and bundle name.
* @returns { string } ID of the UIAbility. If a UIAbility with the same ID has been launched, that UIAbility is
* reused. Otherwise, a new instance is created and launched.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onAcceptWant(want: Want): string;
/**
* Called when a UIAbility with the launch mode set to
* [specified](docroot://application-models/uiability-launch-type.md#specified) is launched. This API returns a string
* representing the unique ID of the UIAbility instance. This API uses a promise to return the result.
*
* If a UIAbility instance with the same ID already exists in the system, that instance is reused. Otherwise, a new
* instance is created.
*
* @param { Want } want - Want information about the target UIAbility, such as the UIAbility name and bundle name.
* @returns { Promise<string> } Promise used to return a string that uniquely identifies the UIAbility instance
* launched. If a UIAbility instance with the same ID already exists in the system, that instance is reused.
* Otherwise, a new instance is created.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onAcceptWantAsync(want: Want): Promise<string>;
/**
* Called when a UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd-->, which is configured to run in an independent
* process (with **isolationProcess** set to **true** in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file), is launched. This API returns a string
* representing the unique process ID. This API returns the result synchronously and does not support asynchronous
* callbacks.
*
* If the application already has a process with the same ID, the UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd-
* -> runs in that process. Otherwise, a new process is created.
*
* If you implement both **onNewProcessRequest** and [onAcceptWant]{@link AbilityStage.onAcceptWant}, the system first
* invokes the **onNewProcessRequest** callback, and then the **onAcceptWant** callback.
*
* <!--Del-->
*
* The **isolationProcess** field can be set to **true** in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file, but only for the UIExtensionAbility of the
* sys/commonUI type.
*
* <!--DelEnd-->
*
* > **NOTE**
* >
* > - In API version 19 and earlier, only a UIAbility can be launched in the specified process. <!--Del-->Starting
* > from API version 20, a UIExtensionAbility can also be launched in the specified process.<!--DelEnd-->
* >
* > - Starting from API version 20, this callback is not executed when
* > [AbilityStage.onNewProcessRequestAsync]{@link AbilityStage.onNewProcessRequestAsync} is implemented.
*
* @param { Want } want - Want type parameter that includes the launch parameters provided by the caller, such as the
* UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd--> name and bundle name.
* @returns { string } Custom process identifier. If the process with this identifier has been created, the ability
* runs in the process. Otherwise, a new process is created and the ability runs in it.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onNewProcessRequest(want: Want): string;
/**
* Called when a UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd-->, which is configured to run in an independent
* process (with **isolationProcess** set to **true** in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file), is launched. This API returns a string
* representing the unique process ID. This API uses a promise to return the result.
*
* If the application already has a process with the same ID, the UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd-
* -> runs in that process. Otherwise, a new process is created.
*
* <!--Del-->
*
* The **isolationProcess** field can be set to **true** in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file, but only for the UIExtensionAbility of the
* sys/commonUI type.
*
* <!--DelEnd-->
*
* @param { Want } want - Want type parameter that includes the launch parameters provided by the caller, such as the
* UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd--> name and bundle name.
* @returns { Promise<string> } Promise used to return a string representing the process ID. If the application
* already has a process with the same ID, the UIAbility<!--Del--> or UIExtensionAbility<!--DelEnd--> runs in that
* process. Otherwise, a new process is created.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onNewProcessRequestAsync(want: Want): Promise<string>;
/**
* Called when the system global configuration (such as the system language and dark/light color mode) changes. All
* the configuration items are defined in the [Configuration]{@link @ohos.app.ability.Configuration:Configuration}
* class. This API returns the result synchronously and does not support asynchronous callbacks.
*
* > **NOTE**
* >
* > There are certain restrictions when this callback is actually triggered. For example, if you set the application
* > language by calling [setLanguage]{@link ./application/ApplicationContext:ApplicationContext.setLanguage}, the
* > system does not trigger the **onConfigurationUpdate** callback even if the system language changes. For details,
* > see [When to Use](docroot://application-models/subscribe-system-environment-variable-changes.md#when-to-use).
*
* @param { Configuration } newConfig - Callback invoked when the global configuration is updated. The global
* configuration indicates the configuration of the environment where the application is running and includes the
* language and color mode.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onConfigurationUpdate(newConfig: Configuration): void;
/**
* Listens for changes in the system memory level status. Called when the available memory of the entire device
* changes to a specified level. You can implement this callback to promptly release non-essential resources (such as
* cached data or temporary objects) upon receiving a memory shortage event, thereby preventing the application
* process from being forcibly terminated by the system.
*
* This API returns the result synchronously and does not support asynchronous callbacks.
*
* > **NOTE**
* >
* > Releasing UI components in the **onMemoryLevel** callback may block the main thread tasks of the current process.
* > Therefore, you are advised not to release UI components in this callback.
*
* @param { AbilityConstant.MemoryLevel } level - Memory level that indicates the memory usage status. When the
* specified memory level is reached, a callback will be invoked and the system will start adjustment.<br>**NOTE**
* <br>The trigger conditions may differ across various devices. For example, on a standard device with 12 GB of
* memory:<br>- A callback with value 0 is triggered when available memory drops between 1700 MB and 1800 MB.<br>-
* A callback with value 1 is triggered when available memory drops between 1600 MB and 1700 MB.<br>- A callback
* with value 2 is triggered when available memory falls below 1600 MB.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
/**
* Called when the last Ability instance of the corresponding module exits. This API is called during the normal
* lifecycle. If the application exits abnormally or is terminated, this API is not called. This API returns the
* result synchronously and does not support asynchronous callbacks.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
onDestroy(): void;
/**
* Called when the application is closed by the user, allowing the user to choose between immediate termination or
* cancellation. This API returns the result synchronously and does not support asynchronous callbacks.
*
* > **NOTE**
* >
* > - The API is called only when the application exits under normal circumstances (for example, when the application
* > is closed through the doc bar or tray, or when the application shuts down along with the device). It will not be
* > called if the application is terminated forcibly.
* >
* > - This API is not executed when
* > [AbilityStage.onPrepareTerminationAsync]{@link AbilityStage.onPrepareTerminationAsync} is implemented.
*
* @permission ohos.permission.PREPARE_APP_TERMINATE
* @returns { AbilityConstant.PrepareTermination } The user's choice.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 15
*/
onPrepareTermination(): AbilityConstant.PrepareTermination;
/**
* Called when the application is closed by the user, allowing the user to choose between immediate termination or
* cancellation. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > - The API is called only when the application exits under normal circumstances (for example, when the application
* > is closed through the doc bar or tray, or when the application shuts down along with the device). It will not be
* > called if the application is terminated forcibly.
* >
* > - If an asynchronous callback crashes, it will be handled as a timeout. If the application does not respond
* > within 10 seconds, it will be terminated forcibly.
*
* @permission ohos.permission.PREPARE_APP_TERMINATE
* @returns { Promise<AbilityConstant.PrepareTermination> } Promise used to return the user's choice.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 15
*/
onPrepareTerminationAsync(): Promise<AbilityConstant.PrepareTermination>;
/**
* Called when the process is launched from HyperSnap.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 24
*/
onLaunchFromHyperSnap(): void;
/**
* Called when the ability stage is about to create the first ability.
* If both this method and {@link onAboutToCreateAbilityAsync} are overridden,
* only {@link onAboutToCreateAbilityAsync} takes effect.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 24
*/
onAboutToCreateAbility(): void;
/**
* Called when the ability stage is about to create the first ability. This API uses a promise to return the result.
* Subsequent lifecycle callbacks will be suspended until the returned Promise is resolved.
* If both {@link onAboutToCreateAbility} and this method are overridden, only this method takes effect.
*
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
onAboutToCreateAbilityAsync(): Promise<void>;
}
export default AbilityStage;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ActionExtensionAbility.d.ts.md
# @ohos.app.ability.ActionExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
/**
* The ActionExtensionAbility module provides a template for you to implement custom actions. It inherits from
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility}.
*
* By implementing ActionExtensionAbility, you can provide content viewing and processing functionalities for other
* applications. For example, you can use ActionExtensionAbility to implement a text translation feature. Other
* applications can then call this ActionExtensionAbility to process content that requires translation and obtain the
* translated result.
*
* For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
* @deprecated since 26.0.0
*/
export default class ActionExtensionAbility extends UIExtensionAbility {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.application.d.ts.md
# @ohos.app.ability.application.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import ApplicationContext from './application/ApplicationContext';
import Context from './application/Context';
/**
* You can use this module to create a [Context](docroot://application-models/application-context-stage.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
declare namespace application {
/**
* Enumerates the preloading types of the current application process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
export enum AppPreloadType {
/**
* No preloading has taken place, or the preloaded data has been cleared.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
UNSPECIFIED = 0,
/**
* Preloads the process up to the point of process creation completion.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
TYPE_CREATE_PROCESS = 1,
/**
* Preloads the process up to the point of [AbilityStage]{@link @ohos.app.ability.AbilityStage:AbilityStage}
* creation completion.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
TYPE_CREATE_ABILITY_STAGE = 2,
/**
* Preloads the process up to the point of [WindowStage]{@link @ohos.window} creation completion.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
TYPE_CREATE_WINDOW_STAGE = 3,
/**
* Preloads the process up to the point of [onBackground]{@link @ohos.app.ability.UIAbility:UIAbility#onBackground}
* execution completion.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 23
*/
TYPE_CREATE_BACKGROUND_ABILITY = 4
}
/**
* Creates the context for a module. The
* [resourceManager.Configuration]{@link @ohos.resourceManager:resourceManager.Configuration} in the created module
* context inherits from the input context, making it convenient for you to access
* [application resources across HAP/HSP packages](docroot://quick-start/resource-categories-and-access.md#cross-haphsp-resources)
* . This API uses a promise to return the result.
*
* > **NOTE**
* >
* > Creating a module context involves resource querying and initialization, which can be time-consuming. In
* > scenarios where application fluidity is critical, avoid frequently or repeatedly calling the
* > **createModuleContext** API to create multiple context instances, as this may negatively impact user experience.
*
* @param { Context } context - Application context.
* @param { string } moduleName - Module name.
* @returns { Promise<Context> } Promise used to return the context created.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
* 2.Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
export function createModuleContext(context: Context, moduleName: string): Promise<Context>;
/**
* Creates the context of a plugin under the current application based on the context, plugin bundle name, and plugin
* module name, so as to obtain the basic information about the plugin. This API uses a promise to return the result.
*
* @param { Context } context - Application context.
* @param { string } pluginBundleName - Bundle name of the plugin.
* @param { string } pluginModuleName - Module name of the plugin.
* @returns { Promise<Context> } Promise used to return the context created.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 19
*/
export function createPluginModuleContext(context: Context, pluginBundleName: string, pluginModuleName: string): Promise<Context>;
/**
* Obtains the application context. This API provides context access independent of the base class **Context**.
* Repeated calls to this API generate a new ApplicationContext object.
*
* @returns { ApplicationContext } Application context.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 14
*/
export function getApplicationContext(): ApplicationContext;
/**
* Obtains the application context. This API provides context access independent of the base class **Context**.
* Repeated calls to this API obtain the same ApplicationContext instance.
*
* @returns { ApplicationContext } Application context.
* @throws { BusinessError } 16000050 - Internal error. Possible causes: Memory operation error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
export function getApplicationContextInstance(): ApplicationContext;
/**
* Adds the current process into the
* [candidate master process](docroot://application-models/ability-terminology.md#candidate-master-process) list. This
* API uses a promise to return the result.
* When the [master process](docroot://application-models/ability-terminology.md#master-process) is destroyed and a
* UIAbility or UIExtensionAbility with **isolationProcess** set to **true** is restarted, the system takes
* corresponding actions based on whether there is a candidate master process.
*
* - If a candidate master process exists, the system sets the process at the head of the candidate master process
* list as the new master process and triggers the
* [onNewProcessRequest]{@link @ohos.app.ability.AbilityStage:AbilityStage#onNewProcessRequest} callback.
* - If no candidate master process exists, the system performs the following operations based on the component type:
* - For a UIAbility, the system creates an empty process as the master process.
* - For a UIExtensionAbility, the system first tries to reuse an existing UIExtensionAbility process as the new
* master process. If no available process exists, it creates an empty process as the master process.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 801
* is returned.
*
* > **NOTE**
* >
* > If the current process is already the
* > [master process](docroot://application-models/ability-terminology.md#master-process), calling this API has no
* > effect and does not generate an error code.
* >
* > A process can be set as a candidate master process only if it is currently running a component with
* > **isolationProcess** set to **true** or has previously as the main process.
* >
* >
* > The **isolationProcess** field can be set to **true** in the
* > [module.json5](docroot://quick-start/module-configuration-file.md) file, but only for the UIExtensionAbility of
* > the sys/commonUI type.
*
* <!--DelEnd-->
*
* @param { boolean } insertToHead - Whether to add the current process to the head of the candidate master process list.
* **true** to add the current process to the head of the list, **false** to add the current process to the tail of the
* list.
* @returns { Promise<void> } Promise that returns no result.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000115 - The current process cannot be set as a candidate master process.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
export function promoteCurrentToCandidateMasterProcess(insertToHead: boolean): Promise<void>;
/**
* Removes the current process from the candidate master process list. This API uses a promise to return the result.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 801
* is returned.
* **System capability**: SystemCapability.Ability.AbilityRuntime.Core
*
* @returns { Promise<void> } Promise that returns no result.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000116 - The current process is already a master process and does not support cancellation.
* @throws { BusinessError } 16000117 - The current process is not a candidate master process and does not support
* cancellation.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
export function demoteCurrentFromCandidateMasterProcess(): Promise<void>;
/**
* Relinquishes the [master-process](docroot://application-models/ability-terminology.md#master-process) role from the
* current process. This API uses a promise to return the result.
* This API can be properly called only on 2-in-1 devices and tablets. If it is called on other device types, error
* code 801 is returned.
*
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000118 - Not a master process.
* @throws { BusinessError } 16000119 - Cannot exit because there is an unfinished request.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 21
*/
export function exitMasterProcessRole(): Promise<void>;
/**
* Obtains the preloading type of the current application process.
*
* > **NOTE**
* >
* > - This API can return the actual preloading type only if it is called before the first execution of
* > [AbilityStage.onCreate]{@link @ohos.app.ability.AbilityStage:AbilityStage#onCreate}.
* >
* > - Once the AbilityStage creation finishes, the preloaded data of the application is cleared. Any subsequent calls
* > will return **UNSPECIFIED** instead of the original preloading type.
*
* @returns { AppPreloadType } Obtains the preloading type of the current application process.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 22
*/
export function getAppPreloadType(): AppPreloadType;
}
export default application;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ApplicationStateChangeCallback.d.ts.md
# @ohos.app.ability.ApplicationStateChangeCallback.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The module is used to listen for state changes of the current application process. For ease of description, the term
* "application process" will be referred to as "process" in the following sections.
* You can call
* [ApplicationContext.on('applicationStateChange')]{@link ./application/ApplicationContext:ApplicationContext.on(type: 'applicationStateChange', callback: ApplicationStateChangeCallback)}
* and pass in a custom ApplicationStateChangeCallback to listen for foreground/background state changes of the current
* process. This allows you to perform certain actions based on the process state changes, for example, tracking the
* duration of the process in the foreground and background, or clearing memory caches when the process moves to the
* background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 10
*/
export default class ApplicationStateChangeCallback {
/**
* Called when the current process switches from the background to the foreground. When this callback is triggered,
* it does not mean that the process is already fully in the foreground state, but rather that it is about to enter
* the foreground state. At this point, operations that depend on the foreground state (such as launching another
* UIAbility) cannot be performed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 10
*/
onApplicationForeground(): void;
/**
* Called when the current process switches from the foreground to the background. When this callback is triggered,
* the process is fully in the background state, and you can perform operations suitable for the background state
* (for example, clearing memory caches).
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 10
*/
onApplicationBackground(): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appManager.d.ts.md
# @ohos.app.ability.appManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
import { ProcessInformation as _ProcessInformation } from './application/ProcessInformation';
import * as _ApplicationStateObserver from './application/ApplicationStateObserver';
import * as _AbilityStateData from './application/AbilityStateData';
import * as _AppStateData from './application/AppStateData';
import type * as _ProcessData from './application/ProcessData';
/**
* The appManager module implements application management. You can use the APIs of this module to query whether the
* application is undergoing a stability test, whether the application is running on a RAM constrained device, the
* memory size of the application, and information about the running process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
declare namespace appManager {
/**
* Enumerates the processes states.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
export enum ProcessState {
/**
* The process is created.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
STATE_CREATE,
/**
* The process is running in the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
STATE_FOREGROUND,
/**
* At least one window in the process has focus.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
STATE_ACTIVE,
/**
* The process is running in the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
STATE_BACKGROUND,
/**
* The process is destroyed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 10
*/
STATE_DESTROY
}
/**
* Registers an observer to listen for lifecycle changes of all applications.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - Type of the API to call. It is fixed at **'applicationState'**.
* @param { ApplicationStateObserver } observer - Application state observer, which is used to listen for applications
* lifecycle changes.
* @returns { number } ID of the observer registered. You can pass this ID to
* [off('applicationState')]{@link appManager.off(type: 'applicationState', observerId: number)} to unregister the
* observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function on(type: 'applicationState', observer: ApplicationStateObserver): number;
/**
* Registers an observer to listen for lifecycle changes of the specified application.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - Type of the API to call. It is fixed at **'applicationState'**.
* @param { ApplicationStateObserver } observer - Application state observer, which is used to listen for application
* lifecycle changes.
* @param { Array<string> } bundleNameList - **bundleName** array of the application. A maximum of 128 bundle names can be
* passed.
* @returns { number } ID of the observer registered. You can pass this ID to
* [off('applicationState')]{@link appManager.off(type: 'applicationState', observerId: number)} to unregister the
* observer.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array<string>): number;
/**
* Unregisters the observer used to listen for application state changes. This API uses an asynchronous callback to
* return the result.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - Type of the API to call. It is fixed at **'applicationState'**.
* @param { number } observerId - ID of the observer registered, which is the listener ID returned by
* [on('applicationState')]{@link appManager.on(type: 'applicationState', observer: ApplicationStateObserver)}.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the application state observer is
* deregistered, **err** is undefined; otherwise, **error** is an error object.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 15
*/
function off(type: 'applicationState', observerId: number, callback: AsyncCallback<void>): void;
/**
* Unregisters the observer used to listen for application state changes. This API uses a promise to return the
* result.
*
* @permission ohos.permission.RUNNING_STATE_OBSERVER
* @param { 'applicationState' } type - Type of the API to call. It is fixed at **'applicationState'**.
* @param { number } observerId - ID of the observer registered, which is the listener ID returned by
* [on('applicationState')]{@link appManager.on(type: 'applicationState', observer: ApplicationStateObserver)}.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function off(type: 'applicationState', observerId: number): Promise<void>;
/**
* Checks whether the system is undergoing a stability test. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > A stability test scenario refers to a specific testing environment designed to verify application reliability
* > under complex, extreme, or long-term operating conditions.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the API call is successful, **err**
* is **undefined** and **data** is the check result for whether the system is undergoing a stability test. Otherwise,
* **err** is an error object. You can perform error handling or other custom processing.<br>**true** is returned if
* the system is undergoing a stability test; **false** is returned otherwise.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function isRunningInStabilityTest(callback: AsyncCallback<boolean>): void;
/**
* Checks whether the system is undergoing a stability test. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > A stability test scenario refers to a specific testing environment designed to verify application reliability
* > under complex, extreme, or long-term operating conditions.
*
* @returns { Promise<boolean> } Promise used to return the API call result and the result **true** or **false**. You can
* perform error handling or custom processing in this callback.
*
* **true** is returned if the system is undergoing a stability test; **false** is returned otherwise.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function isRunningInStabilityTest(): Promise<boolean>;
/**
* Kills a process by bundle name. This API uses a promise to return the result.
*
* @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES
* @param { string } bundleName - Bundle name.
* @param { boolean } clearPageStack - Whether to clear the page stack. **true** to clear, **false** otherwise.
* @param { number } [appIndex] - ID of an application clone. The default value is **0**. If the value is **0**, all processes
* of the main application are terminated. If the value is greater than 0, all processes of the specified application
* clone are terminated.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise<void>;
/**
* Checks whether the current device is a RAM-constrained device (a device with severely limited memory resources).
* This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the API call result and the result indicating whether the device is
* RAM-constrained. You can perform error handling or custom processing in this callback.
* **true** is returned if the device is RAM-constrained; **false** is returned otherwise.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function isRamConstrainedDevice(): Promise<boolean>;
/**
* Checks whether the current device is a RAM-constrained device (a device with severely limited memory resources).
* This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. If the API call is successful, **err**
* is **undefined** and **data** is the check result for whether the device is RAM-constrained. Otherwise, **err** is
* an error object. You can perform error handling or other custom processing.<br>**true** is returned if the device is
* RAM-constrained; **false** is returned otherwise.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function isRamConstrainedDevice(callback: AsyncCallback<boolean>): void;
/**
* Obtains the maximum memory (RAM allocation) available to the current application. This API uses a promise to return
* the result.
*
* @returns { Promise<number> } Promise used to return the maximum memory (RAM allocation) size, in MB. You can perform error
* processing or other custom processing based on the size.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function getAppMemorySize(): Promise<number>;
/**
* Obtains the maximum memory (RAM allocation) available to the current application. This API uses an asynchronous
* callback to return the result.
*
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the API call is successful, **err** is
* **undefined** and **data** is the maximum memory (RAM allocation) available to the current application. Otherwise,
* **err** is an error object. You can perform error handling or other custom processing based on the return value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function getAppMemorySize(callback: AsyncCallback<number>): void;
/**
* Obtains information about the running processes of the current application. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > - In versions earlier than API version 11, this API requires the ohos.permission.GET_RUNNING_INFO permission,
* > which is available only for system applications.
* >
* > - Starting from API version 11, this API is used only to obtain the process information of the caller. No
* > permission is required.
*
* @permission ohos.permission.GET_RUNNING_INFO [since 9 - 10]
* @returns { Promise<Array<ProcessInformation>> } Promise used to return the API call result and the process running
* information. You can perform error handling or custom processing in this callback.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function getRunningProcessInformation(): Promise<Array<ProcessInformation>>;
/**
* Obtains information about the running processes of the current application. This API uses an asynchronous callback
* to return the result.
*
* > **NOTE**
* >
* > - In versions earlier than API version 11, this API requires the ohos.permission.GET_RUNNING_INFO permission,
* > which is available only for system applications.
* >
* > - Starting from API version 11, this API is used only to obtain the process information of the caller. No
* > permission is required.
*
* @permission ohos.permission.GET_RUNNING_INFO [since 9 - 10]
* @param { AsyncCallback<Array<ProcessInformation>> } callback - Callback used to return the result. If the API call is
* successful, **err** is **undefined** and **data** is the information about the running processes. Otherwise, **err**
* is an error object. You can perform error handling or other custom processing.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
function getRunningProcessInformation(callback: AsyncCallback<Array<ProcessInformation>>): void;
/**
* Checks whether the application with the specified bundle name and application clone index is running across all
* users. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > If the application is not installed for the current user, error code 16000073 is returned. If the application is
* > installed for the current user, the system checks whether the application is running across all users.
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { string } bundleName - Bundle name.
* @param { number } [appCloneIndex] - Index of an application clone. The value ranges from 0 to 1000. The value **0** means
* the main application, and a value greater than 0 means a specific application clone.
* @returns { Promise<boolean> } Promise used to return the result. **true** is returned if at least one user is running
* the specified application. **false** is returned if none of the users are running the application.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000073 - The app clone index is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
function isAppRunning(bundleName: string, appCloneIndex?: number): Promise<boolean>;
/**
* Defines the ability state data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type AbilityStateData = _AbilityStateData.default;
/**
* Defines the application state data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type AppStateData = _AppStateData.default;
/**
* Defines the observer used to listen for application state changes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type ApplicationStateObserver = _ApplicationStateObserver.default;
/**
* Defines the process information.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
export type ProcessInformation = _ProcessInformation;
/**
* Defines the process data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 14
*/
export type ProcessData = _ProcessData.default;
}
export default appManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appMemoryOptimizer.d.ts.md
# @ohos.app.ability.appMemoryOptimizer.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* appMemoryOptimizer provides application memory optimization capabilities, including performing file page cache
* eviction on specified files, performing file page cache eviction on specified modules.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
declare namespace appMemoryOptimizer {
/**
* Sends a request to the system to release file page cache of specified files. The system determines
* whether to actually perform the release based on the current memory status, and success is not guaranteed.
*
* @param { Array<string> } fileNames - Array of file names for which file page cache needs to be released.
* File names must end with .so, .hap, or .hsp.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 16000163 - File type error. File name does not end with .so, .hap, or .hsp.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function evictFilePages(fileNames: Array<string>): Promise<void>;
/**
* Sends a request to the system to release file page cache of specified modules. The system determines
* whether to actually perform the release based on the current memory status, and success is not guaranteed.
* The system reads the memory_optimizer.json configuration file of the corresponding module, obtains the
* evictFilePages array, and performs file page cache eviction on the files in the array.
*
* Configuration file path: {Module directory}/src/main/resources/rawfile/memory_optimizer.json
* File names in the evictFilePages array of the configuration file must end with .so, .hap, or .hsp.
*
* @param { Array<string> } moduleNames - Array of module names for which file page cache needs to be released.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 16000163 - File type error. File names in the evictFilePages array of the configuration
* file do not end with .so, .hap, or .hsp.
* @throws { BusinessError } 16000164 - Failed to parse configuration file.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function evictModuleFilePages(moduleNames: Array<string>): Promise<void>;
}
export default appMemoryOptimizer;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.appRecovery.d.ts.md
# @ohos.app.ability.appRecovery.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIAbilityContext from './application/UIAbilityContext';
import Want from './@ohos.app.ability.Want';
/**
* The appRecovery module provides APIs for recovering faulty applications.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
declare namespace appRecovery {
/**
* Enumerates the application restart flags. This enum is used as an input parameter of
* [enableAppRecovery]{@link appRecovery.enableAppRecovery}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
enum RestartFlag {
/**
* The application is restarted in all cases.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
ALWAYS_RESTART = 0,
/**
* The application is restarted in the case of JS_CRASH.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
RESTART_WHEN_JS_CRASH = 0x0001,
/**
* The application is restarted in the case of APP_FREEZE.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
RESTART_WHEN_APP_FREEZE = 0x0002,
/**
* The application is not restarted in any case.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
NO_RESTART = 0xFFFF,
/**
* Restart if the current app process encounters a cppcrash
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
RESTART_WHEN_CPP_CRASH = 0x0004
}
/**
* Enumerates the scenarios for saving the application state. This enum is used as an input parameter of
* [enableAppRecovery]{@link appRecovery.enableAppRecovery}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
enum SaveOccasionFlag {
/**
* Saving the application state when an application fault occurs.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
SAVE_WHEN_ERROR = 0x0001,
/**
* Saving the application state when the application is switched to the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
SAVE_WHEN_BACKGROUND = 0x0002
}
/**
* Enumerates the application state saving modes. This enum is used as an input parameter of
* [enableAppRecovery]{@link appRecovery.enableAppRecovery}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
enum SaveModeFlag {
/**
* The application state is saved and written to the local file cache.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
SAVE_WITH_FILE = 0x0001,
/**
* The application state is saved in the memory. When the application exits due to a fault, it is written to the
* local file cache.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
SAVE_WITH_SHARED_MEMORY = 0x0002
}
/**
* Enables application recovery. After this API is called, the first ability that is displayed when the application is
* started from the initiator can be restored.
*
* @param { RestartFlag } [restart] - Whether the application is restarted upon a fault. By default, the application
* is restarted.
* @param { SaveOccasionFlag } [saveOccasion] - Scenario for saving the application state. By default, the state is
* saved when a fault occurs.
* @param { SaveModeFlag } [saveMode] - Application state saving mode. By default, the application state is written to
* the local file cache.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice [since 11]
* @since 9
*/
function enableAppRecovery(restart?: RestartFlag, saveOccasion?: SaveOccasionFlag, saveMode?: SaveModeFlag): void;
/**
* Restarts the current process and starts the first ability that is displayed when the application is started. If the
* state of this ability is saved, the saved state data is passed into the **wantParam** property in the **want**
* parameter of the **onCreate** lifecycle callback of the ability.
*
* In API version 10, the ability specified by [setRestartWant]{@link appRecovery.setRestartWant} is started. If no
* ability is specified, the following rules are used:
*
* If the ability of the current application running in the foreground supports recovery, that ability is started.
*
* If multiple abilities that support recovery is running in the foreground, only the last ability is started.
*
* If no ability is running in the foreground, none of them is started.
*
* This API can be used together with the APIs of [errorManager]{@link @ohos.app.ability.errorManager:errorManager}.
* The interval between two restarts must be greater than one minute. If this API is called repeatedly within one
* minute, the application exits but does not restart. The behavior of automatic restart is the same as that of
* proactive restart.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice [since 11]
* @since 9
*/
function restartApp(): void;
/**
* Sets an ability that will be recovered. The ability must be a UIAbility in the current bundle.
*
* @param { Want } want - Want of the target ability. You can set the **bundleName** and **abilityName** fields in
* **Want** to specify the ability.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
function setRestartWant(want: Want): void;
/**
* Saves the application state. This API can be used together with the APIs of
* [errorManager]{@link @ohos.app.ability.errorManager:errorManager}.
*
* @returns { boolean } Whether the application state is saved. **true** if saved, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice [since 11]
* @since 9
*/
function saveAppState(): boolean;
/**
* Saves the ability state, which will be used for recovery. This API can be used together with the APIs of
* [errorManager]{@link @ohos.app.ability.errorManager:errorManager}.
*
* @param { UIAbilityContext } [context] - Context of the target ability.
* @returns { boolean } Whether the application state is saved. **true** if saved, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
function saveAppState(context?: UIAbilityContext): boolean;
}
export default appRecovery;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AppServiceExtensionAbility.d.ts.md
# @ohos.app.ability.AppServiceExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* # Constraints
*
* - Currently, only 2-in-1 devices are supported.
* - To integrate an AppServiceExtensionAbility, applications must request the ACL permission (
* ohos.permission.SUPPORT_APP_SERVICE_EXTENSION). This ACL permission is available only for enterprise applications.
*/
/**
* # Lifecycle
*
* The AppServiceExtensionAbility provides the following lifecycle callbacks:
* [onCreate()]{@link AppServiceExtensionAbility.onCreate}, [onRequest()]{@link AppServiceExtensionAbility.onRequest},
* [onConnect()]{@link AppServiceExtensionAbility.onConnect}, and
* [onDestroy()]{@link AppServiceExtensionAbility.onDestroy}. You can override the callback methods as required.
* The following figure shows the AppServiceExtensionAbility lifecycle.
*
* 
*/
import rpc from './@ohos.rpc';
import AppServiceExtensionContext from './application/AppServiceExtensionContext';
import Want from './@ohos.app.ability.Want';
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
/**
* The AppServiceExtensionAbility module provides extended capabilities for background services, including lifecycle
* callbacks for creating, destroying, connecting, and disconnecting background services.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
declare class AppServiceExtensionAbility extends ExtensionAbility {
/**
* Context environment for an AppServiceExtensionAbility. This context inherits from
* [ExtensionContext]{@link ./application/ExtensionContext:ExtensionContext}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
context: AppServiceExtensionContext;
/**
* Called when an AppServiceExtensionAbility instance is created.
* Applications can perform initialization operations, such as registering common event listeners, in this callback.
*
* > **NOTE**
* >
* > If an AppServiceExtensionAbility instance has already been created, the **onCreate()** callback is not invoked
* > again when the instance is started or connected.
*
* @param { Want } want - Want information about the target AppServiceExtensionAbility instance, including the
* ability name and bundle name.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
onCreate(want: Want): void;
/**
* Called when an AppServiceExtensionAbility instance is destroyed. Applications can perform resource cleanup
* operations, such as unregistering listeners, in this callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
onDestroy(): void;
/**
* Called each time an AppServiceExtensionAbility instance is started by calling
* [startAppServiceExtensionAbility()]{@link ./application/UIAbilityContext:UIAbilityContext.startAppServiceExtensionAbility}
* .
*
* @param { Want } want - Want information about the target AppServiceExtensionAbility instance, including the
* ability name and bundle name.
* @param { number } startId - Number of times the instance has been started. The initial value is **1** for the first
* start, and it increments automatically for subsequent starts.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
onRequest(want: Want, startId: number): void;
/**
* Called when an AppServiceExtensionAbility instance is connected by calling
* [connectAppServiceExtensionAbility()]{@link ./application/UIAbilityContext:UIAbilityContext.connectAppServiceExtensionAbility}
* .
*
* @param { Want } want - Want information about the target AppServiceExtensionAbility instance, including the
* ability name and bundle name.
* @returns { rpc.RemoteObject } A RemoteObject used for communication between the server and client.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
onConnect(want: Want): rpc.RemoteObject;
/**
* Called when all connections to an AppServiceExtensionAbility instance are interrupted.
*
* @param { Want } want - Want information passed by the caller when the AppServiceExtensionAbility instance was most
* recently started or connected. This includes information such as the ability name and bundle name.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
onDisconnect(want: Want): void;
}
export default AppServiceExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.AtomicServiceOptions.d.ts.md
# @ohos.app.ability.AtomicServiceOptions.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import CompletionHandlerForAtomicService from './@ohos.app.ability.CompletionHandlerForAtomicService';
import StartOptions from './@ohos.app.ability.StartOptions';
/**
* **AtomicServiceOptions** is used as an input parameter of
* [openAtomicService()]{@link ./application/UIAbilityContext:UIAbilityContext.openAtomicService} to carry arguments. It
* inherits from [StartOptions]{@link @ohos.app.ability.StartOptions:StartOptions}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
export default class AtomicServiceOptions extends StartOptions {
/**
* Mode in which the system processes the startup. For example, **wantConstant.Flags.FLAG_INSTALL_ON_DEMAND**
* indicates that the installation-free capability is used.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
flags?: number;
/**
* Additional parameters. For details, see the **parameters** field in [Want]{@link @ohos.app.ability.Want:Want}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
parameters?: Record<string, Object>;
/**
* Operation class for receiving the result of opening an atomic service.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
completionHandlerForAtomicService?: CompletionHandlerForAtomicService;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.autoFillManager.d.ts.md
# @ohos.app.ability.autoFillManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type { UIContext } from './@ohos.arkui.UIContext';
import type * as _ViewData from './application/ViewData';
import type * as _PageNodeInfo from './application/PageNodeInfo';
import { AutoFillType } from './application/AutoFillType';
import type * as _AutoFillRequest from './application/AutoFillRequest';
import type * as _AutoFillRect from './application/AutoFillRect';
import { AutoFillTriggerType } from './application/AutoFillTriggerType';
import { FillFailureResult as _FillFailureResult } from './application/AutoFillRequest';
/**
* The autoFillManager module provides APIs for saving accounts and passwords.
*
* Unlike the system's auto-save feature that triggers during page transitions, this feature requires manual activation
* by the user. For example, the user must input their account and password on a website and click the **Save** button
* to initiate the saving process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
declare namespace autoFillManager {
/**
* Called when auto fill request is successfully handled.
*
* @param { ViewData } viewData - Indicates the ui context where the filling operation will be performed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
type OnFillSuccessFn = (viewData: ViewData) => void;
/**
* Called when auto fill request is failed to be handled.
*
* @param { FillFailureResult } result - Indicates the ui context where the filling operation will be performed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
type OnFillFailureFn = (result: FillFailureResult) => void;
/**
* Implements callbacks triggered when auto-save is complete.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
export interface AutoSaveCallback {
/**
* Called when auto save request is successfully handled.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
onSuccess(): void;
/**
* Called when auto save request is failed to be handled.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
onFailure(): void;
}
/**
* Auto fill callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export interface AutoFillCallback {
/**
* Called when auto fill request is successfully handled.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
onSuccess: OnFillSuccessFn;
/**
* Called when auto fill request is failed to be handled.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
onFailure: OnFillFailureFn;
}
/**
* Requests to automatically save the widget data. This API uses an asynchronous callback to return the result.
* If the current widget does not support widget switching, you can call this API to save historical widget input
* data. The callback is triggered when the auto-save request is complete.
*
* @param { UIContext } context - UI context in which the auto-save operation will be performed.
* @param { AutoSaveCallback } [callback] - Implements callbacks triggered when auto-save is complete.
* @throws { BusinessError } 401 - The parameter check failed. Possible causes: 1. Get instance id failed;
* <br>2. Parse instance id failed; 3. The second parameter is not of type callback.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
export function requestAutoSave(context: UIContext, callback?: AutoSaveCallback): void;
/**
* Trigger an auto save request.
*
* @param { UIContext } context - Indicates the ui context where the save operation will be performed.
* @param { SaveRequest } request - Indicates the struct of automatic save request.
* @param { AutoSaveCallback } [callback] - Indicates the callback that used to receive the result.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export function requestAutoSave(context: UIContext, request: SaveRequest, callback?: AutoSaveCallback): void;
/**
* Trigger an auto fill request.
*
* @param { UIContext } context - Indicates the ui context where the filling operation will be performed.
* @param { FillRequest } request - Indicates the struct of automatic filling request.
* @param { AutoFillCallback } [callback] - Indicates the callback that used to receive the result.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export function requestAutoFill(context: UIContext, request: FillRequest, callback?: AutoFillCallback): void;
/**
* Defines the view data used for auto-fill.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type ViewData = _ViewData.default;
/**
* Defines the page node information used for auto-fill.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type PageNodeInfo = _PageNodeInfo.default;
/**
* The enum of auto fill type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export { AutoFillType };
/**
* Defines the information about an auto-fill request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type FillRequest = _AutoFillRequest.FillRequest;
/**
* Defines the information about an auto-save request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type SaveRequest = _AutoFillRequest.SaveRequest;
/**
* The interface of filling failure result.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type FillFailureResult = _FillFailureResult;
/**
* Defines the rectangle used for auto-fill.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export type AutoFillRect = _AutoFillRect.default;
/**
* The enum of auto fill trigget type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export { AutoFillTriggerType };
}
export default autoFillManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.autoStartupManager.d.ts.md
# @ohos.app.ability.autoStartupManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The autoStartupManager module provides APIs for an application to query whether it is configured to start
* automatically at boot time.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 21
*/
declare namespace autoStartupManager {
/**
* Checks whether the current application is enabled for automatic startup at boot time. This API uses a promise to
* return the result.
* This API can be properly called only on phones, PC/2-in-1 devices, tablets, and wearables. On other devices, it
* returns the error code 801.
*
* @returns { Promise<boolean> } Promise used to return the auto-startup status. **true** if enabled for automatic
* startup at boot time, **false** otherwise.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed;
* 2.System service failed to communicate with dependency module.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 21
*/
function getAutoStartupStatusForSelf(): Promise<boolean>;
/**
* Check whether the current device supports auto startup on this device.
*
* @returns { boolean }
* - `true`: Device supports auto startup.
* - `false`: Device do not support auto startup.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function isAutoStartupSupported(): boolean;
}
export default autoStartupManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcess.d.ts.md
# @ohos.app.ability.ChildProcess.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type { ChildProcessArgs } from './@ohos.app.ability.ChildProcessArgs';
/**
* ChildProcess is the base class for you to customize child processes. When starting a child process through
* [childProcessManager]{@link @ohos.app.ability.childProcessManager:childProcessManager}, you must inherit this class
* and override the entrypoint method.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
declare class ChildProcess {
/**
* Entrypoint method of the child process. This callback is triggered when the child process is started through
* [childProcessManager]{@link @ohos.app.ability.childProcessManager:childProcessManager}.
*
* @param { ChildProcessArgs } [args] - Parameters transferred to the child process.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onStart(args?: ChildProcessArgs): void;
}
export default ChildProcess;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcessArgs.d.ts.md
# @ohos.app.ability.ChildProcessArgs.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The module describes the parameters transferred to the child process. When starting a child process through
* [childProcessManager]{@link @ohos.app.ability.childProcessManager:childProcessManager}, you can transfer parameters
* to the child process through **ChildProcessArgs**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export interface ChildProcessArgs {
/**
* Custom parameters to be transparently transmitted to the child process. The parameters can be obtained through
* **args.entryParams** in [ChildProcess.onStart]{@link @ohos.app.ability.ChildProcess:ChildProcess.onStart}. The
* maximum data volume supported by **entryParams** is 150 KB.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
entryParams?: string;
/**
* File Descriptor (FD) handles, which are used for communication between the main process and child process. They are
* passed to the child process in the form of key-value pairs, where **key** is a custom string and **value** is a DF
* handle. The FD handles can be obtained through **args.fds** in
* [ChildProcess.onStart]{@link @ohos.app.ability.ChildProcess:ChildProcess.onStart}.
*
* <b>NOTE</b>
*
* - **fds** supports a maximum of 16 groups. In each group, **key** contains a maximum of 20 characters.
* - The ID of a handle passed to the child process may change, but the handle always points to the same file.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
fds?: Record<string, number>;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.childProcessManager.d.ts.md
# @ohos.app.ability.childProcessManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type { AsyncCallback } from './@ohos.base';
import type { ChildProcessArgs } from './@ohos.app.ability.ChildProcessArgs';
import type { ChildProcessOptions } from './@ohos.app.ability.ChildProcessOptions';
/**
* The childProcessManager module provides the child process management capability. Currently, it provides APIs to
* create and start a child process
* The created child process will exit when the parent process exits and cannot run independently.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 11
*/
declare namespace childProcessManager {
/**
* Enumerates the child process start modes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
export const enum StartMode {
/**
* The child process is forked from the application process. The child process started in this mode inherits the
* resources of the parent process and cannot use Binder IPC to communicate with other processes. Otherwise, the
* child process will crash.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
SELF_FORK = 0,
/**
* The child process is forked from AppSpawn. The child process started in this mode does not inherit the resources
* of the parent process and can use Binder IPC to communicate with other processes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
APP_SPAWN_FORK = 1
}
/**
* Starts an [ArkTS child process](docroot://application-models/ability-terminology.md#arkts-child-process). This API
* uses a promise to return the result.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 160
* 00061 is returned.
*
* > **NOTE**
* >
* > If the child process is created successfully, its PID is returned, and its
* > [ChildProcess.onStart]{@link @ohos.app.ability.ChildProcess:ChildProcess#onStart} function is executed. Once the
* > function is done, the child process is automatically destroyed.
* >
* > The child process started by calling this API does not support asynchronous ArkTS API calls. It supports only
* > synchronous ArkTS API calls.
*
* @param { string } srcEntry - Path of the source file of the child process relative to the root directory **src/main**.
* The source file can be stored only in the module of the entry type. For example, if the source file of a child
* process is **src/main/ets/process/DemoProcess.ets** in the entry module, then **srcEntry** is **./ets/process/
* DemoProcess.ets**.<br>In addition, ensure that the source file of the child process is referenced by other files to
* prevent it from being optimized by the build tool. (For details, see the sample code below.)
* @param { StartMode } startMode - Start mode of the child process.
* @returns { Promise<number> } Promise used to return the PID of the child process.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000062 - The number of child processes exceeds the upper limit.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
function startChildProcess(srcEntry: string, startMode: StartMode): Promise<number>;
/**
* Starts an [ArkTS child process](docroot://application-models/ability-terminology.md#arkts-child-process). This API
* uses an asynchronous callback to return the result.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 160
* 00061 is returned.
*
* > **NOTE**
* >
* > If the child process is created successfully, its PID is returned, and its
* > [ChildProcess.onStart]{@link @ohos.app.ability.ChildProcess:ChildProcess#onStart} function is executed. Once the
* > function is done, the child process is automatically destroyed.
* >
* > The child process started by calling this API does not support asynchronous ArkTS API calls. It supports only
* > synchronous ArkTS API calls.
*
* @param { string } srcEntry - Path of the source file of the child process relative to the root directory **src/main**.
* The source file can be stored only in the module of the entry type. For example, if the source file of a child
* process is **src/main/ets/process/DemoProcess.ets** in the entry module, then **srcEntry** is **./ets/process/
* DemoProcess.ets**.<br>In addition, ensure that the source file of the child process is referenced by other files to
* prevent it from being optimized by the build tool. (For details, see the sample code below.)
* @param { StartMode } startMode - Start mode of the child process.
* @param { AsyncCallback<number> } callback - Callback used to return the result. If the subprocess is started, **err** is
* **undefined** and **data** is the PID of the child process. Otherwise, **data** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000062 - The number of child processes exceeds the upper limit.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
function startChildProcess(srcEntry: string, startMode: StartMode, callback: AsyncCallback<number>): void;
/**
* Starts an [ArkTS child process](docroot://application-models/ability-terminology.md#arkts-child-process). This API
* uses a promise to return the result.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 801
* is returned.
*
* > **NOTE**
* >
* > The child process started by calling this API does not inherit the resources of the parent process. If the child
* > process is created successfully, its PID is returned, and its
* > [ChildProcess.onStart]{@link @ohos.app.ability.ChildProcess:ChildProcess#onStart} function is executed. After the
* > function is done, the child process is not automatically destroyed. Instead, it must be destroyed by calling
* > [process.abort]{@link @ohos.process:process.abort}. After the process that calls this API is destroyed, the
* > created child process is also destroyed.
*
* @param { string } srcEntry - Path of the source file of the child process relative to the root directory **src/main**.
* The source file cannot be stored in the module of the HAR type. The value consists of a module name, a slash (/),
* and a file path. For example, if the child process file is **src/main/ets/process/DemoProcess.ets** in module1, then
* **srcEntry** is **module1/ets/process/DemoProcess.ets**.<br>In addition, ensure that the source file of the child
* process is referenced by other files to prevent it from being optimized by the build tool. (For details, see the
* sample code below.)
* @param { ChildProcessArgs } args - Parameters transferred to the child process.
* @param { ChildProcessOptions } [options] - Startup configuration of the child process.
* @returns { Promise<number> } Promise used to return the PID of the child process.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000062 - The number of child processes exceeds the upper limit. [since 13]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
function startArkChildProcess(srcEntry: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise<number>;
/**
* Starts a [native child process](docroot://application-models/ability-terminology.md#native-child-process). This API
* uses a promise to return the result.
* This API can be properly called on PCs/2-in-1 devices and tablets. If it is called on other devices, error code 801
* is returned.
*
* > **NOTE**
* >
* > The child process started by calling this API does not inherit the resources of the parent process. After the
* > child process is created, its PID is returned, the dynamic link library file specified in the parameters is
* > loaded, and the entry function of the child process is executed. Once the entry function is done, the child
* > process is automatically destroyed. After the process that calls this API is destroyed, the created child process
* > is also destroyed.
*
* @param { string } entryPoint - The symbol and entry function of the dynamic link library called in the child process are
* separated by a colon (:), for example, **libentry.so:Main**.
* @param { ChildProcessArgs } args - Parameters transferred to the child process.
* @param { ChildProcessOptions } [options] - Startup configuration of the child process.
* @returns { Promise<number> } Promise used to return the PID of the child process.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000062 - The number of child processes exceeds the upper limit.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 13
*/
function startNativeChildProcess(entryPoint: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise<number>;
/**
* Checks whether the caller is allowed to create ark child processes on this device.
* Some devices may not support creating ark child processes, so it is recommended to use this interface to
* verify support beforehand.
*
* @returns { boolean }
* - `true`: The caller is allowed to create ark child processes.
* - `false`: The caller is not allowed to create ark child processes.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function isArkChildProcessSupported(): boolean;
/**
* Checks whether the caller is allowed to create native child processes on this device.
* Some devices may not support creating native child processes, so it is recommended to use this interface to
* verify support beforehand.
*
* @returns { boolean }
* - `true`: The caller is allowed to create native child processes.
* - `false`: The caller is not allowed to create native child processes.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
function isNativeChildProcessSupported(): boolean;
}
export default childProcessManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ChildProcessOptions.d.ts.md
# @ohos.app.ability.ChildProcessOptions.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The module describes the startup configuration of a child process. When starting a child process through
* [childProcessManager]{@link @ohos.app.ability.childProcessManager:childProcessManager}, you can configure the startup
* configuration of the child process through **ChildProcessOptions**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export interface ChildProcessOptions {
/**
* Controls the sandbox isolation level and network access permissions of the child process. **true** if the child
* process runs in an independent sandbox environment and cannot access the network; **false** if the child process
* shares the sandbox and network environment with the main process. The default value is **false**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
isolationMode?: boolean;
/**
* Whether the child process uses an independent UID. **true** if the child process uses an independent UID; **false**
* if the child process and the main process share the same UID. The default value is **false**. This parameter is
* valid only when **isolationMode** is set to **true**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 21
*/
isolationUid?: boolean;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.common.d.ts.md
# @ohos.app.ability.common.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import * as _UIAbilityContext from './application/UIAbilityContext';
import type * as _UIExtensionContext from './application/UIExtensionContext';
import * as _AbilityStageContext from './application/AbilityStageContext';
import * as _ApplicationContext from './application/ApplicationContext';
import * as _BaseContext from './application/BaseContext';
import * as _Context from './application/Context';
import * as _ExtensionContext from './application/ExtensionContext';
import * as _FormExtensionContext from './application/FormExtensionContext';
import * as _FormEditExtensionContext from './application/FormEditExtensionContext';
import * as _LiveFormExtensionContext from './application/LiveFormExtensionContext';
import * as _EventHub from './application/EventHub';
import type * as _VpnExtensionContext from './application/VpnExtensionContext';
import type * as _EmbeddableUIAbilityContext from './application/EmbeddableUIAbilityContext';
import type * as _PhotoEditorExtensionContext from './application/PhotoEditorExtensionContext';
import * as _UIServiceProxy from './application/UIServiceProxy';
import * as _UIServiceExtensionConnectCallback from './application/UIServiceExtensionConnectCallback';
import { AbilityResult as _AbilityResult } from './ability/abilityResult';
import type _AbilityStartCallback from './application/AbilityStartCallback';
import { ConnectOptions as _ConnectOptions } from './ability/connectOptions';
import { PacMap as _PacMap } from './ability/dataAbilityHelper';
import { AgentCard as _AgentCard, AgentProvider as _AgentProvider, AgentCapabilities as _AgentCapabilities, AgentSkill as _AgentSkill, AgentAppInfo as _AgentAppInfo } from './application/AgentCard';
import { AgentHostProxy as _AgentHostProxy } from './application/AgentHostProxy';
import _AgentExtensionContext from './application/AgentExtensionContext';
/**
* You can use this module to reference the ability public module class.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare namespace common {
/**
* Defines the context environment for the [UIAbility]{@link @ohos.app.ability.UIAbility}. It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type UIAbilityContext = _UIAbilityContext.default;
/**
* Defines the context environment for the [AbilityStage]{@link @ohos.app.ability.AbilityStage:AbilityStage}. It
* inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type AbilityStageContext = _AbilityStageContext.default;
/**
* Defines the application context. It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type ApplicationContext = _ApplicationContext.default;
/**
* Defines the parent class of all context types.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type BaseContext = _BaseContext.default;
/**
* Defines the context base class for the
* [stage model](docroot://application-models/ability-terminology.md#stage-model).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export type Context = _Context.default;
/**
* Defines the context environment for the
* [ExtensionAbility]{@link @ohos.app.ability.ExtensionAbility:ExtensionAbility}. It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export type ExtensionContext = _ExtensionContext.default;
/**
* The context of form extension. It allows access to
* formExtension-specific resources.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
/**
* The context of form extension. It allows access to
* formExtension-specific resources.
*
* @typedef { _FormExtensionContext.default }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
export type FormExtensionContext = _FormExtensionContext.default;
/**
* The context of form edit extension. It allows access to
* formEditExtension-specific resources.
*
* @typedef { _FormEditExtensionContext.default }
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 22
*/
export type FormEditExtensionContext = _FormEditExtensionContext.default;
/**
* The context of live form extension. It allows access to
* liveFormExtension-specific resources.
*
* @typedef { _LiveFormExtensionContext.default }
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 22
*/
export type LiveFormExtensionContext = _LiveFormExtensionContext.default;
/**
* Defines EventHub, which is an event communication mechanism based on the publish-subscribe pattern.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
export type EventHub = _EventHub.default;
/**
* Defines the container of basic data types.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 9
*/
export type PacMap = _PacMap;
/**
* Defines the result code and data returned when a started ability is terminated.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export type AbilityResult = _AbilityResult;
/**
* Defines the connection options. It is used as an input parameter for connection to a background service, to receive
* the connection status with the background service.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
export type ConnectOptions = _ConnectOptions;
/**
* Defines the context environment for the
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility}. It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
export type UIExtensionContext = _UIExtensionContext.default;
/**
* Defines the callback invoked to return the UIExtensionAbility startup result. It is usually used as an input
* parameter in
* [UIAbilityContext.startAbilityByType]{@link ./application/UIAbilityContext:UIAbilityContext.startAbilityByType(type: string, wantParam: Record<string, Object>, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>)}
* or
* [UIExtensionContext.startAbilityByType]{@link @ohos.app.ability.UIExtensionContentSession:UIExtensionContentSession.startAbilityByType(type: string, wantParam: Record<string, Object>, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>)}
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
export type AbilityStartCallback = _AbilityStartCallback;
/**
* The context of vpn extension. It allows access to
* vpnExtension-specific resources.
* The class of auto startup info.
*
* @typedef { _VpnExtensionContext.default }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
export type VpnExtensionContext = _VpnExtensionContext.default;
/**
* Defines the context environment for the
* [EmbeddableUIAbility]{@link @ohos.app.ability.EmbeddableUIAbility:EmbeddableUIAbility}. It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
export type EmbeddableUIAbilityContext = _EmbeddableUIAbilityContext.default;
/**
* The context of an photo editor extension ability.
*
* @typedef { _PhotoEditorExtensionContext.default }
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @stagemodelonly
* @since 12
*/
export type PhotoEditorExtensionContext = _PhotoEditorExtensionContext.default;
/**
* Defines the capability for data communication with the UIServiceExtensionAbility. UIServiceExtensionAbility is a
* special type of ExtensionAbility provided by the system and is used to provide extended capabilities related to
* floating windows.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 14
*/
export type UIServiceProxy = _UIServiceProxy.default;
/**
* Defines the connection callback. It is used as an input parameter for connection to a UIServiceExtensionAbility, to
* provide the callback for the connection.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 14
*/
export type UIServiceExtensionConnectCallback = _UIServiceExtensionConnectCallback.default;
/**
* Defines the context environment for the
* [AppServiceExtensionAbility](docroot://reference/apis-ability-kit/js-apis-app-ability-appServiceExtensionAbility.md)
* . It inherits from Context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
export type AppServiceExtensionContext = _AppServiceExtensionContext.default;
/**
* The AgentCard information describes the basic information and capabilities provided by an Agent.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentCard = _AgentCard;
/**
* The Provider in an AgentCard refers to the organization or platform that issues and
* manages the agent's credentials.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentProvider = _AgentProvider;
/**
* Capabilities in an AgentCard represent the specific skills, services, and functions that
* an agent can perform or provide within the system.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentCapabilities = _AgentCapabilities;
/**
* Skills in an AgentCard represent the specific abilities, expertise, and proficiencies that an
* agent possesses for performing tasks or solving problems.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentSkill = _AgentSkill;
/**
* Application-related information for the agent.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentAppInfo = _AgentAppInfo;
/**
* The AgentHostProxy is a proxy object for the client connected to the Agent, through which it
* can communicate with the Agent's connection counterpart.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentHostProxy = _AgentHostProxy;
/**
* The context of the agent service ability.
*
* @typedef { _AgentExtensionContext }
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type AgentExtensionContext = _AgentExtensionContext;
}
export default common;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandler.d.ts.md
# @ohos.app.ability.CompletionHandler.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* **CompletionHandler** is an optional parameter of [StartOptions]{@link @ohos.app.ability.StartOptions:StartOptions}
* and [OpenLinkOptions]{@link @ohos.app.ability.OpenLinkOptions:OpenLinkOptions}. It is used to process the result of
* an application launch request.
*
* @file
* @kit AbilityKit
*/
import { ElementName } from './bundleManager/ElementName';
/**
* CompletionHandler provides two callback functions,
* [onRequestSuccess]{@link CompletionHandler.onRequestSuccess(elementName: ElementName, message: string)} and
* [onRequestFailure]{@link CompletionHandler.onRequestFailure(elementName: ElementName, message: string)}, to handle
* the results of successful and failed application launch requests, respectively.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare class CompletionHandler {
/**
* Called when the application is successfully launched.
*
* @param { ElementName } elementName - **ElementName** information used to identify the target application. Typically,
* **ElementName** includes only **abilityName** and **bundleName**. The presence of **moduleName** and **deviceId**
* depends on whether the caller provides them. **shortName** and **uri** are empty.
* @param { string } message - Message displayed when the application is successfully launched. This message is in JSON
* format, as follows:
*
* {
*
* ?"errMsg": "Succeeded."
*
* }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onRequestSuccess(elementName: ElementName, message: string): void;
/**
* Called when the application fails to be launched.
*
* @param { ElementName } elementName - **ElementName** information used to identify the target application.
*
* - Typically, **ElementName** includes only **abilityName** and **bundleName**. The presence of **moduleName** and
* **deviceId** depends on whether the caller provides them. **shortName** and **uri** are empty.
*
* - **ElementName** information cannot be obtained if the implicit startup fails.
* @param { string } message - Message displayed when the application fails to be launched. This message is in JSON format,
* as follows:
*
* {
*
* ?"errMsg": "xxx"
*
* }
*
* The value of *xxx* is described as follows:
*
* Failed to call <api-name>: An error occurs when calling the API. <api-name> is the specific API name, for example,
* **startAbility**.
*
* User refused redirection: The user has closed the application redirection dialog box.
*
* User closed the implicit startup picker: The user has closed the dialog box for selecting an application for
* implicit startup.
*
* User closed the app clone picker: The user has closed the dialog box for selecting a cloned application.
*
* Free installation failed: The free installation fails.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onRequestFailure(elementName: ElementName, message: string): void;
}
export default CompletionHandler;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts.md
# @ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* **CompletionHandlerForAbilityStartCallback** is an optional parameter of
* [AbilityStartCallback]{@link ./application/AbilityStartCallback}. It provides callback results for launching ability
* components of specific types through the vertical panel.
*
* @file
* @kit AbilityKit
*/
/**
* Defines the callback for successful ability launches.
*
* @param { string } name - Name of the launched ability or system operation.
*
* The ability component name is in the format of '[bundleName]#[moduleName]#[abilityName]'.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
export type OnRequestSuccessFn = (name: string) => void;
/**
* Defines the callback for failed ability launches.
*
* @param { string } name - Name of the launched ability or system operation.
* The ability component name is in the format of '[bundleName]#[moduleName]#[abilityName]'. If the user cancels the
* launch automatically, this parameter is empty.
* @param { AbilityStartFailureCode } failureCode - Error code of the failure cause.
* @param { string } failureMessage - Description of the failure cause.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
export type OnRequestFailureFn = (name: string, failureCode: AbilityStartFailureCode, failureMessage: string) => void;
/**
* CompletionHandlerForAbilityStartCallback provides two callback functions, **onRequestSuccess** and
* **onRequestFailure**, which are invoked when launching the specified ability succeeds or fails, respectively.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
export class CompletionHandlerForAbilityStartCallback {
/**
* Callback invoked when the specified ability is successfully launched.
*
* This API can be used in atomic services since API version 21.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
onRequestSuccess?: OnRequestSuccessFn;
/**
* Callback invoked when launching the specified ability fails.
*
* This API can be used in atomic services since API version 21.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
onRequestFailure?: OnRequestFailureFn;
}
/**
* Enumerates the specific error codes for ability launch failures.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
export enum AbilityStartFailureCode {
/**
* The ability cannot be launched due to a system error (for example, a crash in starting the picker).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
FAILURE_CODE_SYSTEM_MALFUNCTION = 0,
/**
* The user canceled the operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
FAILURE_CODE_USER_CANCEL = 1
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts.md
# @ohos.app.ability.CompletionHandlerForAtomicService.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* **CompletionHandlerForAtomicService** is an optional parameter of
* [AtomicServiceOptions]{@link @ohos.app.ability.AtomicServiceOptions:AtomicServiceOptions} and is used to handle the
* result of an atomic service launch request.
*
* @file
* @kit AbilityKit
*/
/**
* Enumerates the errors codes available for failures in launching an atomic service.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare enum FailureCode {
/**
* The atomic service cannot be launched due to a system error (for example, a crash in the transition dialog box).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
FAILURE_CODE_SYSTEM_MALFUNCTION = 0,
/**
* The user canceled the operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
FAILURE_CODE_USER_CANCEL = 1,
/**
* The user refused the operation.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
FAILURE_CODE_USER_REFUSE = 2
}
/**
* CompletionHandlerForAtomicService provides two callback functions,
* [onAtomicServiceRequestSuccess]{@link CompletionHandlerForAtomicService#onAtomicServiceRequestSuccess(appId: string)}
* and
* [onAtomicServiceRequestFailure]{@link CompletionHandlerForAtomicService#onAtomicServiceRequestFailure(appId: string, failureCode: FailureCode, failureMessage: string)}
* , to handle the results of successful and failed atomic service launch requests, respectively.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare class CompletionHandlerForAtomicService {
/**
* Called when the atomic service is successfully launched.
*
* @param { string } appId - appId of the target atomic service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onAtomicServiceRequestSuccess(appId: string): void;
/**
* Called when the atomic service fails to be launched.
*
* @param { string } appId - appId of the target atomic service.
* @param { FailureCode } failureCode - Error code of the failure cause.
* @param { string } failureMessage - Description of the failure cause.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
onAtomicServiceRequestFailure(appId: string, failureCode: FailureCode, failureMessage: string): void;
}
export { FailureCode };
export default CompletionHandlerForAtomicService;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Configuration.d.ts.md
# @ohos.app.ability.Configuration.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant';
/**
* The module defines the environment variables for the application runtime, including language, dark/light color mode,
* screen orientation, and font size. You can subscribe to these environment variables to adapt to different user
* preferences and enhance the interaction experience.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export interface Configuration {
/**
* Current language of the application, for example, **zh** (Chinese) or **en** (English).
*
* You can
* [set the application language](../../application-models/subscribe-system-environment-variable-changes.md#setting-application-language)
* .
*
* For details about the value range, see
* [getSystemLanguages](../apis-localization-kit/js-apis-i18n.md#getsystemlanguages9).
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
language?: string;
/**
* Dark/Light color mode of the application. The light color mode is used by default.
*
* You can
* [set the dark/light color mode for an application or a component](../../application-models/subscribe-system-environment-variable-changes.md#setting-darklight-color-mode)
* .
*
* The options are as follows:
*
* - **COLOR_MODE_NOT_SET**: The color mode is not set.
* - **COLOR_MODE_LIGHT**: light mode.
* - **COLOR_MODE_DARK**: dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
colorMode?: ConfigurationConstant.ColorMode;
/**
* Screen orientation of the application.
*
* The options are as follows:
*
* - **DIRECTION_NOT_SET**: The screen orientation is not set.
* - **DIRECTION_HORIZONTAL**: horizontal direction.
* - **DIRECTION_VERTICAL**: vertical direction.
*
* You can subscribe to changes to this environment variable in the [UIAbility](./js-apis-app-ability-uiAbility.md)
* and [UIExtensionAbility](./js-apis-app-ability-uiExtensionAbility.md), but not in the
* [ApplicationContext](./js-apis-inner-application-applicationContext.md) or
* [AbilityStage](./js-apis-app-ability-abilityStage.md).
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
direction?: ConfigurationConstant.Direction;
/**
* Screen density.
*
* The options are as follows:
*
* - **SCREEN_DENSITY_NOT_SET**: The pixel density is not set.
* - **SCREEN_DENSITY_SDPI**: 120.
* - **SCREEN_DENSITY_MDPI**: 160.
* - **SCREEN_DENSITY_LDPI**: 240.
* - **SCREEN_DENSITY_XLDPI**: 320.
* - **SCREEN_DENSITY_XXLDPI**: 480.
* - **SCREEN_DENSITY_XXXLDPI**: 640.
*
* The font size is positively correlated with the screen pixel density. By monitoring changes in the screen pixel
* density, you can detect adjustments in the font size. Typically, for the same physical size, the higher the screen
* pixel density, the larger the font display effect.
*
* You can subscribe to changes to this environment variable in the [UIAbility](./js-apis-app-ability-uiAbility.md)
* and [UIExtensionAbility](./js-apis-app-ability-uiExtensionAbility.md), but not in the
* [ApplicationContext](./js-apis-inner-application-applicationContext.md) or
* [AbilityStage](./js-apis-app-ability-abilityStage.md).
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
screenDensity?: ConfigurationConstant.ScreenDensity;
/**
* ID of the display where the application is located.
*
* You can subscribe to changes to this environment variable in the [UIAbility](./js-apis-app-ability-uiAbility.md)
* and [UIExtensionAbility](./js-apis-app-ability-uiExtensionAbility.md), but not in the
* [ApplicationContext](./js-apis-inner-application-applicationContext.md) or
* [AbilityStage](./js-apis-app-ability-abilityStage.md).
*
* @type { ?number } [since 9 - 10]
* @type { ?number } [since 11]
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
displayId?: number;
/**
* Whether a pointer device, such as a keyboard, mouse, or touchpad, is connected. **true** if connected, **false**
* otherwise.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
hasPointerDevice?: boolean;
/**
* Unique ID of the font.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 14
*/
fontId?: string;
/**
* Font size scale ratio. The value is a non-negative number. The default value is **1**.
*
* You can
* [set the font size for an application](../../application-models/subscribe-system-environment-variable-changes.md#setting-font-size)
* .
*
* @type { ?number } [since 12 - 17]
* @type { ?number } [since 18]
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice
* @since 12
*/
fontSizeScale?: number;
/**
* Font weight scale ratio. The value is a non-negative number. The default value is **1**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 12
*/
fontWeightScale?: number;
/**
* Mobile country code.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
mcc?: string;
/**
* Mobile network code.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
mnc?: string;
/**
* Locale.
*
* The application automatically adjusts its behavior based on the current locale to meet the localization
* requirements of users. This property can be set by configuring the system language, system region, and
* application preferred language.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 20
*/
locale?: Intl.Locale;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ConfigurationConstant.d.ts.md
# @ohos.app.ability.ConfigurationConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The ConfigurationConstant module provides preset enumerated values related to
* [Configuration]{@link @ohos.app.ability.Configuration:Configuration} operations.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
declare namespace ConfigurationConstant {
/**
* Enumerates the dark/light color modes, which are used in the
* [Configuration.colorMode]{@link @ohos.app.ability.Configuration:Configuration} field. You can use these predefined
* enumerated values to set or obtain the dark/light color mode of the system or application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export enum ColorMode {
/**
* Unspecified color mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
COLOR_MODE_NOT_SET = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
COLOR_MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
COLOR_MODE_LIGHT = 1
}
/**
* Enumerates the screen directions, which are used in the
* [Configuration.direction]{@link @ohos.app.ability.Configuration:Configuration} field. You can use these predefined
* enumerated values to set or obtain the screen direction of the system or application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export enum Direction {
/**
* Unspecified direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
DIRECTION_NOT_SET = -1,
/**
* Vertical direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
DIRECTION_VERTICAL = 0,
/**
* Horizontal direction.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
DIRECTION_HORIZONTAL = 1
}
/**
* Enumerates the pixel densities of the screen, which are used in the
* [Configuration.screenDensity]{@link @ohos.app.ability.Configuration:Configuration} field. You can use these
* predefined enumerated values to set or obtain the pixel density of the screen.
*
* The font size is positively correlated with the screen pixel density. By monitoring changes in the screen pixel
* density, you can detect adjustments in the font size. Typically, for the same physical size, the higher the screen
* pixel density, the larger the font display effect.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
export enum ScreenDensity {
/**
* The screen pixel density is not set.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_NOT_SET = 0,
/**
* The pixel density of the screen is 'SDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_SDPI = 120,
/**
* The pixel density of the screen is 'MDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_MDPI = 160,
/**
* The pixel density of the screen is 'LDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_LDPI = 240,
/**
* The pixel density of the screen is 'XLDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_XLDPI = 320,
/**
* The pixel density of the screen is 'XXLDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_XXLDPI = 480,
/**
* The pixel density of the screen is 'XXXLDPI'.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
SCREEN_DENSITY_XXXLDPI = 640
}
}
export default ConfigurationConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.contextConstant.d.ts.md
# @ohos.app.ability.contextConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The ContextConstant module defines context-related enums, including the file encryption partition level and process
* mode of the UIAbility after it is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
declare namespace contextConstant {
/**
* Enumerates the file encryption levels, which are used to ensure data security for applications across different
* scenarios. You can select the appropriate encryption level based on the application requirements to protect user
* data.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export enum AreaMode {
/**
* Device-level encryption. Directories with this encryption level are accessible after the device is powered on.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
EL1 = 0,
/**
* User-level encryption. Directories with this encryption level are accessible only after the device is powered on
* and the password is entered (for the first time).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
EL2 = 1,
/**
* User-level encryption. The file permissions vary according to their scenarios.
*
* - An open file is always readable and writable regardless of whether the screen is locked.
* - When the screen is locked, a closed file cannot be opened, read, or written. When the screen is unlocked, such
* a file can be opened, read, and written.
* - When the screen is locked, a file can be created and then opened and written but not read. When the screen is
* unlocked, a file can be created and then opened, read, and written.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
EL3 = 2,
/**
* User-level encryption. The file permissions vary according to their scenarios.
*
* - When the screen is locked, an open file is not readable or writable. When the screen is unlocked, such a file
* is readable and writable.
* - When the screen is locked, a closed file cannot be opened, read, or written. When the screen is unlocked, such
* a file can be opened, read, and written.
* - When the screen is locked, a file cannot be created. When the screen is unlocked, a file can be created and
* then opened, read, and written.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
EL4 = 3,
/**
* Application-level encryption. The file permissions vary according to their scenarios.
*
* - An open file is always readable and writable regardless of whether the screen is locked.
*
* When the screen is locked, a closed file can be opened, read, and written only if the reserved key is obtained by
* calling [Access](js-apis-screenLockFileManager.md#screenlockfilemanageracquireaccess). When the screen is
* unlocked, such a file can be opened, read, and written.
*
* A file can be created and then opened, read, and written regardless of whether the screen is locked.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
EL5 = 4
}
/**
* Enumerates the process modes of the UIAbility after it is started.
* As a property of [StartOptions]{@link @ohos.app.ability.StartOptions:StartOptions}, **ProcessMode** takes effect
* only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext.startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>)}
* and is used to specify the process mode of the target UIAbility.
* This value takes effect only on 2-in-1 devices and tablets. If it is used on other devices, error code 801 is
* returned.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export enum ProcessMode {
/**
* A new process is created, the UIAbility is started on the process, and the process exits along with the parent
* process.
*
* **Constraints**:
*
* In this mode, the target UIAbility and caller must be in the same application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
NEW_PROCESS_ATTACH_TO_PARENT = 1,
/**
* A new process is created, the UIAbility is started on the process, and the process is bound to the status bar
* icon.
*
* **Constraints**:
*
* In this mode, the target UIAbility and caller must be in the same application, and the application must have an
* icon in the status bar.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
NEW_PROCESS_ATTACH_TO_STATUS_BAR_ITEM = 2,
/**
* The UIAbility is started, and the process of the UIAbility is bound to the status bar icon.
*
* **Constraints**:
*
* In this mode, the target UIAbility and caller must be in the same application, and the application must have an
* icon in the status bar.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
ATTACH_TO_STATUS_BAR_ITEM = 3
}
/**
* Enumerates the visibility statuses of the UIAbility after it is started.
* If the target UIAbility is set to invisible, the window of the target UIAbility is not displayed in the foreground,
* there is no icon in the dock, and the **onForeground** lifecycle of the target UIAbility is not triggered.
* As a property of [StartOptions]{@link @ohos.app.ability.StartOptions:StartOptions}, **StartupVisibility** takes
* effect only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext.startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>)}
* and specifies the visibility of the target UIAbility after it is started.
* This value takes effect only on 2-in-1 devices and tablets. If it is used on other devices, error code 801 is
* returned.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export enum StartupVisibility {
/**
* The target UIAbility is hidden after it is started in the new process. The **onForeground** lifecycle of the
* UIAbility is not invoked.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
STARTUP_HIDE = 0,
/**
* The target UIAbility is displayed normally after it is started in the new process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
STARTUP_SHOW = 1
}
/**
* Enumerates the scenarios where the [onNewWant]{@link @ohos.app.ability.UIAbility:UIAbility#onNewWant} lifecycle
* callback is not triggered. It is used in the
* [setOnNewWantSkipScenarios]{@link ./application/UIAbilityContext:UIAbilityContext.setOnNewWantSkipScenarios} API.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export enum Scenarios {
/**
* <!--RP1-->A scenario where the system API [missionManager.moveMissionToFront](./js-apis-app-ability-missionManager-sys.md#missionmanagermovemissiontofront-2) is called to move the UIAbility to the foreground.<!--RP1End-->
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
SCENARIO_MOVE_MISSION_TO_FRONT = 0x00000001,
/**
* A scenario where the [showAbility]{@link ./application/UIAbilityContext:UIAbilityContext.showAbility} API is called
* to move the UIAbility to the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
SCENARIO_SHOW_ABILITY = 0x00000002,
/**
* A scenario where the
* [backToCallerAbilityWithResult]{@link ./application/UIAbilityContext:UIAbilityContext.backToCallerAbilityWithResult}
* API is called to move the UIAbility to the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
SCENARIO_BACK_TO_CALLER_ABILITY_WITH_RESULT = 0x00000004
}
/**
* Context type
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export enum ContextType {
/**
* Application context type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
APPLICATION_CONTEXT = 0,
/**
* Ability stage context type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
ABILITY_STAGE_CONTEXT = 1,
/**
* UI ability context type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
UIABILITY_CONTEXT = 2,
/**
* Form extension context type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
FORM_EXTENSION_CONTEXT = 3,
/**
* App service extension context type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
APP_SERVICE_EXTENSION_CONTEXT = 4
}
}
export default contextConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.continueManager.d.ts.md
# @ohos.app.ability.continueManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
import Context from './application/Context';
/**
* The continueManager module provides capabilities for managing cross-device application migration. For example, it
* allows you to obtain the result of quickly launching the target application during the cross-device migration
* process.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
declare namespace continueManager {
/**
* Registers a callback to obtain the quick start result when an application is launched quickly. This API uses an
* asynchronous callback to return the result.
*
* @param { 'prepareContinue' } type - The value is fixed at **prepareContinue**.
* @param { Context } context - Context of the ability.
* @param { AsyncCallback<ContinueResultInfo> } callback - Callback used to return the result. If obtaining the quick start
* result is successful, **err** is undefined, and **ContinueResultInfo** is the obtained quick startup result.
* Otherwise, **err** is an error object.
* @throws { BusinessError } 16300501 - the system ability work abnormally.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
function on(type: 'prepareContinue', context: Context, callback: AsyncCallback<ContinueResultInfo>): void;
/**
* Unregisters the callback used to obtain the quick start result when an application is launched quickly. This API
* uses an asynchronous callback to return the result.
*
* @param { 'prepareContinue' } type - The value is fixed at **prepareContinue**.
* @param { Context } context - Context of the ability.
* @param { AsyncCallback<ContinueResultInfo> } callback - Callback used to return the result. If the callback is
* unregistered, **err** is undefined, and **ContinueResultInfo** is the callback unregistration result. Otherwise,
* **err** is an error object.
* @throws { BusinessError } 16300501 - the system ability work abnormally.
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
function off(type: 'prepareContinue', context: Context, callback?: AsyncCallback<ContinueResultInfo>): void;
/**
* Describes the quick start result returned by the callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
interface ContinueResultInfo {
/**
* Status code of the operation result.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
resultState: ContinueStateCode;
/**
* Description of the operation result.
*
* This API can be used only in the stage model.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
resultInfo?: string;
}
/**
* Enumerates the status codes of the quick start result.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
enum ContinueStateCode {
/**
* Operation succeeded.
*
* This API can be used only in the stage model.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
SUCCESS = 0,
/**
* Operation failed.
*
* This API can be used only in the stage model.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Mission
* @stagemodelonly
* @since 18
*/
SYSTEM_ERROR = 1
}
}
export default continueManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.dataUriUtils.d.ts.md
# @ohos.app.ability.dataUriUtils.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The DataUriUtils module provides APIs to process URI objects. You can use the APIs to attach an ID to the end of a
* given URI and obtain, delete, or update the ID attached to the end of a given URI.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
declare namespace dataUriUtils {
/**
* Obtains the ID attached to the end of a given URI.
*
* @param { string } uri - Target URI object.
* @returns { number } ID obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function getId(uri: string): number;
/**
* Attaches an ID to the end of a given URI.
*
* @param { string } uri - Target URI object.
* @param { number } id - ID to be attached.
* @returns { string } URI object with the ID attached.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function attachId(uri: string, id: number): string;
/**
* Deletes the ID from the end of a given URI.
*
* @param { string } uri - URI object from which the ID is to be deleted.
* @returns { string } URI object with the ID deleted.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function deleteId(uri: string): string;
/**
* Updates the ID in a given URI.
*
* @param { string } uri - Target URI object.
* @param { number } id - New ID.
* @returns { string } URI object with the new ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function updateId(uri: string, id: number): string;
}
export default dataUriUtils;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.dialogRequest.d.ts.md
# @ohos.app.ability.dialogRequest.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import Want from './@ohos.app.ability.Want';
/**
* The dialogRequest module provides APIs related to modal dialog box processing, including obtaining the request
* information (used to bind a modal dialog box) and request callback (used to set the request result).
*
* A modal dialog box is a system-level dialog box that blocks interactions such as mouse clicks, keyboard input, and
* touch events on the underlying page. The page can only be interacted with after the modal dialog box is closed.
*
* > **NOTE**
* >
* > - The APIs provided by this module are used in ServiceExtensionAbilities. For a ServiceExtensionAbility that
* > implements modal dialog boxes, you can use the APIs to obtain the request information and request callback and
* > return the request result.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
declare namespace dialogRequest {
/**
* Defines the location attributes of a modal dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
export interface WindowRect {
/**
* X-coordinate of the upper left corner of the dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
left: number;
/**
* Y-coordinate of the upper left corner of the dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
top: number;
/**
* Width of the dialog box, in px.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
width: number;
/**
* Height of the dialog box, in px.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
height: number;
}
/**
* Defines the request information, which is used as an input parameter for binding the modal dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
export interface RequestInfo {
/**
* Location attributes of a modal dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
windowRect?: WindowRect;
}
/**
* Enumerates the result codes of the request for the modal dialog box.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
export enum ResultCode {
/**
* The request succeeds.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
RESULT_OK = 0,
/**
* The request fails.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
RESULT_CANCEL = 1
}
/**
* Defines the result of the request for the modal dialog box. It contains **ResultCode** and **ResultWant**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
export interface RequestResult {
/**
* Result code of the request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
result: ResultCode;
/**
* Want information, such as the ability name and bundle name.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
want?: Want;
}
/**
* Provides a callback for setting the modal dialog box request result.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 9
*/
export interface RequestCallback {
/**
* Sets the result of the request for the modal dialog box.
*
* @param { RequestResult } result - Request result to set.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
setRequestResult(result: RequestResult): void;
}
/**
* > **NOTE**
* >
* > This API can be used by a ServiceExtensionAbility. If the ServiceExtensionAbility implements modal dialog boxes,
* > the request information can be obtained from Want. If this API is used in other scenarios, no return value is
* > obtained.
*
* Obtains the request information from Want.
*
* @param { Want } want - Want passed in the request for a modal dialog box.
* @returns { RequestInfo } RequestInfo object obtained, which is used to bind a modal dialog box.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function getRequestInfo(want: Want): RequestInfo;
/**
* Obtains the request callback from Want.
*
* > **NOTE**
* >
* > This API can be used by a ServiceExtensionAbility. If the ServiceExtensionAbility implements modal dialog boxes,
* > the request callback can be obtained from Want. If this API is used in other scenarios, no return value is
* > obtained.
*
* @param { Want } want - Want passed in the request for a modal dialog box.
* @returns { RequestCallback } RequestCallback object obtained, which is used to set the return result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
function getRequestCallback(want: Want): RequestCallback;
}
export default dialogRequest;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.DriverExtensionAbility.d.ts.md
# @ohos.app.ability.DriverExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit DriverDevelopmentKit
*/
import type rpc from './@ohos.rpc';
import type Want from './@ohos.app.ability.Want';
import _DriverExtensionContext from './application/DriverExtensionContext';
/**
* Define a DriverExtensionContext for store context.
*
* @typedef { _DriverExtensionContext }
* @syscap SystemCapability.Driver.ExternalDevice
* @since 10
*/
export type DriverExtensionContext = _DriverExtensionContext;
/**
* The **DriverExtensionAbility** module provides the ExtensionAbility related to drivers. It provides lifecycle
* callbacks to be invoked when a driver is created, destroyed, connected, or disconnected.
*
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
declare class DriverExtensionAbility {
/**
* Context of the **DriverExtension**. This context is inherited from **ExtensionContext**.
*
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
context: DriverExtensionContext;
/**
* Called when a DriverExtensionAbility is created to initialize the service logic.
*
* @param { Want } want - Want information related to this DriverExtensionAbility, including the ability name and bundle
* name.
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
onInit(want: Want): void;
/**
* Called when this DriverExtensionAbility is destroyed to clear resources.
*
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
onRelease(): void;
/**
* Called following **onCreate()** when a DriverExtensionAbility is started by calling **connectAbility()**. A
* **RemoteObject** object is returned for communication between the server and client.
*
* @param { Want } want - Want information related to this DriverExtensionAbility, including the ability name and
* bundle name.
* @returns { rpc.RemoteObject | Promise<rpc.RemoteObject> } **RemoteObject** object used for communication between
* the server and client, or promise used to return the value.
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
onConnect(want: Want): rpc.RemoteObject | Promise<rpc.RemoteObject>;
/**
* Called when a client is disconnected from this DriverExtensionAbility.
*
* @param { Want } want - Want information related to this DriverExtensionAbility, including the ability name and
* bundle name.
* @returns { void | Promise<void> } Empty value, or promise used to return the value.
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
onDisconnect(want: Want): void | Promise<void>;
/**
* Dumps client information. It is recommended that developers don't DUMP sensitive information.
*
* @param { Array<string> } params - Parameters in the form of a command.
* @returns { Array<string> } String array used to dump client information.
* @syscap SystemCapability.Driver.ExternalDevice
* @StageModelOnly
* @since 10
*/
onDump(params: Array<string>): Array<string>;
}
/**
* class of driver extension ability.
* @syscap SystemCapability.Driver.ExternalDevice
* @stagemodelonly
* @since 10
*/
export default DriverExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EmbeddableUIAbility.d.ts.md
# @ohos.app.ability.EmbeddableUIAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIAbility from './@ohos.app.ability.UIAbility';
import type EmbeddableUIAbilityContext from './application/EmbeddableUIAbilityContext';
/**
* EmbeddableUIAbility is an embeddable UIAbility component provided for atomic services. It inherits from
* [UIAbility]{@link @ohos.app.ability.UIAbility}.
* You can implement EmbeddableUIAbility to enable atomic services to be launched by other applications either as a
* standalone window or embedded within the host application's UI.
* For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
export default class EmbeddableUIAbility extends UIAbility {
/**
* Context of the EmbeddableUIAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
context: EmbeddableUIAbilityContext;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts.md
# @ohos.app.ability.EmbeddedUIExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
/**
* EmbeddedUIExtensionAbility is a component that enables cross-process UI embedding. It inherits from
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility}.
* You can implement this class to add cross-process UI embedding capabilities to your applications. A typical use case
* is embedding a UI, provided by the application's own EmbeddedUIExtensionAbility, into a
* [UIAbility]{@link @ohos.app.ability.UIAbility} page using an
* [EmbeddedComponent]{@link @internal/component/ets/embedded_component}.
* For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
* This API can be properly called on PCs/2-in-1 devices and tablets. It is unavailable on other devices.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
export default class EmbeddedUIExtensionAbility extends UIExtensionAbility {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.EnvironmentCallback.d.ts.md
# @ohos.app.ability.EnvironmentCallback.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import { Configuration } from './@ohos.app.ability.Configuration';
/**
* The EnvironmentCallback module provides capabilities to listen for system environment changes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
export default class EnvironmentCallback {
/**
* Called when the system configuration changes, after
* [a listener has been registered for such events]{@link ./application/ApplicationContext:ApplicationContext#on(type: 'environment', callback: EnvironmentCallback)}
* .
*
* @param { Configuration } config - Configuration object after the change.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
onConfigurationUpdated(config: Configuration): void;
/**
* Called when the system memory level changes, after
* [a listener has been registered for such events]{@link ./application/ApplicationContext:ApplicationContext#on(type: 'environment', callback: EnvironmentCallback)}
* .
*
* @param { AbilityConstant.MemoryLevel } level - Memory level, indicating the available memory of the entire device.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
onMemoryLevel(level: AbilityConstant.MemoryLevel): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.errorManager.d.ts.md
# @ohos.app.ability.errorManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
import * as _ErrorObserver from './application/ErrorObserver';
import { LoopObserver as _LoopObserver } from './application/LoopObserver';
/**
* The ErrorManager module provides capabilities for registering and unregistering error observers, which are primarily
* used to listen for errors such as JavaScript crashes and application freezes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice [since 11]
* @since 9
*/
declare namespace errorManager {
/**
* Registers an error observer. Once registered, it can capture JavaScript crashes occurring within the application,
* which are a type of application crash. When the observer captures such an exception, the application will not exit
* automatically. You are advised to add a synchronous exit operation after the callback function completes.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'error' } type - Event type. It is fixed at **'error'**.
* @param { ErrorObserver } observer - Error observer instance.
* @returns { number } Unique index of the observer, which corresponds one-to-one with the observer. This value can be
* used as the **observerId** parameter in the **errorManager.off** function.
* There is no specific unit.
* the returned result is observerId.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice [since 11]
* @since 9
*/
function on(type: 'error', observer: ErrorObserver): number;
/**
* Unregisters an error observer. This API uses an asynchronous callback to return the result.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'error' } type - Event type. It is fixed at **'error'**.
* @param { number } observerId - Index of the observer returned by **on()**.
* There is no specific unit.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice [since 11]
* @since 9
*/
function off(type: 'error', observerId: number, callback: AsyncCallback<void>): void;
/**
* Unregisters an error observer. This API uses a promise to return the result.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'error' } type - Event type. It is fixed at **'error'**.
* @param { number } observerId - Index of the observer returned by **on()**.
* There is no specific unit.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice [since 11]
* @since 9
*/
function off(type: 'error', observerId: number): Promise<void>;
/**
* Registers an observer for the message processing duration of the main thread. After the registration, the execution
* time of a message processed by the main thread of the application can be captured.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'loopObserver' } type - Event type. It is fixed at **'loopObserver'**, indicating an observer for the
* message processing duration of the main thread.
* @param { number } timeout - Event execution threshold, in milliseconds.
* The value must be greater than **0**.The unit is milliseconds(ms).
* @param { LoopObserver } observer - Observer to register.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
function on(type: 'loopObserver', timeout: number, observer: LoopObserver): void;
/**
* Unregisters an observer for the message processing duration of the main thread.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'loopObserver' } type - Event type. It is fixed at **'loopObserver'**, indicating an observer for the
* message processing duration of the main thread.
* @param { LoopObserver } observer - Observer to unregister.
* @throws { BusinessError } 401 Parameter error. Possible causes:
* 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types;
* 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
function off(type: 'loopObserver', observer?: LoopObserver): void;
/**
* Registers an observer for the promise rejection. After the registration, a rejected promise that is not captured in
* the current thread of the application can be captured.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'unhandledRejection' } type - Event type. It is fixed at **'unhandledRejection'**, indicating an observer
* for the promise rejection.
* @param { UnhandledRejectionObserver } observer - Observer to register.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
function on(type: 'unhandledRejection', observer: UnhandledRejectionObserver): void;
/**
* Unregisters an observer for the promise rejection.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* @param { 'unhandledRejection' } type - Event type. It is fixed at **'unhandledRejection'**, indicating an observer
* for the promise rejection.
* @param { UnhandledRejectionObserver } [observer] - Observer to unregister. You are advised to use this parameter.
* If omitted, all observers registered with the same environment through **on** are unregistered by default.
* Otherwise, the specified observer is unregistered.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @throws { BusinessError } 16300004 - If the observer does not exist
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
function off(type: 'unhandledRejection', observer?: UnhandledRejectionObserver): void;
/**
* Defines the ErrorObserver module.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice [since 11]
* @since 9
*/
export type ErrorObserver = _ErrorObserver.default;
/**
* Defines the LoopObserver module. It can be used as a parameter of **errormanager.on** to listen for and handle main
* thread timeout events in the current application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
export type LoopObserver = _LoopObserver;
/**
* Defines an observer to capture the cause of a rejected promise.
*
* @param { Error | any } reason - Generally, the value is of the **Error** type, indicating the reason for rejection.
* @param { Promise<any> } promise - Rejected promise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @crossplatform [since 19]
* @atomicservice
* @since 12
*/
export type UnhandledRejectionObserver = (reason: Error | any, promise: Promise<any>) => void;
/**
* Registers a rejected promise observer with any thread in the process. Once registered, it can capture a rejected
* promise that is not captured in the current thread of the application.
*
* @param { 'globalUnhandledRejectionDetected'} type - Event type. It is fixed at
* **'globalUnhandledRejectionDetected'**, indicating an observer for the promise rejection.
* @param { GlobalObserver } observer - Observer to register.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function on(type: 'globalUnhandledRejectionDetected', observer: GlobalObserver): void;
/**
* Unregisters a rejected promise observer. After the deregistration, promise exceptions in the process cannot be
* listened for.
*
* If the observer passed in is not in the observer queue registered via the **on** API, error code 16300004 is
* thrown. Therefore, you are advised to handle this using **try-catch** logic.
*
* @param { 'globalUnhandledRejectionDetected'} type - Event type. It is fixed at
* **'globalUnhandledRejectionDetected'**, indicating an observer for the promise rejection.
* @param { GlobalObserver } observer - Observer registered by the **on** API. You are advised to use this parameter.
* If omitted, all observers registered with the same environment through **on** are unregistered by default.
* Otherwise, the specified observer is unregistered.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @throws { BusinessError } 16300004 - If the observer does not exist
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function off(type: 'globalUnhandledRejectionDetected', observer?: GlobalObserver): void;
/**
* Defines an exception observer that can be used as an input parameter for
* [errorManager.on('globalErrorOccurred')]{@link errorManager.on(type: 'globalErrorOccurred', observer: GlobalObserver)}
* and
* [errorManager.on('globalUnhandledRejectionDetected')]{@link errorManager.on(type: 'globalUnhandledRejectionDetected', observer: GlobalObserver)}
* to monitor event processing on the main thread of the current application.
*
* @param { 'GlobalError'} reason - Object related to the exception event name, message, error stack information,
* exception thread name, and exception thread type.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
export type GlobalObserver = (reason: GlobalError) => void;
/**
* Registers an observer for the main thread freeze event of the application. If the observer is registered multiple
* times, only the last one takes effect.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* > **NOTE**
* >
* > If the callback function runs for more than 1 second, the
* > [AppRecovery]{@link @ohos.app.ability.appRecovery:appRecovery} feature may not work. The execution duration can
* > be calculated by parsing the time difference between **begin** and **Freeze callback execution completed** in
* > HiLogs. If the execution duration exceeds 1 second, you can optimize the callback logic by using methods such as
* > asynchronous processing, reducing operations that block other tasks, and optimizing the data structures to reduce
* > the execution duration.
*
* @param { 'freeze' } type - Event type. It is fixed at **'freeze'**, indicating an observer for the freeze event of
* the main thread.
* @param { FreezeObserver } observer - Observer to register.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function on(type: 'freeze', observer: FreezeObserver): void;
/**
* Registers a global error observer via the **errorManager.on** API within any thread of a process. Once registered,
* it can capture exceptions occurring in any thread across the entire process. When the observer captures such an
* exception, the application will not exit automatically. You are advised to add a synchronous exit operation after
* the callback function completes.
*
* @param { 'globalErrorOccurred'} type - Event type. It is fixed at **'globalErrorOccurred'**.
* @param { GlobalObserver } observer - Customized callback function for exception handling.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function on(type: 'globalErrorOccurred', observer: GlobalObserver): void;
/**
* Enumerates the VM instance types.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @atomicservice
* @since 18
*/
export enum InstanceType {
/**
* TaskPool VM instance.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @atomicservice
* @since 18
*/
TASKPOOL = 2,
/**
* Worker VM instance.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @atomicservice
* @since 18
*/
WORKER = 1,
/**
* Main VM instance.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @atomicservice
* @since 18
*/
MAIN = 0,
/**
* VM instance created from the local code using
* [napi_create_ark_runtime](docroot://reference/native-lib/napi.md#napi_create_ark_runtime).
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @atomicservice
* @since 18
*/
CUSTOM = 3
}
/**
* Define the resource types of the application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
export enum ResourceType {
/**
* Indicates that it is an pss resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
PSS_MEMORY = 1,
/**
* Indicates that it is a ion resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
ION_MEMORY = 2,
/**
* Indicates that it is a ashmem resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
ASHMEM_MEMORY = 3,
/**
* Indicates that it is an GPU resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
GPU_MEMORY = 4,
/**
* Indicates that it is an FD resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
FD = 5,
/**
* Indicates that it is a thread resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 24
*/
THREAD = 6
}
/**
* Describes the object related to the exception event name, message, error stack information, exception thread name,
* and exception thread type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
export interface GlobalError extends Error {
/**
* Name of a VM instance.
*
* **NOTE**
*
* Rules for the **instanceName** field in exceptions in the TaskPool thread:
*
* - **globalErrorOccurred** events: identified as "TaskPool Thread + method name".
* - **globalUnhandledRejectionDetected** events: identified as "TaskPool Thread + task name".
* - If identified as "TaskPool Thread" only, the exception occurs within an asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
instanceName: string;
/**
* Type of the VM instance.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
instanceType: InstanceType;
}
/**
* Unregisters an observer for the main thread freeze event of the application.
*
* This API can only be used in the main thread. If a thread error occurs, an error code is thrown. You are advised to
* handle it with try-catch logic.
*
* If the observer passed in does not match the observer registered via the **on** API, error code 16300004 is thrown.
* Therefore, you are advised to handle this using **try-catch** logic.
*
* @param { 'freeze' } type - Event type. It is fixed at **'freeze'**, indicating an observer for the freeze event of
* the main thread.
* @param { FreezeObserver } observer - Observer to unregister. You are advised to use this parameter. If omitted, all
* observers registered with the same environment through **on** are unregistered by default. Otherwise, the
* specified observer is unregistered.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16300004 - If the observer does not exist
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function off(type: 'freeze', observer?: FreezeObserver): void;
/**
* Unregisters a global error observer. Once unregistered, global listening cannot be implemented.
*
* If the observer passed in is not in the observer queue registered via the **on** API, error code 16300004 is
* thrown. Therefore, you are advised to handle this using **try-catch** logic.
*
* @param { 'globalErrorOccurred'} type - Event type. It is fixed at **'globalErrorOccurred'**.
* @param { GlobalObserver } observer - Observer registered by the **on** API. You are advised to use this parameter.
* If omitted, all observers registered with the same environment through **on** are unregistered by default.
* Otherwise, the specified observer is unregistered.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - If the caller is invalid.
* @throws { BusinessError } 16300004 - If the observer does not exist
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
function off(type: 'globalErrorOccurred', observer?: GlobalObserver): void;
/**
* Returns the previously registered handler when a JavaScript crash exception occurs. It can only be used in the main
* thread.
*
* If an invalid parameter is passed or the API is called from a child thread, an error code is thrown and
* **undefined** is returned. You are advised to handle it with try-catch logic.
*
* If the API parameter is empty, subsequently registered handlers are not able to establish a connection with
* previously registered handlers, thereby breaking the chain call mechanism.
*
* @param { ErrorHandler } [defaultHandler] - Newly registered error handler. The default value is empty.
* @returns { ErrorHandler } Previously registered error handler.
* @throws { BusinessError } 16000205 - The API is not called on the main thread.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 21
*/
function setDefaultErrorHandler(defaultHandler?: ErrorHandler): ErrorHandler;
/**
* Set the default resource usage observer. You can use it to implement chain calls.
* If an empty observer is set for a certain module, it will cause the call chain to be interrupted.
* This API must be called on the main thread.
*
* @param { ResourceUsageObserver } [defaultObserver] - The default resource usage observer.
* @returns { ResourceUsageObserver } Returns the original default resource usage observer.
* @throws { BusinessError } 16000205 - The API is not called on the main thread.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
function setDefaultResourceUsageObserver(defaultObserver?: ResourceUsageObserver): ResourceUsageObserver;
/**
* Set the default freeze observer, This function will be executed right after the callback function registered
* through errorManager.on is executed. You can use it to implement chain calls instead of errorManager.on.
* If an empty observer is set for a certain module, it will cause the call chain to be interrupted.
* This API must be called in the main thread.
*
* @param { FreezeObserver } [defaultObserver] - The default freeze observer.
* @returns { FreezeObserver } - Returns the original default freeze observer.
* @throws { BusinessError } 16000205 - The API is not called on the main thread.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
function setDefaultFreezeObserver(defaultObserver?: FreezeObserver): FreezeObserver;
/**
* The ErrorHandler will be called when the ArkTS runtime throws an exception that is not caught by the user.
*
* @param { Error } errObject - Event name, message, and error stack of the exception.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 21
*/
export type ErrorHandler = (errObject: Error) => void;
/**
* Defines an observer for the main thread freeze event of the application. It is used by the application to customize
* freeze information.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice
* @since 18
*/
export type FreezeObserver = () => void;
/**
* The observer will be called by the system when resource usage exceed threshold.
*
* @param { ResourceType } resourceType - The type of resource.
* @param { number } resourceSize - The amount of resources occupied.
* The value must be greater than **0**.
* <br>Unit: KB.
* @param { Record<string, number> } [detailInfo] - Key-value pair of the resource type and its size.
* <br>This parameter is available only when resourceType is set to PSS_MEMORY.
* If resourceType is set to other types or default values, this parameter is left blank.
* The key is the lowercase memory type, and the value is the resource size of the corresponding subdivision item.
* The keys of subdivision items include arkts, native, ion, gpu, ashmem, and other.
* The second value must be greater than * * 0 * *, in KB.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
export type ResourceUsageObserver = (resourceType: ResourceType, resourceSize: number, detailInfo?: Record<string, number>) => void;
}
export default errorManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ExtensionAbility.d.ts.md
# @ohos.app.ability.ExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import Ability from './@ohos.app.ability.Ability';
/**
* ExtensionAbility is the base class for scenario-specific ExtensionAbilities. It inherits from
* [Ability]{@link @ohos.app.ability.Ability:Ability}, with no property or method added. You cannot directly inherit
* from ExtensionAbility. For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
export default class ExtensionAbility extends Ability {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.FenceExtensionAbility.d.ts.md
# @ohos.app.ability.FenceExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit LocationKit
*/
import type FenceExtensionContext from './@ohos.app.ability.FenceExtensionContext';
import geoLocationManager from './@ohos.geoLocationManager';
/**
* Class of fence extension ability.
*
* @syscap SystemCapability.Location.Location.Geofence
* @stagemodelonly
* @since 14
*/
export default class FenceExtensionAbility {
/**
* Indicates the fence extension context.
*
* @type { FenceExtensionContext }
* @syscap SystemCapability.Location.Location.Geofence
* @stagemodelonly
* @since 14
*/
context: FenceExtensionContext;
/**
* Called back when geofence status is change.
*
* @param { geoLocationManager.GeofenceTransition } transition - Geofence transition status
* @param { Record<string, string> } additions - Indicates additional information
* @syscap SystemCapability.Location.Location.Geofence
* @stagemodelonly
* @since 14
*/
onFenceStatusChange(transition: geoLocationManager.GeofenceTransition, additions: Record<string, string>): void;
/**
* Called back before a fence extension is destroyed.
*
* @syscap SystemCapability.Location.Location.Geofence
* @stagemodelonly
* @since 14
*/
onDestroy(): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.FenceExtensionContext.d.ts.md
# @ohos.app.ability.FenceExtensionContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit LocationKit
*/
import ExtensionContext from './application/ExtensionContext';
/**
* class of static subscriber extension context.
*
* @extends ExtensionContext
* @syscap SystemCapability.Location.Location.Geofence
* @stagemodelonly
* @since 14
*/
export default class FenceExtensionContext extends ExtensionContext {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.hyperSnapManager.d.ts.md
# @ohos.app.ability.hyperSnapManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* This module provides the capability to manage HyperSnap.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 24
*/
declare namespace hyperSnapManager {
/**
* Enables or disables the Hyper Snap performance optimization for the application.
*
* When enabled, the system will create a snapshot of the application process at an appropriate time.
* Subsequent launched resume directly from this snapshot, bypassing the full cold start sequence,
* resulting in significantly improved application launch performance.
*
* **Notes:**
* - The system ultimately determines whether to create or use snapshots based on
* application compatibility, resource availability, and system policies. Enabling this feature only
* indicates the application's readiness for optimization.
* - Hyper Snap is enabled by default for applications meeting system compatibility requirements.
* - If issues arise after enabling Hyper Snap, disable this feature to revert
* to standard cold start processes.
* - Settings persist across reboots.
*
* @param { boolean } enableFlag - Indicates the desired optimization state:
* - `true`: Indicates the application's compatibility with Hyper Snap optimization (system may
* apply when appropriate)
* - `false`: Disables Hyper Snap; uses standard cold-start process.
* @throws { BusinessError } 16000150 - Failed to send request to system service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 24
*/
function setHyperSnapEnabled(enableFlag: boolean): void;
/**
* Requests the recreation of the Hyper Snap process snapshot for the application.
*
* When compatibility issues arise with an existing snapshot, this method triggers destruction of the current
* snapshot process. The system will subsequently generate a new snapshot at an optimal time to resolve
* compatibility problems while maintaining launch performance benefits.
*
* **Notes:**
* - The system ultimately determines whether and when to recreate the snapshot. Invoking this method only submits
* a request; actual snapshot recreation depends on system policies and resource availability.
* - Recreation occurs during optimal system idle periods to minimize performance impact.
* - Primarily for resolving specific compatibility issues identified after initial snapshot creation.
* Most applications don't require manual intervention for snapshot management.
*
* @throws { BusinessError } 16000150 - Failed to send request to system service.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 24
*/
function requestRebuildHyperSnap(): void;
}
export default hyperSnapManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.insightIntent.d.ts.md
# @ohos.app.ability.insightIntent.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* This module provides basic definitions of the
* [InsightIntent framework](docroot://application-models/insight-intent-overview.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
declare namespace insightIntent {
/**
* Enumerates the intent execution modes. It specifies the mode of execution passed when the intent is triggered by a
* system entry point. The supported execution modes for each intent are defined during intent development.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
enum ExecuteMode {
/**
* Display a UIAbility in the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
UI_ABILITY_FOREGROUND = 0,
/**
* Start a UIAbility in the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
UI_ABILITY_BACKGROUND = 1,
/**
* Start a UIExtensionAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
UI_EXTENSION_ABILITY = 2
}
/**
* Enumerates the return results of intent execution.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
interface ExecuteResult {
/**
* Error code returned by the intent execution, defined by the developer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
code: number;
/**
* Result data returned by the intent execution, typically containing information to be passed back to the system
* entry point.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
result?: Record<string, Object>;
/**
* List of URIs returned by the intent execution. This field must be used together with the **flags** field to grant
* the corresponding permissions for the URI list to the system entry point.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
uris?: Array<string>;
/**
* Permissions to be granted to the system entry point for the URI list returned by the intent execution.
*
* **NOTE**
*
* This parameter supports only FLAG_AUTH_READ_URI_PERMISSION, FLAG_AUTH_WRITE_URI_PERMISSION, and
* FLAG_AUTH_READ_URI_PERMISSION|FLAG_AUTH_WRITE_URI_PERMISSION. For details about the permissions, see
* [Flags]{@link @ohos.app.ability.wantConstant:wantConstant.Flags}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 18
*/
flags?: number;
}
/**
* Defines the struct of an intent entity. It represents key information objects involved during intent execution,
* including intent parameters and execution results.
*
* You can define intent entities by inheriting this class. The child class must be decorated with
* [@InsightIntentEntity](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintententity)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
interface IntentEntity {
/**
* ID of the intent entity.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
entityId: string;
}
/**
* Enum for query entity mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 26.0.0
*/
enum QueryType {
/**
* Query all entities.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 26.0.0
*/
ALL = 'all',
/**
* Query entities by property.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
BY_PROPERTY = 'byProperty'
}
/**
* Parameter for query entity.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @atomicservice
* @since 26.0.0
*/
interface QueryEntityParam {
/**
* The query type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
queryType: QueryType;
/**
* Indicates the parameters when querying entities by property.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
parameters?: Record<string, Object>;
}
/**
* Define AppIntentEntity.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
abstract class AppIntentEntity<T> implements IntentEntity {
/**
* Called when query entity execute.
*
* @param { QueryEntityParam } params - The params of query entity.
* @returns { Promise<Array<T>> } - Returns an array of subclasses of the AppIntentEntity class, support promise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
abstract onQueryEntity(params: QueryEntityParam): Promise<Array<T>>;
/**
* The display name of entity.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
displayName: string;
}
/**
* Defines the return result of intent execution. The
* [generic type](docroot://quick-start/introduction-to-arkts.md#generic-class-and-interface) is supported.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
interface IntentResult<T> {
/**
* Error code returned by the intent execution, defined by the developer.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
code: number;
/**
* Result data returned by the intent execution, typically containing information to be passed
* back to the system entry point.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
result?: T;
}
/**
* Enumerates the modes that define how the execution result of an intent is returned to the intent initiator.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
enum ReturnMode {
/**
* The intent execution result is returned through the
* [onExecuteInUIAbilityForegroundMode]{@link @ohos.app.ability.InsightIntentExecutor:InsightIntentExecutor#onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage)}
* or
* [onExecuteInUIExtensionAbility]{@link @ohos.app.ability.InsightIntentExecutor:InsightIntentExecutor#onExecuteInUIExtensionAbility(name: string, param: Record<string, Object>, pageLoader: UIExtensionContentSession)}
* API in the [intent execution base class]{@link @ohos.app.ability.InsightIntentExecutor:InsightIntentExecutor}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
CALLBACK = 0,
/**
* The intent execution result is returned after the
* [sendExecuteResult]{@link @ohos.app.ability.insightIntentProvider:insightIntentProvider.sendExecuteResult} or
* [sendIntentResult]{@link @ohos.app.ability.insightIntentProvider:insightIntentProvider.sendIntentResult} API in
* [intent provider management]{@link @ohos.app.ability.insightIntentProvider:insightIntentProvider} is called.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
FUNCTION = 1
}
}
export default insightIntent;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentContext.d.ts.md
# @ohos.app.ability.InsightIntentContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type { AsyncCallback } from './@ohos.base';
import type insightIntent from './@ohos.app.ability.insightIntent';
import type Want from './@ohos.app.ability.Want';
/**
* The module provides the context for intent execution. It is used as a property in both the
* [intent execution base class]{@link @ohos.app.ability.InsightIntentExecutor:InsightIntentExecutor} and
* [base class decorated with @InsightIntentEntry]{@link @ohos.app.ability.InsightIntentEntryExecutor:InsightIntentEntryExecutor}
* , offering essential capabilities for intent implementation, for example, starting
* [UIAbility components]{@link @ohos.app.ability.UIAbility} within the same application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
declare class InsightIntentContext {
/**
* Unique ID of an intent instance. Its execution result can be returned through
* [insightIntentProvider.sendExecuteResult]
* {@link @ohos.app.ability.insightIntentProvider:insightIntentProvider.sendExecuteResult} and
* [insightIntentProvider.sendIntentResult]
* {@link @ohos.app.ability.insightIntentProvider:insightIntentProvider.sendIntentResult}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
instanceId: number;
/**
* Starts a UIAbility. This API can only be used to start UIAbility components within the same application. This API
* uses an asynchronous callback to return the result.
*
* @param { Want } want - Want information for starting the UIAbility.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
startAbility(want: Want, callback: AsyncCallback<void>): void;
/**
* Starts a UIAbility. This API can only be used to start UIAbility components within the same application. This API
* uses a promise to return the result.
*
* @param { Want } want - Want information for starting the UIAbility.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
startAbility(want: Want): Promise<void>;
/**
* Sets the return mode of the intent execution result. This API is applicable to intents with the execution mode set
* to [UI_ABILITY_FOREGROUND]{@link @ohos.app.ability.insightIntent:insightIntent.ExecuteMode}.
*
* @param { insightIntent.ReturnMode } returnMode - Return mode of the intent execution result.
* @throws { BusinessError } 16000011 - The context does not exist. Possible causes: 1.The context is
* not insightIntentContext; 2.The context is not for UIAbility foreground insight intent execute mode.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
setReturnModeForUIAbilityForeground(returnMode: insightIntent.ReturnMode): void;
/**
* Sets the return mode of the intent execution result. This API is applicable to intents with the execution mode set
* to [UI_EXTENSION_ABILITY]{@link @ohos.app.ability.insightIntent:insightIntent.ExecuteMode}.
*
* @param { insightIntent.ReturnMode } returnMode - Return mode of the intent execution result.
* @throws { BusinessError } 16000011 - The context does not exist. Possible causes: 1.The context is not
* insightIntentContext; 2.The context is not for UIExtensionAbility insight intent execute mode.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
setReturnModeForUIExtensionAbility(returnMode: insightIntent.ReturnMode): void;
}
export default InsightIntentContext;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentDecorator.d.ts.md
# @ohos.app.ability.InsightIntentDecorator.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The InsightIntentDecorator module provides several types of intent decorators for decorating classes or methods. You
* can [use these decorators to develop intents](docroot://application-models/insight-intent-decorator-development.md),
* define application functionalities as intents, and integrate them into AI entry points such as intelligent Q&A,
* intelligent search, and intelligent recommendation systems.
*
* -
* [@InsightIntentLink](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentlink)
* : decorates a URI in your application as an intent, enabling AI systems to quickly jump to your application via this
* intent. For details on the parameters supported by this decorator, see
* [LinkIntentDecoratorInfo]{@link LinkIntentDecoratorInfo}.
* -
* [@InsightIntentPage](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentpage)
* : decorates a page in your application as an intent, enabling AI systems to swiftly navigate to that page. For
* details on the parameters supported by this decorator, see [PageIntentDecoratorInfo]{@link PageIntentDecoratorInfo}.
* -
* [@InsightIntentFunction](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentfunction)
* and
* [@InsightIntentFunctionMethod](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentfunctionmethod)
* : The two decorators must be used together.
* [@InsightIntentFunction](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentfunction)
* is used to decorate a class, and
* [@InsightIntentFunctionMethod](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentfunctionmethod)
* is used to decorate a static function in that class. This setup defines the static function as an intent, enabling
* AI systems to execute it rapidly.
* -
* [@InsightIntentEntry](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintententry)
* : decorates a class that inherits from
* [InsightIntentEntryExecutor]{@link @ohos.app.ability.InsightIntentEntryExecutor:InsightIntentEntryExecutor} to
* implement intent operations and configure the ability on which the intent depends. This helps the AI entry point to
* easily invoke the associated ability and perform the intended action. For details on the parameters supported by this
* decorator, see [EntryIntentDecoratorInfo]{@link EntryIntentDecoratorInfo}.
* -
* [@InsightIntentForm](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentform)
* : decorates a [FormExtensionAbility]{@link @ohos.app.form.FormExtensionAbility} to specify the name of the widget
* bound to the FormExtensionAbility. This enables the AI entry point to add the widget via intent calls. For details on
* the parameters supported by this decorator, see [FormIntentDecoratorInfo]{@link FormIntentDecoratorInfo}.
* -
* [@InsightIntentEntity](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintententity)
* : decorates a class that inherits from
* [IntentEntity]{@link @ohos.app.ability.insightIntent:insightIntent.IntentEntity} to define the class as an intent
* entity, which can pass parameters required for intent calls. For details on the parameters supported by this
* decorator, see [IntentEntityDecoratorInfo]{@link IntentEntityDecoratorInfo}.
*
* @file
* @kit AbilityKit
*/
import insightIntent from './@ohos.app.ability.insightIntent';
/**
* Common properties for intent decorators, used to define basic information about an intent (including the intent name
* and version number). It applies to all decorators provided by this module.
*
* > **NOTE**
* >
* > If a matching intent is found in the standard intent list based on the **schema** and **intentVersion** fields, the
* > system automatically populates the **intentName**, **domain**, **llmDescription**, **keywords**, **parameters**,
* > and **result** fields with the values from the matching standard intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface IntentDecoratorInfo {
/**
* Intent name, which is the unique identifier of an intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
intentName: string;
/**
* Vertical domain of the intent. It is used to categorize intents by vertical fields (for example, video, music, and
* games). For details about the value range, see the vertical domain fields in
* [smart distribution features in different vertical domains](https://developer.huawei.com/consumer/en/doc/service/intents-ai-distribution-characteristic-0000001901922213#section2656133582215)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
domain: string;
/**
* Version number of the intent. It is used to distinguish and manage intents when their capabilities evolve.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
intentVersion: string;
/**
* Name of the intent displayed to users.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
displayName: string;
/**
* Description of the intent displayed to users.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
displayDescription?: string;
/**
* Name of a standard intent schema. This field is required when you
* [access a standard intent](docroot://application-models/insight-intent-definition.md#accessing-standard-intents).
* It is not required when you
* [create a custom intent](docroot://application-models/insight-intent-definition.md#creating-custom-intents). For
* details about the standard intent list, see
* [Appendix: Standard Intent Access Specifications](docroot://application-models/insight-intent-access-specifications.md)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
schema?: string;
/**
* Icon of the intent. It is displayed in the AI entry point.
*
* - If the value is a string, the icon is read from a network resource.
* - If the value is a [resource](../../reference/apis-localization-kit/js-apis-resource-manager.md), the icon is read
* from a local resource.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
icon?: ResourceStr;
/**
* Function of an intent, which helps large language models understand the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
llmDescription?: string;
/**
* Search keywords for the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
keywords?: string[];
/**
* Data format of intent parameters, which is used to define the input data format during intent calls.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
parameters?: Record<string, Object>;
/**
* Data format for the results returned by intent calls. It defines how the data should be structured.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
result?: Record<string, Object>;
}
/**
* LinkIntentDecoratorInfo inherits from [IntentDecoratorInfo]{@link IntentDecoratorInfo} and describes the parameters
* supported by the
* [@InsightIntentLink](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentlink)
* decorator, such as the URI information required for application redirection.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface LinkIntentDecoratorInfo extends IntentDecoratorInfo {
/**
* URI information associated with the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
uri: string;
/**
* Mapping between intent parameters and URI information.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
paramMappings?: LinkIntentParamMapping[];
}
/**
* Enumerates the intent parameter categories available for the
* [@InsightIntentLink](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentlink)
* decorator. The enum is used to define how intent parameters should be passed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare enum LinkParamCategory {
/**
* Category of link. Intent parameters are appended to the end of a URI link and passed to the application via the
* URI.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
LINK = 'link',
/**
* Category of want. Intent parameters are passed to the application through the **parameters** field in
* [Want]{@link @ohos.app.ability.Want:Want}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
WANT = 'want'
}
/**
* LinkIntentParamMapping defines the mapping between intent parameters and URI information for the
* [@InsightIntentLink](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentlink)
* decorator.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface LinkIntentParamMapping {
/**
* Name of the intent parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
paramName: string;
/**
* Mapping name of the intent parameter.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
paramMappingName?: string;
/**
* Category of the intent parameter.
*
* If an intent parameter is of the [LINK](#linkparamcategory) category, the system retrieves **paramMappingName**
* corresponding to **paramName** and appends it to the URI as a key-value pair (where **key** is the value of
* **paramMappingName**, and **value** is the intent parameter value).
*
* If an intent parameter is of the [WANT](#linkparamcategory) category, the system retrieves **paramMappingName**
* corresponding to **paramName** and passes the mapping name and value using the **parameters** field in
* [Want](./js-apis-app-ability-want.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
paramCategory?: LinkParamCategory;
}
/**
* Define InsightIntentLink.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentLink: ((intentInfo: LinkIntentDecoratorInfo) => ClassDecorator);
/**
* PageIntentDecoratorInfo inherits from [IntentDecoratorInfo]{@link IntentDecoratorInfo} and describes the parameters
* supported by the
* [@InsightIntentPage](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentpage)
* decorator, such as the name of
* [NavDestination](docroot://reference/apis-arkui/arkui-ts/ts-basic-components-navigation.md#navdestination10) of the
* target page.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface PageIntentDecoratorInfo extends IntentDecoratorInfo {
/**
* Name of the UIAbility bound to the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
uiAbility?: string;
/**
* Path of the page bound to the intent. The page must be a file that actually exists.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
pagePath: string;
/**
* ID of the [Navigation](docroot://reference/apis-arkui/arkui-ts/ts-basic-components-navigation.md#attributes)
* component bound to the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
navigationId?: string;
/**
* Name of the
* [NavDestination](docroot://reference/apis-arkui/arkui-ts/ts-basic-components-navigation.md#navdestination10)
* component bound to the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
navDestinationName?: string;
}
/**
* Decorates a page in the application as an intent, enabling AI systems to swiftly navigate to that page. For details
* on the parameters supported by this decorator, see [PageIntentDecoratorInfo]{@link PageIntentDecoratorInfo}.
*
* > **NOTE**
* >
* > This decorator is only applicable to struct pages.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentPage: ((intentInfo: PageIntentDecoratorInfo) => ClassDecorator);
/**
* Parameter type of the
* [@InsightIntentFunctionMethod](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentfunctionmethod)
* decorator. All properties inherit from [IntentDecoratorInfo]{@link IntentDecoratorInfo}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface FunctionIntentDecoratorInfo extends IntentDecoratorInfo {
}
/**
* This decorator must be used together with the [@InsightIntentFunction]{@link InsightIntentFunction} decorator.
* [@InsightIntentFunction]{@link InsightIntentFunction} is used to decorate a class, and this decorator is used to
* decorate a static function in that class. This setup defines the static function as an intent, enabling AI systems
* to execute it rapidly.
*
* > **NOTE**
* >
* > The class containing static methods must be exported using export.
* > Parameter names and types of a function must align with those specified in the intent definition.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentFunctionMethod: ((intentInfo: FunctionIntentDecoratorInfo) => MethodDecorator);
/**
* This decorator must be used together with the [@InsightIntentFunctionMethod]{@link InsightIntentFunctionMethod}
* decorator.
* This decorator is used to decorate a class, and [@InsightIntentFunctionMethod]{@link InsightIntentFunctionMethod} is
* used to decorate a static function in that class. This setup defines the static function as an intent, enabling AI
* systems to execute it rapidly.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentFunction: (() => ClassDecorator);
/**
* Inherits from [IntentDecoratorInfo]{@link IntentDecoratorInfo} and is used to describe the parameters supported by
* the
* [@InsightIntentEntry](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintententry)
* decorator.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface EntryIntentDecoratorInfo extends IntentDecoratorInfo {
/**
* Name of the ability bound to the intent.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
abilityName: string;
/**
* Execution mode of the intent call, that is, execution mode supported when the bound ability is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
executeMode: insightIntent.ExecuteMode[];
}
/**
* Decorates a class that inherits from
* [InsightIntentEntryExecutor]{@link @ohos.app.ability.InsightIntentEntryExecutor:InsightIntentEntryExecutor} to
* implement intent operations and configure the ability on which the intent depends. This helps the AI entry point to
* easily invoke the associated ability and perform the intended action. For details on the parameters supported by
* this decorator, see [EntryIntentDecoratorInfo]{@link EntryIntentDecoratorInfo}.
*
* > **NOTE: **
* >
* > If this decorator is used to access a standard intent, all mandatory parameters defined in the standard intent
* > JSON schema must be implemented and their parameter types must match.
* > If this decorator is used to access a custom intent, all mandatory parameters defined in parameters must be
* > implemented and their parameter types must match.
* > Classes decorated by this decorator must be exported using export default. Class properties are limited to basic
* > types or intent entities, and the return value must be intent entities.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentEntry: ((intentInfo: EntryIntentDecoratorInfo) => ClassDecorator);
/**
* Inherits from [IntentDecoratorInfo]{@link IntentDecoratorInfo} and is used to describe the parameters supported by
* the
* [@InsightIntentForm](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintentform)
* decorator.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface FormIntentDecoratorInfo extends IntentDecoratorInfo {
/**
* Name of the widget bound to the FormExtensionAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
formName: string;
}
/**
* Decorates a [FormExtensionAbility]{@link @ohos.app.form.FormExtensionAbility} to specify the name of the widget
* bound to the [FormExtensionAbility]{@link @ohos.app.form.FormExtensionAbility}. This enables the AI entry point to
* add the widget via intent calls. For details on the parameters supported by this decorator, see
* [FormIntentDecoratorInfo]{@link FormIntentDecoratorInfo}.
*
* > **NOTE: **
* > For details about the requirements for defining widget names, see Widget Configuration.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentForm: ((intentInfo: FormIntentDecoratorInfo) => ClassDecorator);
/**
* Describes the parameters supported by the
* [@InsightIntentEntity](docroot://reference/apis-ability-kit/js-apis-app-ability-InsightIntentDecorator.md#insightintententity)
* decorator.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare interface IntentEntityDecoratorInfo {
/**
* Category of the intent entity. Intents can be classified based on intent entity categories.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
entityCategory: string;
/**
* Data format of the intent entity.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
parameters?: Record<string, Object>;
/**
* Supported query properties.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
supportedQueryProperties?: string[];
}
/**
* Decorates a class that inherits from
* [IntentEntity]{@link @ohos.app.ability.insightIntent:insightIntent.IntentEntity} to define the class as an intent
* entity, which can pass parameters required for intent calls. For details on the parameters supported by this
* decorator, see [IntentEntityDecoratorInfo]{@link IntentEntityDecoratorInfo}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
export declare const InsightIntentEntity: ((intentEntityInfo: IntentEntityDecoratorInfo) => ClassDecorator);
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentEntryExecutor.d.ts.md
# @ohos.app.ability.InsightIntentEntryExecutor.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import window from './@ohos.window';
import insightIntent from './@ohos.app.ability.insightIntent';
import InsightIntentContext from './@ohos.app.ability.InsightIntentContext';
import UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
/**
* The class of insight intent entry executor.
*
* @class InsightIntentEntryExecutor<T>
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare class InsightIntentEntryExecutor<T> {
/**
* The insight intent execute mode.
*
* @type { insightIntent.ExecuteMode }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
executeMode: insightIntent.ExecuteMode;
/**
* The insight intent context.
*
* @type { InsightIntentContext }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
context: InsightIntentContext;
/**
* The window stage.
*
* @type { ?window.WindowStage }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
windowStage?: window.WindowStage;
/**
* The UIExtension content session.
*
* @type { ?UIExtensionContentSession }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
uiExtensionSession?: UIExtensionContentSession;
/**
* Called when insight intent execute.
*
* @returns { Promise<insightIntent.IntentResult<T>> } The result of insight intent execution, support promise.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onExecute(): Promise<insightIntent.IntentResult<T>>;
}
export default InsightIntentEntryExecutor;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.InsightIntentExecutor.d.ts.md
# @ohos.app.ability.InsightIntentExecutor.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type window from './@ohos.window';
import type insightIntent from './@ohos.app.ability.insightIntent';
import type InsightIntentContext from './@ohos.app.ability.InsightIntentContext';
import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
/**
* The module provides the base class for intent execution. You can use this module to interface with the
* [InsightIntent framework](docroot://application-models/insight-intent-overview.md) on the device side and implement
* intent service logic through [configuration files](docroot://application-models/insight-intent-config-development.md)
* .
* In addition to developing intents via configuration files, intents can also be developed using decorators. For API
* version 20 and later, you are advised to
* [develop intents using decorators](docroot://application-models/insight-intent-decorator-development.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
declare class InsightIntentExecutor {
/**
* Context for intent execution.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 11
*/
context: InsightIntentContext;
/**
* Called during the UIAbility lifecycle when the [UIAbility]{@link @ohos.app.ability.UIAbility} that the intent
* execution depends on is started in the foreground. Both synchronous calls and asynchronous calls using Promise are
* supported.
*
* - If the UIAbility is cold started, the UIAbility lifecycle callbacks are triggered in the following sequence
* during intent execution: [onCreate]{@link @ohos.app.ability.UIAbility:UIAbility#onCreate},
* [onWindowStageCreate]{@link @ohos.app.ability.UIAbility:UIAbility#onWindowStageCreate},
* onExecuteInUIAbilityForegroundMode, and [onForeground]{@link @ohos.app.ability.UIAbility:UIAbility#onForeground}.
* - If the UIAbility is hot started in the background, the UIAbility lifecycle callbacks are triggered in the
* following sequence during intent execution: [onNewWant]{@link @ohos.app.ability.UIAbility:UIAbility#onNewWant},
* onExecuteInUIAbilityForegroundMode, and [onForeground]{@link @ohos.app.ability.UIAbility:UIAbility#onForeground}.
* - If the UIAbility is hot started in the foreground, the UIAbility lifecycle callbacks are triggered in the
* following sequence during intent execution: onExecuteInUIAbilityForegroundMode.
*
* @param { string } name - Intent name.
* @param { Record<string, Object> } param - Intent parameter, which is the data passed from the system entry point to the
* application for this intent execution.
* @param { window.WindowStage } pageLoader - WindowStage instance, which is the same as the WindowStage instance in the
* [onWindowStageCreate]{@link @ohos.app.ability.UIAbility:UIAbility#onWindowStageCreate} API and can be used to load
* the page for intent execution.
* @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } Intent execution result or a Promise
* object containing the intent execution result, representing the data returned to the system entry point from this
* intent execution.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 11
*/
onExecuteInUIAbilityForegroundMode(name: string, param: Record<string, Object>, pageLoader: window.WindowStage): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>;
/**
* Called during the UIAbility lifecycle when the [UIAbility]{@link @ohos.app.ability.UIAbility} that the intent
* execution depends on is started in the background. Both synchronous calls and asynchronous calls using Promise are
* supported.
*
* - If the UIAbility is cold started, the UIAbility lifecycle callbacks are triggered in the following sequence
* during intent execution: [onCreate]{@link @ohos.app.ability.UIAbility:UIAbility#onCreate},
* onExecuteInUIAbilityBackgroundMode, and [onBackground]{@link @ohos.app.ability.UIAbility:UIAbility#onBackground}.
* - If the UIAbility is hot started, the UIAbility lifecycle callbacks are triggered in the following sequence during
* intent execution: onExecuteInUIAbilityBackgroundMode.
*
* @param { string } name - Intent name.
* @param { Record<string, Object> } param - Intent parameter, which is the data passed from the system entry point to the
* application for this intent execution.
* @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } Intent execution result or a Promise
* object containing the intent execution result, representing the data returned to the system entry point from this
* intent execution.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 11
*/
onExecuteInUIAbilityBackgroundMode(name: string, param: Record<string, Object>): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>;
/**
* Called during the UIExtensionAbility lifecycle when the
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility} that the intent execution
* depends on is started. Both synchronous calls and asynchronous calls using Promise are supported.
*
* - The UIExtensionAbility lifecycle callbacks are triggered in the following sequence during intent execution:
* [onCreate]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility#onCreate},
* [onSessionCreate]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility#onSessionCreate},
* onExecuteInUIExtensionAbility, and
* [onForeground]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility#onForeground}.
*
* @param { string } name - Intent name.
* @param { Record<string, Object> } param - Intent parameter, which is the data passed from the system entry point to the
* application for this intent execution.
* @param { UIExtensionContentSession } pageLoader - UIExtensionContentSession instance, which is the same as the
* UIExtensionContentSession instance in the
* [onSessionCreate]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility#onSessionCreate} API and can be used
* to load the page for intent execution.
* @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } Intent execution result or a Promise
* object containing the intent execution result, representing the data returned to the system entry point from this
* intent execution.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onExecuteInUIExtensionAbility(name: string, param: Record<string, Object>, pageLoader: UIExtensionContentSession): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>;
/**
* Called during the ServiceExtensionAbility lifecycle when the ServiceExtensionAbility that the intent execution
* depends on is started. Both synchronous calls and asynchronous calls using Promise are supported.
*
* - The ServiceExtensionAbility lifecycle callbacks are triggered in the following sequence during intent execution:
* **onCreate**, **onRequest**, and **onExecuteInServiceExtensionAbility**.
*
* @param { string } name - Intent name.
* @param { Record<string, Object> } param - Intent parameter, which is the data passed from the system entry point to the
* application for this intent execution.
* @returns { insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult> } Intent execution result or a Promise
* object containing the intent execution result, representing the data returned to the system entry point from this
* intent execution.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onExecuteInServiceExtensionAbility(name: string, param: Record<string, Object>): insightIntent.ExecuteResult | Promise<insightIntent.ExecuteResult>;
}
export default InsightIntentExecutor;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.insightIntentProvider.d.ts.md
# @ohos.app.ability.insightIntentProvider.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import type insightIntent from './@ohos.app.ability.insightIntent';
/**
* Insight intent Provider.
* @namespace insightIntentProvider
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
declare namespace insightIntentProvider {
/**
* Send execute result.
* @param { number } instanceId - The insight intent instance ID.
* It is from InsightIntentExecutor.context.instanceId.
* @param { insightIntent.ExecuteResult } result - The result of insight intent execution.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed;
* 2.Send restart message to system service failed; 3.System service failed to communicate with dependency module.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
function sendExecuteResult(instanceId: number, result: insightIntent.ExecuteResult): Promise<void>;
/**
* Send intent result.
* @param { number } instanceId - The insight intent instance ID.
* It is from InsightIntentEntryExecutor.context.instanceId.
* @param { insightIntent.IntentResult<T> } result - The result of insight intent execution.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed;
* 2.Send restart message to system service failed; 3.System service failed to communicate with dependency module.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 23
*/
function sendIntentResult(instanceId: number, result: insightIntent.IntentResult<T>): Promise<void>;
}
export default insightIntentProvider;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.kioskManager.d.ts.md
# @ohos.app.ability.kioskManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIAbilityContext from './application/UIAbilityContext';
import { KioskStatus as _KioskStatus } from './application/KioskStatus';
/**
* The KioskManager module provides APIs to manage kiosk mode, including entering/exiting kiosk mode and querying the
* kiosk mode status.
*
* Kiosk mode is a dedicated device lockdown mode that ensures the device UI serves only specific interaction scenarios.
* In this mode, device usage is confined to predetermined applications. A typical example is a bank ATM, where users
* can only interact with the ATM software and cannot exit it or access any other functions.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
declare namespace kioskManager {
/**
* Enters kiosk mode. This API uses a promise to return the result.
* This API can be properly called only on phones, PC/2-in-1 devices, and tablets. On other devices, it returns the
* error code 801.
*
* @param { UIAbilityContext } context - Context of the UIAbility that needs to enter kiosk mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000050 - Failed to connect to the system service.
* @throws { BusinessError } 16000110 - The current application is not in Kiosk app list and cannot enter Kiosk mode.
* @throws { BusinessError } 16000111 - The system is already in Kiosk mode and cannot enter Kiosk mode again.
* @throws { BusinessError } 16000113 - Current ability is not in foreground.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
function enterKioskMode(context: UIAbilityContext): Promise<void>;
/**
* Exits kiosk mode. This API uses a promise to return the result.
* This API takes effect only for applications that have entered kiosk mode.
* This API can be properly called only on phones, PC/2-in-1 devices, and tablets. On other devices, it returns the
* error code 801.
*
* @param { UIAbilityContext } context - Context of the UIAbility that needs to exit kiosk mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 16000050 - Failed to connect to the system service.
* @throws { BusinessError } 16000110 - The current application is not in Kiosk app list and cannot enter Kiosk mode.
* @throws { BusinessError } 16000112 - The current application is not in Kiosk mode and cannot exit Kiosk mode.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
function exitKioskMode(context: UIAbilityContext): Promise<void>;
/**
* Defines the kiosk status information, including whether the system is in kiosk mode and the information about the
* application in kiosk mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
export type KioskStatus = _KioskStatus;
}
export default kioskManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.OpenLinkOptions.d.ts.md
# @ohos.app.ability.OpenLinkOptions.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import CompletionHandler from './@ohos.app.ability.CompletionHandler';
/**
* **OpenLinkOptions** can be used as an input parameter of
* [openLink()]{@link ./application/UIAbilityContext:UIAbilityContext.openLink} to indicate whether to enable only App
* Linking and pass in optional parameters in the form of key-value pairs.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
export default interface OpenLinkOptions {
/**
* Whether the UIAbility must be started using <!--RP1-->
* [App Linking](docroot://application-models/app-linking-startup.md)<!--RP1End-->.
*
* - If this parameter is set to **true** and no UIAbility matches the URL in App Linking, the result is returned
* directly.
* - If this parameter is set to **false** and no UIAbility matches the URL in App Linking, App Linking falls back to
* [Deep Linking](docroot://application-models/deep-linking-startup.md). The default value is **false**.
*
* When the aa command is used to implicitly start an ability, you can set **--pb appLinkingOnly true** or
* **--pb appLinkingOnly false** to start the ability in App Linking mode.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
appLinkingOnly?: boolean;
/**
* List of parameters in Want.
*
* Note: For details about the usage rules, see **parameters** in [want]{@link @ohos.app.ability.Want:Want}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 12
*/
parameters?: Record<string, Object>;
/**
* Operation class used to handle the result of an application launch request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
completionHandler?: CompletionHandler;
/**
* Whether to display a "No app available" dialog box when a suitable application is not found using
* [Deep Linking](docroot://application-models/deep-linking-startup.md).
*
* - **true**: The "No app available" dialog box is not displayed.
* - **false**: The "No app available" dialog box is displayed. The default value is **false**.
*
* Note: If **appLinkingOnly** is set to **true**, the Deep Linking process is not triggered, and this field does not
* take effect.
*
* @default { false }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 21
*/
hideFailureTipDialog?: boolean;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts.md
# @ohos.app.ability.PhotoEditorExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
import PhotoEditorExtensionContext from './application/PhotoEditorExtensionContext';
import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
import type Want from './@ohos.app.ability.Want';
/**
* Class of the photo editor ExtensionAbility, which provides APIs for you to edit photos.
*
* @extends ExtensionAbility
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @StageModelOnly
* @since 12
*/
declare class PhotoEditorExtensionAbility extends ExtensionAbility {
/**
* Indicates configuration information about an Photo editor extension ability context.
*
* @type { PhotoEditorExtensionContext }
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @StageModelOnly
* @since 12
*/
context: PhotoEditorExtensionContext;
/**
* Called back when an UI extension is started for initialization.
*
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @StageModelOnly
* @since 12
*/
onCreate(): void;
/**
* Called back when the state of an UI extension changes to foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 12
*/
onForeground(): void;
/**
* Called back when the state of an UI extension changes to background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @StageModelOnly
* @since 12
*/
onBackground(): void;
/**
* Called back before an UI extension is destroyed.
*
* @returns { void | Promise<void> } the promise returned by the function.
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @StageModelOnly
* @since 12
*/
onDestroy(): void | Promise<void>;
/**
* Called back when an UI extension session is created and original image is ready.
*
* @param { string } uri - Indicates the uri info of the original image.
* @param { Want } want - Indicates the want info of the UI extension.
* @param { UIExtensionContentSession } session - Indicates the session of the UI extension page.
* @syscap SystemCapability.Ability.AppExtension.PhotoEditorExtension
* @StageModelOnly
* @since 12
*/
onStartContentEditing(uri: string, want: Want, session: UIExtensionContentSession): void;
}
export default PhotoEditorExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.PrintExtensionAbility.d.ts.md
# @ohos.app.ability.PrintExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit BasicServicesKit
*/
import type PrintExtensionContext from './application/PrintExtensionContext';
import type Want from './@ohos.app.ability.Want';
import type print from './@ohos.print';
/**
* class of print extensionAbility.
*
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
declare class PrintExtensionAbility {
/**
* Indicates print service extension ability context.
*
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 26.0.0
*/
context: PrintExtensionContext;
/**
* Called once to initialize the extensionAbility.
* @param { Want } want - call print page want params.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onCreate(want: Want): void;
/**
* Called once to start to discover the printers connected with the device.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onStartDiscoverPrinter(): void;
/**
* Called once to stop discovering the printer.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onStopDiscoverPrinter(): void;
/**
* Called once to connect to the specific printer.
* @param { number } printerId - connect the printerId.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onConnectPrinter(printerId: number): void;
/**
* Called once to disconnect to the specific printer.
* @param { number } printerId - connect the printerId.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onDisconnectPrinter(printerId: number): void;
/**
* Called once to start print job.
* @param { print.PrintJob } jobInfo - Indicates the information of print job.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 24
*/
public onStartPrintJob(jobInfo: print.PrintJob): void;
/**
* Called once to remove the print job has been started.
* @param { print.PrintJob } jobInfo - Indicates the information of print job.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 24
*/
public onCancelPrintJob(jobInfo: print.PrintJob): void;
/**
* Called once to request the printer's capabilities.
* @param { number } printerId - Indicates the information of printer.
* @returns { print.PrinterCapability } printer capability.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 24
*/
public onRequestPrinterCapability(printerId: number): print.PrinterCapability;
/**
* Called once to finalize the extensionAbility.
* @syscap SystemCapability.Print.PrintFramework
* @stagemodelonly
* @since 14
*/
onDestroy(): void;
}
export default PrintExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.scriptManager.d.ts.md
# @ohos.app.ability.scriptManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import Context from './application/Context';
/**
* Namespace for managing and organizing script information.
*
* @namespace scriptManager
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
declare namespace scriptManager {
/**
* arkTS script info.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
interface ArkTSScriptInfo {
/**
* Request code for identifying the current operation
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
readonly requestCode: string;
/**
* The context of the bound ability.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
readonly context: Context;
}
/**
* Result of arkTS script execution.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
interface ExecuteResult {
/**
* Indicates result code.
* The value range is all integers.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
code: number;
/**
* Indicates execute result.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
result?: Record<string, Object>;
/**
* Indicates the URIs will be authorized to the caller.
*
* @type { ?Array<string> }
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
uris?: Array<string>;
/**
* Indicates the URIs read and write permissions which consistent with {@link Want#flags},
* flags must be one of {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION},
* {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION},
* {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}|
* {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}.
* The value range is all integers.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
flags?: number;
}
/**
* complete arkTS script for in-app skills.
*
* @param { Context } context - Ability context, Used for temporary file authorization.
* @param { string } requestCode - Identifying the current operation. It is from ArkTSScriptInfo.requestCode.
* @param { ExecuteResult } result - The result of arkTS script execution.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 16000020 - The context is not ability context.
* @throws { BusinessError } 16000003 - The specified ID does not exist.
* @throws { BusinessError } 16000050 - Internal error. Possible causes: 1. Connect to system service failed;
* 2.Send restart message to system service failed;
* 3.System service failed to communicate with dependency module.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
function completeArkTSScriptInApp(context: Context, requestCode: string, result: ExecuteResult): Promise<void>;
}
export default scriptManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.ShareExtensionAbility.d.ts.md
# @ohos.app.ability.ShareExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
/**
* ShareExtensionAbility provides extended capabilities for integrating a share details page. It inherits from
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility}.
*
* By implementing ShareExtensionAbility, you can process content shared from other applications. For example, you could
* use ShareExtensionAbility to implement the text sharing feature. When a user initiates a share action in another
* application, your application will appear as an option in the system share panel. Upon selection, the system
* activates your application to process the content and display the share detail page.
*
* For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
export default class ShareExtensionAbility extends UIExtensionAbility {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.StartOptions.d.ts.md
# @ohos.app.ability.StartOptions.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import contextConstant from './@ohos.app.ability.contextConstant';
import image from './@ohos.multimedia.image';
import bundleManager from './@ohos.bundle.bundleManager';
import CompletionHandler from './@ohos.app.ability.CompletionHandler';
import window from './@ohos.window';
/**
* StartOptions can be used as an input parameter for APIs used to launch a UIAbility (for example,
* [startAbility()]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility(want: Want, options: StartOptions, callback: AsyncCallback<void>)}
* ). It specifies the options for starting the target UIAbility, including but not limited to the window mode and the
* display where the target UIAbility is started.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
declare class StartOptions {
/**
* Window mode for the UIAbility upon startup. For details, see
* [WindowMode]{@link ./@ohos.app.ability.AbilityConstant:AbilityConstant.WindowMode}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
windowMode?: number;
/**
* The type of split ratio preference.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 26.0.0
*/
splitRatio?: window.SplitRatioPreference;
/**
* Display ID, which is an integer greater than or equal to -1.
*
* - The value **-1** means the current screen.
* - The value **0** means the primary screen.
* - A positive integer means a specific screen with that ID.
*
* **NOTE**
*
* Starting from API version 14, the default value is **-1**, indicating the current screen.
*
* In versions earlier than API version 14, the default value is **0**, indicating the primary screen.
*
* @type { ?number } [since 9 - 10]
* @type { ?number } [since 11]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
displayId?: number;
/**
* Whether animation effects are used for the UIAbility upon startup. **true** if used, **false** otherwise.
*
* **Constraints**:
*
* 1. This property takes effect only on 2-in-1 devices and tablets.
* 2. The caller and target must be the same application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
withAnimation?: boolean;
/**
* Distance the window moves along the x-axis, with the top-left vertex of the screen specified by **displayId** as
* the starting point. The unit is px. A positive value means moving to the right, and a negative value means moving
* to the left. The value is an integer. Non-integer values will be rounded down. When the top-left vertex of the
* window exceeds the screen area of the specified **displayId**, the window is restricted to be visible only within
* the screen range of the specified **displayId**. When configuring this field, you are advised to configure
* **windowTop** at the same time.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
windowLeft?: number;
/**
* Distance the window moves along the y-axis, with the top-left vertex of the screen specified by **displayId** as
* the starting point. The unit is px. A positive value means moving downward, and a negative value means moving
* upward. The value is an integer. Non-integer values will be rounded down. When the top of the window exceeds the
* screen area of the specified **displayId**, the window is restricted to be visible only within the screen range of
* the specified **displayId**. When configuring this field, you are advised to also configure **windowLeft**.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
windowTop?: number;
/**
* Window width, in px.
*
* The value range is [**minWindowWidth**, **maxWindowWidth**], with the unit being vp. You can call
* [vp2px]{@link @ohos.arkui.UIContext:UIContext.vp2px} to convert it to the corresponding px value.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
windowWidth?: number;
/**
* Window height, in px.
*
* The value range is [**minWindowHeight**, **maxWindowHeight**], with the unit being vp. You can call
* [vp2px]{@link @ohos.arkui.UIContext:UIContext.vp2px} to convert it to the corresponding px value.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
windowHeight?: number;
/**
* Process mode of the UIAbility after it is started.
*
* **Constraints**:
*
* 1. This property takes effect only on 2-in-1 devices and tablets.
* 2. This property takes effect only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility}.
* 3. **processMode** and **startupVisibility** must be set in pair.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
processMode?: contextConstant.ProcessMode;
/**
* Visibility status of the UIAbility after it is started. If the target UIAbility is set to invisible, the window of
* the target UIAbility is not displayed in the foreground, there is no icon in the dock, and the **onForeground**
* lifecycle of the target UIAbility is not triggered.
*
* **Constraints**:
*
* 1. This property takes effect only on 2-in-1 devices and tablets.
* 2. This property takes effect only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility}.
* 3. **processMode** and **startupVisibility** must be set in pair.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
startupVisibility?: contextConstant.StartupVisibility;
/**
* Icon displayed on the starting window for the UIAbility of the current application upon startup. If this property
* is not set, the value of **startWindowIcon** in the **module.json5** file is used by default.
*
* **Constraints**:
*
* - This property does not take effect for the UIAbility of another application.
* - This property takes effect only on 2-in-1 devices and tablets.
* - This property takes effect only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility}.
* - The maximum size of an image used as the startup icon is 600 MB.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startWindowIcon?: image.PixelMap;
/**
* Background color of the window for the UIAbility of the current application upon startup. The value is in ARGB
* format, for example, **#E5FFFFFF**. If this property is not set, the value of **startWindowBackground** in the
* **module.json5** file is used by default.
*
* **Constraints**:
*
* - This property does not take effect for the UIAbility of another application.
* - This property takes effect only on 2-in-1 devices and tablets.
* - This property takes effect only in
* [UIAbilityContext.startAbility]{@link ./application/UIAbilityContext:UIAbilityContext#startAbility}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
startWindowBackgroundColor?: string;
/**
* Window mode supported by the UIAbility when it is started. The supported window mode specifies whether to display
* the maximize, minimize, or split-screen button. If this property is not set, the value of **supportWindowMode**
* configured under [abilities](docroot://quick-start/module-configuration-file.md#abilities) in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file corresponding to the UIAbility is used by
* default.
*
* - **FULL_SCREEN**: full-screen mode.
* - **FLOATING**: floating window mode.
* - **SPLIT**: split-screen mode. Generally, **FULL_SCREEN** or **FLOATING** must be used together. You are not
* advised to configure only **SPLIT**. If only **SPLIT** is configured, the window on 2-in-1 devices is in floating
* window mode by default and can transition to the split-screen mode, and the window on tablets is in full-screen
* mode by default and can transition to the split-screen mode.
*
* When **FULL_SCREEN** and **SPLIT** are both configured for a
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window), the window will be started in
* floating window mode if the value of
* [targetAPIVersion](docroot://quick-start/app-configuration-file.md#tags-in-the-configuration-file) is less than 15
* , and in full-screen mode if the value is greater than or equal to 15.
*
* **Constraints**:
*
* <!--RP1-->This property takes effect only on 2-in-1 devices and tablets.<!--RP1End-->
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 14
*/
supportWindowModes?: Array<bundleManager.SupportWindowMode>;
/**
* Maximum height of the window, in vp. You can call
* [getWindowLimitsVP]{@link @ohos.window.d.ts:window.getWindowLimitsVP} to obtain the size limit of the current
* window.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 17
*/
maxWindowHeight?: number;
/**
* Minimum width of the window, in vp. You can call
* [getWindowLimitsVP]{@link @ohos.window.d.ts:window.getWindowLimitsVP} to obtain the size limit of the current
* window.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 17
*/
minWindowWidth?: number;
/**
* Minimum height of the window, in vp. You can call
* [getWindowLimitsVP]{@link @ohos.window.d.ts:window.getWindowLimitsVP} to obtain the size limit of the current
* window.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 17
*/
minWindowHeight?: number;
/**
* Maximum width of the window, in vp. You can call
* [getWindowLimitsVP]{@link @ohos.window.d.ts:window.getWindowLimitsVP} to obtain the size limit of the current
* window.
*
* **Constraints**:
*
* This function takes effect only in the
* [freeform window](docroot://windowmanager/window-terminology.md#freeform-window) state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 17
*/
maxWindowWidth?: number;
/**
* Operation class used to handle the result of an application launch request.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 20
*/
completionHandler?: CompletionHandler;
/**
* Whether to hide the starting window for the UIAbility of the current application upon startup. The options include
* **true** (yes) and **false** (no). For details about the starting window and its specifications, see
* [StartWindow](docroot://quick-start/module-configuration-file.md#startwindow).
*
* **Constraints**:
*
* 1. This property takes effect only on tablets in free windows mode and 2-in-1 devices.
* 2. This property applies only for an attempt to launch the UIAbility of the current application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
hideStartWindow?: boolean;
/**
* Parameters for the window for the UIAbility upon startup.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 20
*/
windowCreateParams?: window.WindowCreateParams;
}
export default StartOptions;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.systemConfiguration.d.ts.md
# @ohos.app.ability.systemConfiguration.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain an copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import ConfigurationConstant from './@ohos.app.ability.ConfigurationConstant';
/**
* The class of a system configuration.
*
* @namespace systemConfiguration
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
declare namespace systemConfiguration {
/**
* Defines an OnColorModeUpdatedFn function.
*
* @typedef { function }
* @param { ConfigurationConstant.ColorMode } colorMode - Indicates the system's light or dark color mode
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnColorModeUpdatedFn = (colorMode: ConfigurationConstant.ColorMode) => void;
/**
* Defines an OnFontSizeScaleUpdatedFn function.
*
* @typedef { function }
* @param { number } fontSizeScale - Indicates the system's font size
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnFontSizeScaleUpdatedFn = (fontSizeScale: number) => void;
/**
* Defines an OnFontWeightScaleUpdatedFn function.
*
* @typedef { function }
* @param { number } fontWeightScale - Indicates the system's font weight
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnFontWeightScaleUpdatedFn = (fontWeightScale: number) => void;
/**
* Defines an OnMCCUpdatedFn function.
*
* @typedef { function }
* @param { string } mcc - Indicates the mobile country code
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnMCCUpdatedFn = (mcc: string) => void;
/**
* Defines an OnMNCUpdatedFn function.
*
* @typedef { function }
* @param { string } mnc - Indicates the mobile network code
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnMNCUpdatedFn = (mnc: string) => void;
/**
* Defines an OnLanguageUpdatedFn function.
*
* @typedef { function }
* @param { string } language - Indicates the system's language
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnLanguageUpdatedFn = (language: string) => void;
/**
* Defines an OnFontIdUpdatedFn function.
*
* @typedef { function }
* @param { string } fontId - Indicates the font type of the system
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnFontIdUpdatedFn = (fontId: string) => void;
/**
* Defines an OnHasPointerDeviceUpdatedFn function.
*
* @typedef { function }
* @param { boolean } hasPointerDevice - Indicates whether a pointing device is connected,
* such as a mouse, keyboard, or touchpad
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnHasPointerDeviceUpdatedFn = (hasPointerDevice: boolean) => void;
/**
* Defines an OnLocaleUpdatedFn function.
*
* @typedef { function }
* @param { string } locale - Indicates the locale settings. The application will automatically adjust
* its behavior based on the current locale to meet the user's localization requirements. This property
* can be configured by setting the system language, system region, and application language preferences
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
type OnLocaleUpdatedFn = (locale: string) => void;
/**
* System configuration updated callback.
*
* @typedef UpdatedCallback
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
interface UpdatedCallback {
/**
* Called when system's color mode is updated.
*
* @type { ?OnColorModeUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onColorModeUpdated?: OnColorModeUpdatedFn;
/**
* Called when system's font size is updated.
*
* @type { ?OnFontSizeScaleUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onFontSizeScaleUpdated?: OnFontSizeScaleUpdatedFn;
/**
* Called when system's font weight is updated.
*
* @type { ?OnFontWeightScaleUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onFontWeightScaleUpdated?: OnFontWeightScaleUpdatedFn;
/**
* Called when mobile country code is updated.
*
* @type { ?OnMCCUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onMCCUpdated?: OnMCCUpdatedFn;
/**
* Called when mobile network code is updated.
*
* @type { ?OnMNCUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onMNCUpdated?: OnMNCUpdatedFn;
/**
* Called when system's language is updated.
*
* @type { ?OnLanguageUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onLanguageUpdated?: OnLanguageUpdatedFn;
/**
* Called when system's font style is updated.
*
* @type { ?OnFontIdUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onFontIdUpdated?: OnFontIdUpdatedFn;
/**
* Called when a pointing device is connected, such as a mouse, keyboard, or touchpad.
*
* @type { ?OnHasPointerDeviceUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onHasPointerDeviceUpdated?: OnHasPointerDeviceUpdatedFn;
/**
* Called when locale info is updated.
*
* @type { ?OnLocaleUpdatedFn }
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onLocaleUpdated?: OnLocaleUpdatedFn;
}
}
export default systemConfiguration;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIAbility.d.ts.md
# @ohos.app.ability.UIAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* UIAbility is an application component that has the UI. It inherits from
* [Ability]{@link ./@ohos.app.ability.Ability:Ability} and provides
* [lifecycle](docroot://reference/apis-ability-kit/js-apis-app-ability-uiAbility.md#uiability-lifecycle-states)
* callbacks such as component creation, destruction, and foreground/background switching. It also provides the
* [background communication capability](docroot://reference/apis-ability-kit/js-apis-app-ability-uiAbility.md#background-communication-capability)
* .
*
* > **NOTE**
* >
* > For details about the inheritance relationship of each ability, see
* > [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* > .
*
* @file
* @kit AbilityKit
*/
/**
* # UIAbility Lifecycle States
*
* **Figure 1** UIAbility lifecycle states
*
* 
*
* - **Create**: A UIAbility instance has been created. The system triggers the [onCreate]{@link UIAbility.onCreate}
* callback in this state, where you can perform initialization operations.
* - **Foreground**: The UIAbility has been brought to the foreground. The system triggers the
* [onForeground]{@link UIAbility.onForeground} callback in this state, where you can request resources required by the
* application.
* - **Background**: The UIAbility has been moved to the background. The system triggers the
* [onBackground]{@link UIAbility.onBackground} callback in this state, where you can release some application
* resources.
* - **Destroy**: The UIAbility instance is about to be destroyed. The system triggers the
* [onDestroy]{@link UIAbility.onDestroy} callback in this state, where you can save data.
*/
/**
* # Background Communication Capability
*
* **Call** invocations can be used for background communication with the target UIAbility. The following figure shows
* the Call invocation.
*
* **Figure 2** Diagram of Call invocation
*
* 
*
* - The Caller UIAbility uses
* [startAbilityByCall()]{@link ./application/UIAbilityContext:UIAbilityContext.startAbilityByCall} to obtain a
* [Caller]{@link Caller} object and then uses the [call]{@link Caller} API of the Caller object to send data to the
* Callee UIAbility.
* - The Callee UIAbility holds a [Callee]{@link Callee} object and uses the [on]{@link UIAbility.onCreate} API of the
* Callee object to register a callback function for receiving data sent by the Caller object.
*/
import Ability from './@ohos.app.ability.Ability';
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import Want from './@ohos.app.ability.Want';
import window from './@ohos.window';
import UIAbilityContext from './application/UIAbilityContext';
import rpc from './@ohos.rpc';
/**
* Defines the callback that is invoked when the stub on the target UIAbility is disconnected.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
export interface OnReleaseCallback {
/**
* Defines the callback of OnRelease.
*
* @param { string } msg - Message used for disconnection.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
(msg: string): void;
}
/**
* Defines the callback that is invoked when the remote UIAbility state changes in the collaboration scenario.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
export interface OnRemoteStateChangeCallback {
/**
* Defines the callback of OnRemoteStateChange.
*
* @param { string } msg - Message used for disconnection.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
(msg: string): void;
}
/**
* Defines the callback of the registration message notification of the UIAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
export interface CalleeCallback {
/**
* Defines the callback of Callee.
*
* @param { rpc.MessageSequence } indata - Data to be transferred.
* @returns { rpc.Parcelable } Returned data object.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
(indata: rpc.MessageSequence): rpc.Parcelable;
}
/**
* A Caller UIAbility can use the
* [startAbilityByCall]{@link ./application/UIAbilityContext:UIAbilityContext.startAbilityByCall} API to start the
* target Callee UIAbility. After the target UIAbility is started successfully, a Caller object is returned to the
* caller for communication.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
export interface Caller {
/**
* Used by a Caller UIAbility to send serialized data, as agreed upon by both parties, to the Callee UIAbility. This
* API uses a promise to return the result.
*
* @param { string } method - Method name agreed upon by the Caller UIAbility and Callee UIAbility, used by the Callee
* UIAbility to identify the type of message.
* @param { rpc.Parcelable } data - Message content sent from the Caller UIAbility to the Callee UIAbility, which is
* in serialized form.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16200002 - The callee does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
call(method: string, data: rpc.Parcelable): Promise<void>;
/**
* Used by a Caller UIAbility to send serialized data to a Callee UIAbility and return the result after the Callee
* UIAbility processes the message. This API uses a promise to return the result.
*
* @param { string } method - Method name agreed upon by the Caller UIAbility and Callee UIAbility, used by the Callee
* UIAbility to identify the type of message.
* @param { rpc.Parcelable } data - Message content sent from the Caller UIAbility to the Callee UIAbility, which is
* in serialized form.
* @returns { Promise<rpc.MessageSequence> } Promise used to return the response data from the Callee UIAbility.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16200002 - The callee does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
callWithResult(method: string, data: rpc.Parcelable): Promise<rpc.MessageSequence>;
/**
* Used by a Caller UIAbility to proactively release the connection with the Callee UIAbility. After this API is
* called, the Caller UIAbility can no longer use **call** or **callWithResult** to send messages to the Callee
* UIAbility.
*
* @throws { BusinessError } 16200001 - The caller has been released.
* @throws { BusinessError } 16200002 - The callee does not exist.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
release(): void;
/**
* Used by the Caller UIAbility to register a listener for disconnection notifications from the Callee UIAbility.
*
* @param { OnReleaseCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
onRelease(callback: OnReleaseCallback): void;
/**
* Called when the remote UIAbility state changes in the collaboration scenario. This API uses an asynchronous
* callback to return the result.
*
* @param { OnRemoteStateChangeCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
onRemoteStateChange(callback: OnRemoteStateChangeCallback): void;
/**
* Used by the Caller UIAbility to register a listener for disconnection notifications from the Callee UIAbility.
*
* @param { 'release' } type - Event type. The value is fixed at **'release'**.
* @param { OnReleaseCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
on(type: 'release', callback: OnReleaseCallback): void;
/**
* Unregisters the listener for disconnection notifications from the Callee UIAbility. This is the reverse operation
* of [on('release')]{@link Caller.on}. It is currently not supported.
*
* @param { 'release' } type - Event type. The value is fixed at **'release'**.
* @param { OnReleaseCallback } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
off(type: 'release', callback: OnReleaseCallback): void;
/**
* Unregisters the listener for disconnection notifications from the Callee UIAbility. This is the reverse operation
* of [Caller.on('release')]{@link Caller.on}. It is currently not supported.
*
* @param { 'release' } type - Event type. The value is fixed at **'release'**.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
off(type: 'release'): void;
}
/**
* Background communication object created by the system for the UIAbility, known as the Callee UIAbility (Callee),
* which is capable of receiving data sent from the Caller object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
export interface Callee {
/**
* Registers a caller notification callback, which is invoked when the target UIAbility registers a function.
*
* @param { string } method - Method name agreed upon by the Caller UIAbility and Callee UIAbility, used by the Callee
* UIAbility to identify the type of message.
* @param { CalleeCallback } callback - JS notification synchronization callback of the
* [rpc.MessageSequence]{@link ./@ohos.rpc:rpc.MessageSequence} type. The callback must return at least one empty
* [rpc.Parcelable]{@link ./@ohos.rpc:rpc.Parcelable} object. Otherwise, the function execution fails.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200004 - The method has been registered.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
on(method: string, callback: CalleeCallback): void;
/**
* Unregisters a caller notification callback, which is invoked when the target UIAbility registers a function.
*
* @param { string } method - Registered notification message string.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16200005 - The method has not been registered.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
off(method: string): void;
}
/**
* Application component that has the UI. It provides lifecycle callbacks such as component creation, destruction, and
* foreground/background switching, and supports background communication.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare class UIAbility extends Ability {
/**
* Context of the UIAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
context: UIAbilityContext;
/**
* Want in the request used to
* [cold start](docroot://application-models/uiability-intra-device-interaction.md#cold-starting-uiability) the
* UIAbility. The value is the Want received in [onCreate]{@link UIAbility.onCreate}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
launchWant: Want;
/**
* Want in the most recent request to launch the UIAbility.
*
* - On the first launch of a UIAbility, it is the Want parameter received in [onCreate]{@link UIAbility.onCreate}.
* - On subsequent launches, it is the most recent Want received in [onNewWant]{@link UIAbility.onNewWant}.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
lastRequestWant: Want;
/**
* Background communication object created by the system for the UIAbility, known as the Callee UIAbility (Callee),
* which is capable of receiving data sent from the Caller object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 9
*/
callee: Callee;
/**
* Custom UIAbility ID. This parameter is available only when the UIAbility launch mode is set to
* [specified](docroot://application-models/uiability-launch-type.md#specified).
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 23
*/
specifiedId?: string;
/**
* Called when a UIAbility instance is created. You can execute initialization logic (such as defining variables and
* loading resources) in this callback. This callback is invoked during a
* [cold start](docroot://application-models/uiability-intra-device-interaction.md#cold-starting-uiability) of the
* UIAbility.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @param { Want } want - Data passed by the caller when launching the UIAbility.
* @param { AbilityConstant.LaunchParam } launchParam - Parameters for application launch, including the reason for
* application launch and the reason for the last application exit.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void;
/**
* Called when a [WindowStage]{@link ./@ohos.window} instance is created. You can load a page through the WindowStage
* instance in this callback.
*
* @param { window.WindowStage } windowStage - WindowStage instance.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onWindowStageCreate(windowStage: window.WindowStage): void;
/**
* Called when the WindowStage instance is about to be destroyed. You can cancel the listening of WindowStage events
* in this lifecycle.
*
* @param { window.WindowStage } windowStage - WindowStage instance.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 12
*/
onWindowStageWillDestroy(windowStage: window.WindowStage): void;
/**
* Called when the WindowStage instance has been destroyed. It informs applications that the WindowStage instance is
* no longer available for use.
*
* The callback is invoked only when the UIAbility exits gracefully. It is not invoked in cases of abnormal exits (for
* example, process termination due to low memory conditions).
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onWindowStageDestroy(): void;
/**
* Called when the page stack is restored for the target UIAbility during cross-device migration.
*
* > **NOTE**
* >
* > When an application is launched as a result of a migration, the **onWindowStageRestore()** lifecycle callback
* > function, rather than **onWindowStageCreate()**, is triggered following [onCreate()]{@link UIAbility.onCreate} or
* > [onNewWant()]{@link UIAbility.onNewWant}. This sequence occurs for both
* > [cold start](docroot://application-models/uiability-intra-device-interaction.md#cold-starting-uiability) and
* > [hot start](docroot://application-models/uiability-intra-device-interaction.md#hot-starting-uiability).
*
* @param { window.WindowStage } windowStage - WindowStage instance.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onWindowStageRestore(windowStage: window.WindowStage): void;
/**
* Called when the UIAbility is destroyed (for example, when the UIAbility is terminated using the
* [terminateSelf]{@link ./application/UIAbilityContext:UIAbilityContext.terminateSelf(callback: AsyncCallback<void>)}
* API). You can clear resources and save data during this lifecycle.
*
* This API returns the result synchronously or uses a promise to return the result.
*
* > **NOTE**
* >
* > - Once the **onDestroy** lifecycle callback completes, the application may exit. This can interrupt any pending
* > asynchronous operations (such as asynchronously writing data to a database), preventing them from finishing
* > successfully. In this case, you are advised to use a promise to return the result.
* >
* > - The callback is invoked only when the UIAbility exits gracefully. It is not invoked in cases of abnormal exits
* > (for example, process termination due to low memory conditions).
*
* @returns { void | Promise<void> } No return value or a Promise object that returns no result.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onDestroy(): void | Promise<void>;
/**
* Called when the application is initially launched into the foreground or transitions from the background to the
* foreground. You can request necessary system resources, for example, requesting location services when the
* application transitions to the foreground, within this callback.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onForeground(): void;
/**
* Called just before the application transitions to the foreground. It is called before
* [onForeground]{@link UIAbility.onForeground}. It can be used to capture the moment when the application starts to
* transition to the foreground. When paired with [onDidForeground]{@link UIAbility.onDidForeground}, it can also
* measure the duration from the application's initial foreground entry to its full transition into the foreground
* state.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onWillForeground(): void;
/**
* Called after the application has transitioned to the foreground. It is called after
* [onForeground]{@link UIAbility.onForeground}. It can be used to capture the moment when the application fully
* transitions to the foreground. When paired with [onWillForeground]{@link UIAbility.onWillForeground}, it can also
* measure the duration from the application's initial foreground entry to its full transition into the foreground
* state.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onDidForeground(): void;
/**
* Called when the application transitions from the foreground to the background. You can release resources when the
* UI is no longer visible, for example, stopping location services, within this callback.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onBackground(): void;
/**
* Called just when the application transitions to the background. It is called before
* [onBackground]{@link UIAbility.onBackground}. It can be used to log various types of data, such as faults,
* statistics, security information, and user behavior that occur during application running.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onWillBackground(): void;
/**
* Called after the application has transitioned to the background. It is called after
* [onBackground]{@link UIAbility.onBackground}. It can be used to release resources after the application has entered
* the background, for example, stopping audio playback.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onDidBackground(): void;
/**
* Called when a UIAbility is to be migrated across devices. You can save service data to be migrated.
*
* > **NOTE**
* >
* > For versions prior to API version 18, only synchronous calls are supported. Starting from API version 18,
* > asynchronous calls are also supported.
*
* @param { object } wantParam - Data to be migrated. [since 9 - 10]
* @param { Record<string, Object> } wantParam - Data to be migrated. [since 11]
* @returns { AbilityConstant.OnContinueResult } Return the result of onContinue. [since 9 - 11]
* @returns { AbilityConstant.OnContinueResult | Promise<AbilityConstant.OnContinueResult> } Whether the migration is
* accepted. The options are as follows:
* <br>- **AGREE**: The migration is allowed.
* <br>- **REJECT**: The migration is rejected, for example, when an application is abnormal in **onContinue()**.
* <br>- **MISMATCH**: The application versions of the source and target devices do not match. The application on the
* source device can obtain the version of the target application from **onContinue**. If the ability continuation
* cannot be performed due to version mismatch, this result is returned.
* <br> This callback comes in pairs with **onWindowStageRestore**. In ability continuation scenarios, the source
* UIAbility triggers **onContinue** to save custom data, and the target UIAbility triggers
* **onWindowStageRestore** to restore the custom data. [since 12]
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onContinue(wantParam: Record<string, Object>): AbilityConstant.OnContinueResult | Promise<AbilityConstant.OnContinueResult>;
/**
* Called when a started UIAbility instance is brought up again. If there are specific scenarios where you do not want
* this lifecycle callback to be triggered, you can use
* [setOnNewWantSkipScenarios]{@link ./application/UIAbilityContext:UIAbilityContext.setOnNewWantSkipScenarios} to set
* those [scenarios]{@link ./@ohos.app.ability.contextConstant:contextConstant.Scenarios}.
*
* This API returns the result synchronously and does not support asynchronous callback.
*
* @param { Want } want - Data passed by the caller when re-launching the UIAbility.
* @param { AbilityConstant.LaunchParam } launchParam - UIAbility launch parameters, including the launch reason.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
onNewWant(want: Want, launchParam: AbilityConstant.LaunchParam): void;
/**
* Called when UIAbility data is dumped by running the dump command during application debugging. You can return non-
* sensitive information to be dumped by the UIAbility in this callback.
*
* @param { Array<string> } params - Parameters for the dump command.
* @returns { Array<string> } Information returned by the dump operation.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onDump(params: Array<string>): Array<string>;
/**
* This API must be used with [appRecovery]{@link ./@ohos.app.ability.appRecovery:appRecovery}. When the application has
* enabled the fault recovery feature (with the **saveOccasion** parameter in
* [enableAppRecovery]{@link ./@ohos.app.ability.appRecovery:appRecovery.enableAppRecovery} set to **SAVE_WHEN_ERROR**),
* this callback is invoked to save the UIAbility data in the case of an application fault.
*
* > **NOTE**
* >
* > Starting from API version 20, this callback is not executed when
* > [onSaveStateAsync]{@link UIAbility.onSaveStateAsync(stateType: AbilityConstant.StateType, wantParam: Record<string, Object>)}
* > is implemented.
*
* @param { AbilityConstant.StateType } reason - Reason for triggering the application to save its state. Currently,
* only **APP_RECOVERY** (fault recovery scenario) is supported.
* @param { object } wantParam - Custom application state data, which is stored in **Want.parameters** in
* [onCreate]{@link UIAbility.onCreate} when the application restarts. [since 9 - 10]
* @param { Record<string, Object> } wantParam - Custom application state data, which is stored in **Want.parameters**
* in [onCreate]{@link UIAbility.onCreate} when the application restarts. [since 11]
* @returns { AbilityConstant.OnSaveResult } An object indicating the data-saving policy (for example, all denied, all
* allowed, or only allowed in fault recovery scenarios).
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onSaveState(reason: AbilityConstant.StateType, wantParam: Record<string, Object>): AbilityConstant.OnSaveResult;
/**
* This API must be used with [appRecovery]{@link ./@ohos.app.ability.appRecovery:appRecovery}. When the application has
* enabled the fault recovery feature (with the **saveOccasion** parameter in
* [enableAppRecovery]{@link ./@ohos.app.ability.appRecovery:appRecovery.enableAppRecovery} set to **SAVE_WHEN_ERROR**),
* this callback is invoked to save the UIAbility data in the case of an application fault. This API uses a promise to
* return the result.
*
* @param { AbilityConstant.StateType } stateType - Reason for triggering the application to save its state. Currently
* , only **APP_RECOVERY** (fault recovery scenario) is supported.
* @param { Record<string, Object> } wantParam - Custom application state data, which is stored in **Want.parameters**
* in [onCreate]{@link UIAbility.onCreate} when the application restarts.
* @returns { Promise<AbilityConstant.OnSaveResult> } Promise used to return the result. An object indicating the data
* -saving policy (for example, all denied, all allowed, or only allowed in fault recovery scenarios).
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 20
*/
onSaveStateAsync(stateType: AbilityConstant.StateType, wantParam: Record<string, Object>): Promise<AbilityConstant.OnSaveResult>;
/**
* Called when an atomic service is shared across devices. You can set the title, abstract, and URL of the atomic
* service to be shared in this callback.
*
* @param { object } wantParam - Data to share. [since 10 - 10]
* @param { Record<string, Object> } wantParam - Data to share. [since 11]
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
onShare(wantParam: Record<string, Object>): void;
/**
* Triggered by the system just before the UIAbility is about to close (for example, when the user clicks the close
* button in the top-right corner of the application window or exits from the dock or system tray), allowing for
* additional operations to be performed before the UIAbility is officially shut down. You can return **true** to
* block the current closure attempt and then manually call
* [terminateSelf]{@link ./application/UIAbilityContext:UIAbilityContext#terminateSelf(callback: AsyncCallback<void>)}
* at an appropriate time to close it. For example, you might ask the user to confirm whether they want to close the
* UIAbility and then proceed with the closure manually.
* This API executes the callback normally only on 2-in-1 devices and tablets. It does not execute the callback on
* other devices.
*
* > **NOTE**
* >
* > - Starting from API version 15, this callback is not executed when
* > [UIAbility.onPrepareToTerminateAsync]{@link UIAbility.onPrepareToTerminateAsync} is implemented. When
* > [AbilityStage.onPrepareTerminationAsync]{@link ./@ohos.app.ability.AbilityStage:AbilityStage.onPrepareTerminationAsync}
* > or [AbilityStage.onPrepareTermination]{@link ./@ohos.app.ability.AbilityStage:AbilityStage.onPrepareTermination} is
* > implemented, this callback is not executed if the user right-clicks the dock bar or system tray to close the
* > UIAbility.
* >
* > - Additionally, if the application or a third-party framework registers a listener for
* > [window.WindowStage.on('windowStageClose')](docroot://reference/apis-arkui/arkts-apis-window-WindowStage.md#onwindowstageclose14)
* > , this callback function is not executed.
*
* @permission ohos.permission.PREPARE_APP_TERMINATE
* @returns { boolean } Whether to terminate the UIAbility.
* <br>The value <code>true</code> means that the termination process is canceled.
* <br>The value <code>false</code> means to continue terminating the UIAbility.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
onPrepareToTerminate(): boolean;
/**
* Triggered by the system just before the UIAbility is close (for example, when the user clicks the close button in
* the top-right corner of the application window or exits from the dock or system tray), allowing for additional
* operations to be performed before the UIAbility is officially shut down.
*
* You can return **true** to block the current closure attempt and then manually call
* [terminateSelf]{@link ./application/UIAbilityContext:UIAbilityContext.terminateSelf(callback: AsyncCallback<void>)}
* at an appropriate time to close it. For example, you might ask the user to confirm whether they want to close the
* UIAbility and then proceed with the closure manually.
* Starting from API version 15, this API executes the callback normally only on 2-in-1 devices. It does not execute
* the callback on other devices.
* Starting from API version 19, this API executes the callback normally only on 2-in-1 devices and tablets. It does
* not execute the callback on other devices.
*
* > **NOTE**
* >
* > - When
* > [AbilityStage.onPrepareTerminationAsync]{@link ./@ohos.app.ability.AbilityStage:AbilityStage.onPrepareTerminationAsync}
* > or [AbilityStage.onPrepareTermination]{@link ./@ohos.app.ability.AbilityStage:AbilityStage.onPrepareTermination} is
* > implemented, this callback is not executed if the user right-clicks the dock bar or system tray to close the
* > UIAbility.
* >
* > - Additionally, if the application or a third-party framework registers a listener for
* > [window.WindowStage.on('windowStageClose')](docroot://reference/apis-arkui/arkts-apis-window-WindowStage.md#onwindowstageclose14)
* > , this callback function is not executed.
* >
* > - If an asynchronous callback crashes, it will be handled as a timeout. If the UIAbility does not respond within
* > 10 seconds, it will be terminated forcibly.
*
* @permission ohos.permission.PREPARE_APP_TERMINATE
* @returns { Promise<boolean> } Promise used to return the result.
* <br>The value <code>true</code> means that the termination process is canceled.
* <br>The value <code>false</code> means to continue terminating the UIAbility.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice
* @since 15
*/
onPrepareToTerminateAsync(): Promise<boolean>;
/**
* Called when an operation of going back to the previous page is triggered on this UIAbility. The return value
* determines whether to destroy the UIAbility instance.
*
* - When the target SDK version is earlier than 12, the default return value is **false**, indicating that the
* UIAbility will be destroyed.
* - When the target SDK version is 12 or later, the default return value is **true**, indicating that the UIAbility
* will be moved to the background and will not be destroyed.
*
* @returns { boolean } The value <code>true</code> means that the UIAbility instance will be moved to the background
* and will not be destroyed, and <code>false</code> means that the UIAbility instance will be destroyed.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @atomicservice [since 11]
* @since 10
*/
onBackPressed(): boolean;
/**
* Callback invoked to return the collaboration result in multi-device collaboration scenarios.
*
* > **NOTE**
* >
* > - This callback does not support ability launch in
* > [specified mode](docroot://application-models/uiability-launch-type.md#specified).
* >
* > - When you use methods such as
* > [startAbility]{@link ./application/UIAbilityContext:UIAbilityContext.startAbility(want: Want, callback: AsyncCallback<void>)}
* > to start an application, you must include **FLAG_ABILITY_ON_COLLABORATE** in
* > [Flags]{@link ./@ohos.app.ability.wantConstant:wantConstant.Flags} in the Want object.
* >
* > - During a
* > [cold start](docroot://application-models/uiability-intra-device-interaction.md#cold-starting-uiability), this
* > callback must be invoked before [onForeground]{@link UIAbility.onForeground} or after
* > [onBackground]{@link UIAbility.onBackground}. During a
* > [hot start](docroot://application-models/uiability-intra-device-interaction.md#hot-starting-uiability), this
* > callback must be invoked before [onNewWant]{@link UIAbility.onNewWant}.
*
* @param { Record<string, Object> } wantParam - Want parameter, which supports only the key
* **"ohos.extra.param.key.supportCollaborateIndex"**. The key can be used to obtain the data passed by the caller
* and perform corresponding processing.
* @returns { AbilityConstant.CollaborateResult } Whether the coordinator accepts the collaboration result.
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 18
*/
onCollaborate(wantParam: Record<string, Object>): AbilityConstant.CollaborateResult;
/**
* Indicates whether the UIAbility has been destroyed. The default value is **false**.
*
* After the [onDestroy]{@link UIAbility.onDestroy} callback is executed, this property is set to **true**.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 26.0.0
*/
isDestroyed: boolean;
}
export default UIAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIExtensionAbility.d.ts.md
# @ohos.app.ability.UIExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import type Want from './@ohos.app.ability.Want';
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
import type UIExtensionContext from './application/UIExtensionContext';
/**
* UIExtensionAbility is an ExtensionAbility component with a User Interface (UI). It inherits from
* [ExtensionAbility]{@link ./@ohos.app.ability.ExtensionAbility:ExtensionAbility} and provides basic lifecycle
* capabilities such as component creation, destruction, and foreground/background switching. Unlike the UIAbility, the
* UIExtensionAbility does not appear as a separate mission in the mission view. The foreground/background state and
* visibility of the UIExtensionAbility follow those of its host window.
* You cannot directly inherit from the UIExtensionAbility. However, you can choose other components that inherit from
* UIExtensionAbility based on specific service scenarios. For example, when handling data shared from other
* applications, you can use the
* [ShareExtensionAbility]{@link ./@ohos.app.ability.ShareExtensionAbility:ShareExtensionAbility}; when providing
* widget editing functionality, you can use the
* [FormEditExtensionAbility]{@link ./@ohos.app.form.FormEditExtensionAbility:FormEditExtensionAbility}.
* For details about the inheritance relationship of each ability, see
* [Inheritance Relationship](docroot://reference/apis-ability-kit/js-apis-app-ability-ability.md#ability-inheritance-relationship)
* .
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
declare class UIExtensionAbility extends ExtensionAbility {
/**
* Context of the UIExtensionAbility.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
context: UIExtensionContext;
/**
* Called when a UIExtensionAbility instance is created. You can execute initialization logic (such as defining
* variables and loading resources) within this callback.
*
* @param { AbilityConstant.LaunchParam } launchParam - Parameters for application launch, including the reason for
* application launch and the reason for the last application exit. [since 12]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
onCreate(launchParam: AbilityConstant.LaunchParam): void;
/**
* Called when a [UIExtensionContentSession]{@link ./@ohos.app.ability.UIExtensionContentSession} instance is created.
* You can load a page through the UIExtensionContentSession instance within this callback.
*
* @param { Want } want - Data passed by the caller when launching the UIExtensionAbility.
* @param { UIExtensionContentSession } session - UIExtensionContentSession instance.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
onSessionCreate(want: Want, session: UIExtensionContentSession): void;
/**
* Called when a UIExtensionContentSession is destroyed. It informs applications that the UIExtensionContentSession
* instance is no longer available for use.
*
* @param { UIExtensionContentSession } session - UIExtensionContentSession instance.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
onSessionDestroy(session: UIExtensionContentSession): void;
/**
* Called when a UIExtensionAbility is initially launched into the foreground or transitions from the background to
* the foreground. You can apply for resources when the UI becomes visible within this callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
onForeground(): void;
/**
* Called when a UIExtensionAbility transitions from the foreground to the background. You can release resources when
* the UI is no longer invisible within this callback.
*
* @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore
* @stagemodelonly
* @since 10
*/
onBackground(): void;
/**
* Called when a UIExtensionAbility is destroyed. You can clear resources and save data during this lifecycle. This
* API returns the result synchronously or uses a promise to return the result.
* After the **onDestroy()** lifecycle callback is executed, the application may exit. Consequently, the asynchronous
* function (for example, asynchronously writing data to the database) in **onDestroy()** may fail to be executed.
* Using a Promise for asynchronous callback is recommended to prevent such issues.
*
* @returns { void | Promise<void> } No return value or a Promise object that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
onDestroy(): void | Promise<void>;
}
export default UIExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.UIExtensionContentSession.d.ts.md
# @ohos.app.ability.UIExtensionContentSession.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* UIExtensionContentSession is the UI operation class for the
* [UIExtensionAbility]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility}. It provides control over page
* loading and allows configuration of the window privacy mode of the host application (application that starts the
* UIExtensionAbility). When the host application starts a specific UIExtensionAbility, the system creates a
* UIExtensionContentSession object and passes it back via the
* [onSessionCreate]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility.onSessionCreate} callback. Each
* UIExtensionAbility corresponds to one UIExtensionContentSession object, and these objects operate independently
* without interfering with each other.
*
* @file
* @kit AbilityKit
*/
import type { AbilityResult } from './ability/abilityResult';
import type { AsyncCallback } from './@ohos.base';
import type uiExtension from './@ohos.arkui.uiExtension';
import type AbilityStartCallback from './application/AbilityStartCallback';
/**
* UIExtensionContentSession is the UI operation class for the UIExtensionAbility. It provides control over page loading
* and allows configuration of the window privacy mode of the host application.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
declare class UIExtensionContentSession {
/**
* Loads a page for the [UIExtensionAbility]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility}, with
* state properties passed to the page through [LocalStorage](docroot://ui/state-management/arkts-localstorage.md).
* This API is used to load a page in the
* [onSessionCreate]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility.onSessionCreate} lifecycle of the
* UIExtensionAbility.
*
* @param { string } path - Path of the page to load. The path is configured using the
* [pages](docroot://quick-start/module-configuration-file.md#pages) tag in the
* [module.json5](docroot://quick-start/module-configuration-file.md) file.
* @param { LocalStorage } [storage] - A page-level UI state storage unit, which is used to pass state properties to the
* page.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
loadContent(path: string, storage?: LocalStorage): void;
/**
* Loads a [named route](docroot://ui/arkts-routing.md#named-route) page for a
* [UIExtensionAbility]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility}, with state properties passed
* to the page through [LocalStorage](docroot://ui/state-management/arkts-localstorage.md). This API is used to load a
* named route page in the
* [onSessionCreate]{@link ./@ohos.app.ability.UIExtensionAbility:UIExtensionAbility.onSessionCreate} lifecycle of the
* UIExtensionAbility.
*
* @param { string } name - Name of the named route page.
* @param { LocalStorage } [storage] - A page-level UI state storage unit, which is used to pass state properties to the
* page.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 18
*/
loadContentByName(name: string, storage?: LocalStorage): void;
/**
* Destroys this UIExtensionAbility and closes the corresponding window of the host application. This API uses an
* asynchronous callback to return the result.
*
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, **err** is
* **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
terminateSelf(callback: AsyncCallback<void>): void;
/**
* Destroys this UIExtensionAbility and closes the corresponding window of the host application. This API uses a
* promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
terminateSelf(): Promise<void>;
/**
* Destroys this UIExtensionAbility, closes the corresponding window of the host application, and returns the result
* to the host application. This API uses an asynchronous callback to return the result.
*
* @param { AbilityResult } parameter - Information returned to the host application.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, **err** is
* **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
/**
* Destroys this UIExtensionAbility, closes the corresponding window of the host application, and returns the result
* to the host application. This API uses a promise to return the result.
*
* @param { AbilityResult } parameter - Information returned to the host application.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
/**
* Enables or disables the window privacy mode of the host application. A window in privacy mode cannot be captured or
* recorded. This API uses a promise to return the result.
*
* @permission ohos.permission.PRIVACY_WINDOW
* @param { boolean } isPrivacyMode - Whether to enable the privacy mode. **true** to enable, **false** otherwise.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
setWindowPrivacyMode(isPrivacyMode: boolean): Promise<void>;
/**
* Enables or disables the window privacy mode of the host application. A window in privacy mode cannot be captured or
* recorded. This API uses an asynchronous callback to return the result.
*
* @permission ohos.permission.PRIVACY_WINDOW
* @param { boolean } isPrivacyMode - Whether to enable the privacy mode. **true** to enable, **false** otherwise.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the setting is successful, **err** is
* **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - The application does not have permission to call the interface.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 10
*/
setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void;
/**
* Implicitly starts a given type of UIExtensionAbility. This API uses an asynchronous callback to return the result.
* It can be called only by applications running in the foreground.
* If the target ability is visible, you can start the target ability; If the target ability is invisible,
* you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability.
*
* @param { string } type - Type of the UIExtensionAbility. For details, see
* [Starting an Application of the Specified Type](docroot://application-models/start-intent-panel.md#matching-rules).
* @param { Record<string, Object> } wantParam - Parameters passed for starting the UIExtensionAbility.
* @param { AbilityStartCallback } abilityStartCallback - Execution result of starting the UIExtensionAbility.
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful, **err** is
* **undefined**. Otherwise, **err** is an error object.
* @throws { BusinessError } 201 - The application does not have permission to call the interface. [since 11 - 11]
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist. [since 11 - 11]
* @throws { BusinessError } 16000002 - Incorrect ability type. [since 11 - 11]
* @throws { BusinessError } 16000004 - Cannot start an invisible component. [since 11 - 11]
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released. [since 11 - 11]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
startAbilityByType(type: string, wantParam: Record<string, Object>, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback<void>): void;
/**
* Implicitly starts a given type of UIExtensionAbility. This API uses a promise to return the result. It can be
* called only by applications running in the foreground.
*
* @param { string } type - Type of the UIExtensionAbility. For details, see
* [Starting an Application of the Specified Type](docroot://application-models/start-intent-panel.md#matching-rules).
* @param { Record<string, Object> } wantParam - Parameters passed for starting the UIExtensionAbility.
* @param { AbilityStartCallback } abilityStartCallback - Execution result of starting the UIExtensionAbility.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 201 - The application does not have permission to call the interface. [since 11 - 11]
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* <br>2. Incorrect parameter types.
* @throws { BusinessError } 16000001 - The specified ability does not exist. [since 11 - 11]
* @throws { BusinessError } 16000002 - Incorrect ability type. [since 11 - 11]
* @throws { BusinessError } 16000004 - Cannot start an invisible component. [since 11 - 11]
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16200001 - The caller has been released. [since 11 - 11]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
startAbilityByType(type: string, wantParam: Record<string, Object>, abilityStartCallback: AbilityStartCallback): Promise<void>;
/**
* Obtains the window proxy of this UIExtensionAbility.
*
* @returns { uiExtension.WindowProxy } Window proxy of the host application.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 12
*/
getUIExtensionWindowProxy(): uiExtension.WindowProxy;
}
export default UIExtensionContentSession;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.VpnExtensionAbility.d.ts.md
# @ohos.app.ability.VpnExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit NetworkKit
*/
import type VpnExtensionContext from './application/VpnExtensionContext';
import type Want from './@ohos.app.ability.Want';
/**
* **VpnExtensionContext** represents the context of **VpnExtensionAbility** and is inherited from
* [ExtensionContext]{@link ./application/ExtensionContext:ExtensionContext}.
*
* This module provides the context required for APIs to access the resources of a **VpnExtensionAbility** object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
export default class VpnExtensionAbility {
/**
* Specified context.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
context: VpnExtensionContext;
/**
* Represents the callback triggered when the extended VPN is initialized.
*
* > **NOTE**
* >
* > You are advised to call [onDestroy]{@link VpnExtensionAbility#onDestroy} to listen to the destruction of the
* > extended VPN and clear resources in a timely manner.
*
* @param { Want } want - Want information.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onCreate(want: Want): void;
/**
* Represents the callback triggered when the extended VPN is destroyed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @since 11
*/
onDestroy(): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.Want.d.ts.md
# @ohos.app.ability.Want.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* Want is a carrier for information transfer between objects (application components).
* A typical scenario is when a UIAbility (for example, UIAbility A) needs to launch another UIAbility (for example,
* UIAbility B) and pass some data along. In this case, a Want can be used as the medium. For example, in the **want**
* parameter of the **startAbility** API, you can specify the target ability using the **abilityName** field or include
* additional data via the **parameters** field.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
export default class Want {
/**
* Bundle name of the application. It represents the bundle name of the target application in the application launch
* scenario.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
bundleName?: string;
/**
* Ability name of the application. It represents the ability name of the target application in the application launch
* scenario. If both **bundleName** and **abilityName** are specified in a Want object, the Want object can match a
* specific ability. The value of **abilityName** must be unique in an application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
abilityName?: string;
/**
* Device ID. It indicates the device ID of the target application in the application launch scenario. If not
* specified, it defaults to the current device.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
deviceId?: string;
/**
* URI, which is used with **type** to specify the data type to be processed in the application launch scenario. If
* **uri** is specified in a Want, the Want will match the specified URI information, including **scheme**,
* **schemeSpecificPart**, **authority**, and **path**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
uri?: string;
/**
* MIME type, that is, the type of the file to open, for example, **'text/xml'** and **'image/*'**. For details about
* the MIME type definition, see
* [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com).
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 18]
* @atomicservice [since 11]
* @since 9
*/
type?: string;
/**
* How the Want object will be handled. The value is of the enumeration type
* [Flags]{@link ./@ohos.app.ability.wantConstant:wantConstant.Flags}. A numeric value should be passed by default.
*
* For example, if the value is 0x00000001 (**wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION**), the receiver is
* temporarily granted the permission to read the data pointed to by the URI.
*
* @type { ?number } [since 9 - 10]
* @type { ?number } [since 11]
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
flags?: number;
/**
* Action to take, such as viewing and sharing application details. In implicit Want, you can define this field and
* use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details
* about the definition and matching rules of implicit Want, see
* [Matching Rules of Explicit Want and Implicit Want](docroot://application-models/explicit-implicit-want-mappings.md)
* .
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
action?: string;
/**
* List of parameters in the Want object.
*
* 1. The values of the following keys are assigned by the system. Manual settings do not take effect, since the
* system automatically changes the values to the actual values during data transfer.
*
* - **ohos.aafwk.param.callerPid**: PID of the caller. The value is a string.
* - **ohos.aafwk.param.callerBundleName**: bundle name of the caller. The value is a string.
* - **ohos.aafwk.param.callerAbilityName**: ability name of the caller. The value is a string.
* - **ohos.aafwk.param.callerNativeName**: process name of the caller when the native method is called. The value is
* a string.
* - **ohos.aafwk.param.callerAppId**: appId of the caller. The value is a string.
* - **ohos.aafwk.param.callerAppIdentifier**: appIdentifier of the caller. The value is a string.
* - **ohos.aafwk.param.callerToken**: token of the caller. The value is a string.
* - **ohos.aafwk.param.callerUid**: UID in [BundleInfo]{@link ./bundleManager/BundleInfo:BundleInfo}, that is,
* the application's UID in the bundle information. The value is a number.
* - **ohos.param.callerAppCloneIndex**: clone index of the caller. The value is of the numeric type.
* - **component.startup.newRules**: enabled status of the new control rule. The value is of the Boolean type.
* - **moduleName**: module name of the caller. The value is a string.
* - **ohos.ability.params.abilityRecoveryRestart**: support for ability restart upon fault recovery. The value is of
* the Boolean type.
* - **ohos.extra.param.key.showMode**: mode to show the atomic service startup. The value is an enumerated value of
* [wantConstant.ShowMode]{@link ./@ohos.app.ability.wantConstant:wantConstant.showMode}.
*
* **NOTE**
*
* In cross-device scenarios, the following fields do not take effect and cannot be used for identity or permission
* verification: **ohos.aafwk.param.callerPid**, **ohos.aafwk.param.callerToken**, and **ohos.aafwk.param.callerUid**.
*
* 2. Certain keys are defined by the system, and their values need to be manually assigned. For details about the
* keys and their values, see [wantConstant.Params]{@link ./@ohos.app.ability.wantConstant:wantConstant.params}.
* 3. In addition to the foregoing cases, applications may further agree on the key-value pairs to transfer.
*
* **NOTE**
*
* For details about the constants of **Params** in **want**, see
* [wantConstant]{@link ./@ohos.app.ability.wantConstant:wantConstant}.
*
* Note that a maximum of 100 KB data that can be transferred by using **WantParams**. If the data volume exceeds 100
* KB, transfer data in [WriteRawDataBuffer]{@link ./@ohos.rpc:rpc.writeRawDataBuffer} or
* [uri]{@link ./@ohos.uri:uri} mode.
*
* The values of **parameters** must be of the following basic data types: String, Number, Boolean, Object, undefined,
* and null. Functions in an object cannot be transferred.
*
* @type { ?object } [since 9 - 10]
* @type { ?Record<string, Object> } [since 11]
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
parameters?: Record<string, Object>;
/**
* Additional category information (such as browser and video player) of the ability. It is a supplement to the
* **action** field for implicit Want. and is used to filter ability types.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
entities?: Array<string>;
/**
* Module name of the application. It represents the module name of the target application in the application launch
* scenario.
*
* **NOTE**
*
* If the ability belongs to a [HAR](docroot://quick-start/har-package.md) module, **moduleName** must be set to the name
* of the [HAP](docroot://quick-start/hap-package.md) or [HSP](docroot://quick-start/in-app-hsp.md) module that depends on
* this HAR.
*
* @syscap SystemCapability.Ability.AbilityBase
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
moduleName?: string;
/**
* File descriptor (FD). The FD written by the launcher in the application launch scenario is set to this parameter.
*
* This API can be used in atomic services since API version 15.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 15
*/
readonly fds?: Record<string, number>;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.wantAgent.d.ts.md
# @ohos.app.ability.wantAgent.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The WantAgent module encapsulates a [Want]{@link ./@ohos.app.ability.Want:Want} object, enabling an application to
* trigger a WantAgent object to perform specified operations (such as starting an ability or publishing a common event)
* at a future time.
*
* The module provides the APIs for creating a WantAgent object, obtaining the bundle name and UID of the application to
* which a WantAgent object belongs, proactively triggering a WantAgent object, and checking whether two WantAgent
* objects are the same. A typical use scenario of WantAgent is notification processing. For example, when a user
* touches a notification, the [trigger]{@link wantAgent.trigger} API of WantAgent is triggered and the target
* application is started. For details, see
* [Notification](docroot://notification/notification-with-wantagent.md).
*
* @file
* @kit AbilityKit
*/
import { AsyncCallback } from './@ohos.base';
import Want from './@ohos.app.ability.Want';
import { WantAgentInfo as _WantAgentInfo } from './wantAgent/wantAgentInfo';
import { TriggerInfo as _TriggerInfo } from './wantAgent/triggerInfo';
/**
* The WantAgent module encapsulates a [Want]{@link ./@ohos.app.ability.Want:Want} object, enabling an application to
* trigger a WantAgent object to perform specified operations (such as starting an ability or publishing a common event)
* at a future time.
*
* The module provides the APIs for creating a WantAgent object, obtaining the bundle name and UID of the application to
* which a WantAgent object belongs, proactively triggering a WantAgent object, and checking whether two WantAgent
* objects are the same. A typical use scenario of WantAgent is notification processing. For example, when a user
* touches a notification, the [trigger]{@link trigger} API of WantAgent is triggered and the target application is
* started. For details, see [Notification](docroot://notification/notification-with-wantagent.md).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
declare namespace wantAgent {
/**
* Obtains the bundle name of a WantAgent object.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @param { AsyncCallback<string> } callback - Callback used to return the bundle name.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getBundleName(agent: WantAgent, callback: AsyncCallback<string>): void;
/**
* Obtains the bundle name of a WantAgent object.
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @returns { Promise<string> } Promise used to return the bundle name.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getBundleName(agent: WantAgent): Promise<string>;
/**
* Obtains the user ID of a WantAgent object.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @param { AsyncCallback<number> } callback - Callback used to return the user ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getUid(agent: WantAgent, callback: AsyncCallback<number>): void;
/**
* Obtains the user ID of a WantAgent object.
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @returns { Promise<number> } Promise used to return the user ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getUid(agent: WantAgent): Promise<number>;
/**
* Cancels a WantAgent object.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function cancel(agent: WantAgent, callback: AsyncCallback<void>): void;
/**
* Cancels a WantAgent object.
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @returns { Promise<void> } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function cancel(agent: WantAgent): Promise<void>;
/**
* Proactively triggers a WantAgent object.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @param { TriggerInfo } triggerInfo - {@link TriggerInfo} object.
* @param { AsyncCallback<CompleteData> } [callback] - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback<CompleteData>): void;
/**
* Checks whether two WantAgent objects are equal, so as to determine whether the same operation is from the
* same application.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - The first WantAgent object.
* @param { WantAgent } otherAgent - The second WantAgent object.
* @param { AsyncCallback<boolean> } callback - Callback used to return the result. The value <code>true</code> means
* that the two WantAgent objects are equal, and <code>false</code> means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function equal(agent: WantAgent, otherAgent: WantAgent, callback: AsyncCallback<boolean>): void;
/**
* Checks whether two WantAgent objects are equal, so as to determine whether the same operation is from the
* same application.
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - The first WantAgent object.
* @param { WantAgent } otherAgent - The second WantAgent object.
* @returns { Promise<boolean> } Promise used to return the result. The value <code>true</code> means that the two
* WantAgent objects are equal, and <code>false</code> means the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function equal(agent: WantAgent, otherAgent: WantAgent): Promise<boolean>;
/**
* Obtains a WantAgent object.
* This API uses an asynchronous callback to return the result.
* If the creation fails, a null WantAgent object is returned.
*
* <p>**NOTE**:
* <br>Third-party applications can set only their own abilities.
* </p>
*
* @param { WantAgentInfo } info - Information about the WantAgent object to obtain.
* @param { AsyncCallback<WantAgent> } callback - Callback used to return the WantAgent object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getWantAgent(info: WantAgentInfo, callback: AsyncCallback<WantAgent>): void;
/**
* Obtains a WantAgent object.
* This API uses a promise to return the result.
* If the creation fails, a null WantAgent object is returned.
*
* <p>**NOTE**:
* <br>Third-party applications can set only their own abilities.
* </p>
*
* @param { WantAgentInfo } info - Information about the WantAgent object to obtain.
* @returns { Promise<WantAgent> } Promise used to return the WantAgent object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getWantAgent(info: WantAgentInfo): Promise<WantAgent>;
/**
* Obtains the operation type of a WantAgent object.
* This API uses an asynchronous callback to return the result.
*
* @param { WantAgent } agent - Target WantAgent object.
* @param { AsyncCallback<number> } callback - Callback used to return the operation type.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000015 - Service timeout.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getOperationType(agent: WantAgent, callback: AsyncCallback<number>): void;
/**
* Obtains the operation type of a WantAgent object.
* This API uses a promise to return the result.
*
* @param { WantAgent } agent - Indicates the WantAgent.
* @returns { Promise<number> } Returns the OperationType of the WantAgent.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later.
* @throws { BusinessError } 16000015 - Service timeout.
* @throws { BusinessError } 16000151 - Invalid wantAgent object.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
function getOperationType(agent: WantAgent): Promise<number>;
/**
* Enumerates the flags used by the WantAgent objects.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
export enum WantAgentFlags {
/**
* The WantAgent object can be used only once.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
ONE_TIME_FLAG = 0,
/**
* The WantAgent object does not exist and hence it is not created. In this case, <code>null</code> is returned.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
NO_BUILD_FLAG,
/**
* The existing WantAgent object should be canceled before a new object is generated.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
CANCEL_PRESENT_FLAG,
/**
* Extra information of the existing WantAgent object is replaced with that of the new object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
UPDATE_PRESENT_FLAG,
/**
* The WantAgent object is immutable.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
CONSTANT_FLAG,
/**
* The element property in the current Want can be replaced by the element property in the Want passed in
* WantAgent.trigger().This processing is not supported yet.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
REPLACE_ELEMENT,
/**
* The action property in the current Want can be replaced by the action property in the Want passed in
* WantAgent.trigger().This processing is not supported yet.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
REPLACE_ACTION,
/**
* The uri property in the current Want can be replaced by the uri property in the Want passed in
* WantAgent.trigger().This processing is not supported yet.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
REPLACE_URI,
/**
* The <code>entities</code> property in the current Want can be replaced by the <code>entities</code> property in
* the Want passed in WantAgent.trigger().This processing is not supported yet.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
REPLACE_ENTITIES,
/**
* The <code>bundleName</code> property in the current Want can be replaced by the <code>bundleName</code> property
* in the Want passed in WantAgent.trigger().This processing is not supported yet.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
REPLACE_BUNDLE
}
/**
* Enumerates the operation types of the WantAgent objects.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
export enum OperationType {
/**
* Unknown operation type.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
UNKNOWN_TYPE = 0,
/**
* Starts an ability with a UI.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
START_ABILITY,
/**
* Starts multiple abilities with a UI.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
START_ABILITIES,
/**
* Starts an ability without a UI (valid only in the FA model).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
START_SERVICE,
/**
* Sends a common event.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
SEND_COMMON_EVENT
}
/**
* Describes the data returned by the operation of proactive triggering a WantAgent object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
export interface CompleteData {
/**
* WantAgent object that is triggered.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
info: WantAgent;
/**
* Existing Want that is triggered.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
want: Want;
/**
* Request code that triggers the WantAgent object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
finalCode: number;
/**
* Final data collected by the common event.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
finalData: string;
/**
* Extra information.
*
* @type { ?object } [since 9 - 10]
* @type { ?Record<string, Object> } [since 11]
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
extraInfo?: Record<string, Object>;
}
/**
* Defines the TriggerInfo object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
export type TriggerInfo = _TriggerInfo;
/**
* Defines the WantAgentInfo object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 12]
* @since 9
*/
export type WantAgentInfo = _WantAgentInfo;
}
/**
* Target WantAgent object.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 9
*/
export type WantAgent = object;
export default wantAgent;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.ability.wantConstant.d.ts.md
# @ohos.app.ability.wantConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The wantConstant module provides the actions, entities, and flags used in Want objects.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
declare namespace wantConstant {
/**
* Defines **Params** (specifying the action that can be performed) in the Want.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
export enum Params {
/**
* Whether redirection back across mission stacks is supported.
*
* This parameter controls the redirection-back logic across applications, altering the application transition
* behavior when the user presses the back button. For example, if UIAbility A is currently displayed and UIAbility
* B is launched with this parameter set to **true**, exiting UIAbility B will return to UIAbility A. If this
* parameter is not set, the system defaults to returning to the home screen. Note that this parameter is only
* supported for system applications and does not take effect for third-party applications.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
ABILITY_BACK_TO_OTHER_MISSION_STACK = 'ability.params.backToOtherMissionStack',
/**
* Whether the ability has been restarted due to a fault.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
ABILITY_RECOVERY_RESTART = 'ohos.ability.params.abilityRecoveryRestart',
/**
* Title for sharing in an atomic service.
*
* You can set the sharing title using this field in the
* [onShare]{@link ./@ohos.app.ability.UIAbility:UIAbility.onShare} callback.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
CONTENT_TITLE_KEY = 'ohos.extra.param.key.contentTitle',
/**
* Content abstract for sharing in an atomic service.
*
* You can set the sharing abstract using this field in the
* [onShare]{@link ./@ohos.app.ability.UIAbility:UIAbility.onShare} callback.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
SHARE_ABSTRACT_KEY = 'ohos.extra.param.key.shareAbstract',
/**
* URL link for sharing in an atomic service.
*
* You can set the URL link using this field in the
* [onShare]{@link ./@ohos.app.ability.UIAbility:UIAbility.onShare} callback.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
SHARE_URL_KEY = 'ohos.extra.param.key.shareUrl',
/**
* Whether to migrate the page stack information during cross-device migration. The default value is **true**,
* indicating that the page stack information is automatically migrated during cross-device migration.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
SUPPORT_CONTINUE_PAGE_STACK_KEY = 'ohos.extra.param.key.supportContinuePageStack',
/**
* Whether the source application exits during cross-device migration. The default value is** true**, indicating
* that the source application automatically exits during cross-device migration.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 10
*/
SUPPORT_CONTINUE_SOURCE_EXIT_KEY = 'ohos.extra.param.key.supportContinueSourceExit',
/**
* Display mode of the [EmbeddableUIAbility]{@link ./@ohos.app.ability.EmbeddableUIAbility:EmbeddableUIAbility}.
* The value is an enumerated value of [ShowMode]{@link ShowMode}.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
SHOW_MODE_KEY = 'ohos.extra.param.key.showMode',
/**
* List of file URIs authorized to the target. The value must be an array of file URIs of the string type. For
* details about how to obtain the file URI, see [fileUri]{@link ./@ohos.file.fileuri:fileUri.getUriFromPath}. This
* field must be used in conjunction with file URI
* [read/write flag]{@link Flags}.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
PARAMS_STREAM = 'ability.params.stream',
/**
* Index of an application clone.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
APP_CLONE_INDEX_KEY = 'ohos.extra.param.key.appCloneIndex',
/**
* Request code
*
* that uniquely identifies the caller of
* [startAbilityForResult]{@link ./application/UIAbilityContext:UIAbilityContext.startabilityforresult} or
* [openLink]{@link ./application/UIAbilityContext:UIAbilityContext.openLink}. When either of the APIs is called to
* start an ability, the target ability returns the result to the caller based on the request code.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
CALLER_REQUEST_CODE = 'ohos.extra.param.key.callerRequestCode',
/**
* Page path for an atomic service.
*
* If page redirection in an atomic service is implemented using [router](docroot://ui/arkts-routing.md), you can use
* this parameter to specify the target page, for example, **library/ets/pages/menu**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
PAGE_PATH = 'ohos.param.atomicservice.pagePath',
/**
* Router name for page redirection in an atomic service.
*
* If page redirection in an atomic service is implemented using
* [Navigation](docroot://ui/arkts-navigation-architecture.md), you can use **ROUTER_NAME**, **PAGE_SOURCE_FILE**, and
* **BUILD_FUNCTION** together to specify the target page.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
ROUTER_NAME = 'ohos.param.atomicservice.routerName',
/**
* Source file for the page in an atomic service.
*
* If page redirection in an atomic service is implemented using
* [Navigation](docroot://ui/arkts-navigation-architecture.md), you can use **ROUTER_NAME**, **PAGE_SOURCE_FILE**, and
* **BUILD_FUNCTION** together to specify the target page.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
PAGE_SOURCE_FILE = 'ohos.param.atomicservice.pageSourceFile',
/**
* Build function for the page in an atomic service.
*
* If page redirection in an atomic service is implemented using
* [Navigation](docroot://ui/arkts-navigation-architecture.md), you can use **ROUTER_NAME**, **PAGE_SOURCE_FILE**, and
* **BUILD_FUNCTION** together to specify the target page.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
BUILD_FUNCTION = 'ohos.param.atomicservice.buildFunction',
/**
* Sub-package name for an atomic service. Application packages can be developed with multiple modules, and each
* package may include one or multiple HAPs or HSPs. To enhance the launch speed, atomic services restrict the size
* of HAP and HSP files and optimize the startup process. This modular development approach is known as sub-
* packaging.
*
* When you open an atomic service, you can use this parameter to activate the specific sub-package.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
SUB_PACKAGE_NAME = 'ohos.param.atomicservice.subpackageName',
/**
* Specific application instance.
*
* When you create [multiple instances](docroot://quick-start/multiInstance.md) of an application, the system assigns a
* unique ID to each instance. During application transitions, you can use this parameter to specify which created
* application instance you want to transition to.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 14
*/
APP_INSTANCE_KEY = 'ohos.extra.param.key.appInstance',
/**
* Whether to create an application instance. The default value is **false**, indicating that no new application
* instance is created.
*
* You can set this parameter to **true** to launch a new application instance. Note that the application to be
* launched must support multiple instances. For details, see
* [Creating an Application Multi-Instance](docroot://quick-start/multiInstance.md).
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 14
*/
CREATE_APP_INSTANCE_KEY = 'ohos.extra.param.key.createAppInstance',
/**
* Clone index of the caller.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 14
*/
CALLER_APP_CLONE_INDEX = 'ohos.param.callerAppCloneIndex',
/**
* The target ability is a plugin ability.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 19
*/
DESTINATION_PLUGIN_ABILITY = 'ohos.params.pluginAbility',
/**
* Filter list of applications for implicit launch.
*
* Only applications in the list are matched during implicit launch. The value is an array of
* [AppIdentifier]{@link ./bundleManager/BundleInfo:BundleInfo.AppIdentifier} of the string type. The filter list
* supports a maximum of 50 applications. Passing an empty array will have no effect.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 17
*/
APP_LAUNCH_TRUSTLIST = 'ohos.params.appLaunchTrustList',
/**
* Page stack information of the atomic service being launched. This parameter takes effect only when the caller is
* a UIAbilityContext and the callee is an atomic service.
*
* For example, if an atomic service contains a home page and a second page, and you want to directly launch the
* second page, you can pass the page stack information of the second page through this field when launching the
* atomic service.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 20
*/
ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter',
/**
* Reason for launching the application.
*
* The caller must be a system application and must request the ohos.permission.SET_LAUNCH_REASON_MESSAGE
* permission. The following values are supported:
*
* **ReasonMessage_SystemShare**: The application is launched through system sharing.
*
* **ReasonMessage_DesktopShortcut**: The application is launched through a home screen shortcut.
*
* **ReasonMessage_Notification**: The application is launched through a notification.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 18
*/
LAUNCH_REASON_MESSAGE = 'ohos.params.launchReasonMessage',
/**
* Unique identifier for file sharing based on [UDMF]{@link ./@ohos.data.unifiedDataChannel:unifiedDataChannel}.
* This field can only be set by system applications, but third-party applications can read it.
*
* If the Want contains a URI authorization flag (for example, [FLAG_AUTH_READ_URI_PERMISSION]{@link Flags} or
* [FLAG_AUTH_WRITE_URI_PERMISSION]{@link Flags}) and the **PARAMS_STREAM** field is also present, this field does
* not take effect.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 20
*/
ABILITY_UNIFIED_DATA_KEY = 'ohos.param.ability.udKey'
}
/**
* Enumerates the common preset keywords of the [Want.flags]{@link ./@ohos.app.ability.Want:Want} field. You can use
* these predefined keywords to set or retrieve additional flag information carried in application transitions.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
export enum Flags {
/**
* Temporarily grants the receiver read permission for the URI.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
FLAG_AUTH_READ_URI_PERMISSION = 0x00000001,
/**
* Temporarily grants the receiver write permission for the URI.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
FLAG_AUTH_WRITE_URI_PERMISSION = 0x00000002,
/**
* The URI can be persisted by the receiver. It takes effect only on 2-in-1 devices and tablets.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 12
*/
FLAG_AUTH_PERSISTABLE_URI_PERMISSION = 0x00000040,
/**
* Enables on-demand installation when launching an atomic service.
*
* - If enabled, the system automatically installs the atomic service if it is not already installed before
* proceeding with the launch.
* - If disabled, the launch fails if the atomic service is not installed.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice [since 11]
* @since 9
*/
FLAG_INSTALL_ON_DEMAND = 0x00000800,
/**
* In multi-device collaboration scenario, the caller application must initiate a request through the DMS, with this
* flag included in the **Flags** field, in order to invoke the lifecycle callback
* [onCollaborate()]{@link ./@ohos.app.ability.UIAbility:UIAbility.onCollaborate}
* of the target application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 18
*/
FLAG_ABILITY_ON_COLLABORATE = 0x00002000,
/**
* Disables the "No available applications" prompt during implicit application launches.
*
* When [launching an application implicitly](docroot://application-models/app-startup-overview.md), a prompt saying "No
* available applications" will appear if no matching application is found. You can use this flag to prevent this
* prompt from appearing.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 11
*/
FLAG_START_WITHOUT_TIPS = 0x40000000
}
/**
* Enumerates the display modes of an
* [EmbeddableUIAbility]{@link ./@ohos.app.ability.EmbeddableUIAbility:EmbeddableUIAbility} when it is launched.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
export enum ShowMode {
/**
* An independent window is used to show the ability startup.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
WINDOW = 0,
/**
* An embedded full-screen is used to show the ability startup.
*
* @syscap SystemCapability.Ability.AbilityBase
* @atomicservice
* @since 12
*/
EMBEDDED_FULL = 1,
/**
* An embedded half-screen is used to show the ability startup.
*
* @syscap SystemCapability.Ability.AbilityBase
* @stagemodelonly
* @atomicservice
* @since 23
*/
EMBEDDED_HALF = 2
}
/**
* Enumerates the action constants of the Want object. **action** specifies the operation to execute.
*
* @syscap SystemCapability.Ability.AbilityBase
* @stagemodelonly
* @since 26.0.0
*/
export enum Action {
/**
* Action of launching the UI for sending a message to a specified recipient.
*
* @syscap SystemCapability.Ability.AbilityBase
* @stagemodelonly
* @since 26.0.0
*/
ACTION_SEND_TO_DATA = 'ohos.want.action.sendToData'
}
}
export default wantConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.agentConstant.d.ts.md
# @ohos.app.agent.agentConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* This module provides constants for agent.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
declare namespace agentConstant {
/**
* The type of an AgentCard.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export enum AgentCardType {
/**
* Application-type agent card.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
APP = 0,
/**
* Atomic service-type agent card.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
ATOMIC_SERVICE = 1
}
}
export default agentConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.AgentExtensionAbility.d.ts.md
# @ohos.app.agent.AgentExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import AgentExtensionContext from './application/AgentExtensionContext';
import { AgentHostProxy } from './application/AgentHostProxy';
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
import Want from './@ohos.app.ability.Want';
/**
* The class of agent extension ability. This class cannot be used in Harmony Archive(HAR).
*
* @extends ExtensionAbility
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
declare class AgentExtensionAbility extends ExtensionAbility {
/**
* Context of the AgentExtensionAbility.
*
* @type { AgentExtensionContext }
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
context: AgentExtensionContext;
/**
* Called back when an agent extension is started for initialization.
*
* @param { Want } want - Want information, including the ability name and bundle name.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onCreate(want: Want): void;
/**
* Called back when an agent extension is connected to an ability.
*
* @param { Want } want - Indicates connection information about the AgentExtensionAbility.
* @param { AgentHostProxy } proxy - Indicates the agent service host proxy.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onConnect(want: Want, proxy: AgentHostProxy): void;
/**
* Called back when data is sent.
*
* @param { AgentHostProxy } proxy - Indicates the agent service host proxy.
* @param { string } data - Indicates the received data.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onData(proxy: AgentHostProxy, data: string): void;
/**
* Called back when authentication is sent.
*
* @param { AgentHostProxy } proxy - Indicates the agent service host proxy.
* @param { string } handshakeData - Indicates the received handshake data.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onAuth(proxy: AgentHostProxy, handshakeData: string): void;
/**
* Called back when ability connected to an agent service extension is disconnected.
*
* @param { Want } want - Indicates disconnection information about the agent service extension.
* @param { AgentHostProxy } proxy - Indicates the agent service host proxy.
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onDisconnect(want: Want, proxy: AgentHostProxy): void;
/**
* Called back before an agent service extension is destroyed.
*
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
onDestroy(): void;
}
export default AgentExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.agent.AgentUIExtensionAbility.d.ts.md
# @ohos.app.agent.AgentUIExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
/**
* The class of agent UI extension ability. This class cannot be used in Harmony Archive(HAR).
*
* @extends UIExtensionAbility
* @syscap SystemCapability.Ability.AgentRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 24
*/
declare class AgentUIExtensionAbility extends UIExtensionAbility {
}
export default AgentUIExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupConfig.d.ts.md
# @ohos.app.appstartup.StartupConfig.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import StartupListener from './@ohos.app.appstartup.StartupListener';
/**
* The module defines the configuration of [AppStartup](docroot://application-models/app-startup.md).
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
export default interface StartupConfig {
/**
* Timeout for executing all startup tasks, measured in ms. The default value is 10000 ms.
*
* @default 10000
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
timeoutMs?: number;
/**
* AppStartup listener, which is called when all the startup tasks are complete.
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
startupListener?: StartupListener;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupConfigEntry.d.ts.md
# @ohos.app.appstartup.StartupConfigEntry.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import StartupConfig from './@ohos.app.appstartup.StartupConfig';
import Want from './@ohos.app.ability.Want';
/**
* The module provides the capability to configure [AppStartup](docroot://application-models/app-startup.md).
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
declare class StartupConfigEntry {
/**
* Called if the HAP of the AbilityStage has
* [defined the AppStartup configuration file](docroot://application-models/app-startup.md#defining-startup-parameter-configuration)
* . This callback is triggered before
* [AbilityStage.onCreate]{@link @ohos.app.ability.AbilityStage:AbilityStage.onCreate}.
*
* You can set the AppStartup configuration within this callback. For details, see
* [Setting Startup Parameters](docroot://application-models/app-startup.md#setting-startup-parameters).
*
* @returns { StartupConfig } AppStartup configuration.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
onConfig?(): StartupConfig;
/**
* Called if the HAP of the AbilityStage has
* [defined the AppStartup configuration file](docroot://application-models/app-startup.md#defining-startup-parameter-configuration)
* . This callback is triggered after [StartupConfigEntry.onConfig]{@link StartupConfigEntry#onConfig?()} but before
* [AbilityStage.onCreate]{@link @ohos.app.ability.AbilityStage:AbilityStage.onCreate}.
*
* You can use this callback to return different custom matching rules based on parameters in the Want object passed
* by the caller to start the UIAbility. . AppStartup matches these rules with the **customization** field in
* **matchRules** of the startup task configuration. If a match is successful, the task is executed automatically. For
* details about the matching rules, see
* [Adding Task Matching Rules](docroot://application-models/app-startup.md#adding-task-matching-rules).
*
* This API is typically used in scenarios where tasks cannot be matched directly using URI, action, or intent name
* rules. It allows for further refinement of matching rules.
*
* @param { Want } want - Want information about the target UIAbility.
* @returns { string } Custom matching rule, which is used to determine whether to automatically execute the task.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 20
*/
onRequestCustomMatchRule(want: Want): string;
}
export default StartupConfigEntry;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.StartupListener.d.ts.md
# @ohos.app.appstartup.StartupListener.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The module defines the task listener used in [App Startup](docroot://application-models/app-startup.md).
*
* @file
* @kit AbilityKit
*/
import { BusinessError } from './@ohos.base';
/**
* The module defines the task listener used in [App Startup](docroot://application-models/app-startup.md).
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
declare class StartupListener {
/**
* Called when all startup tasks complete.
*
* @param { BusinessError<void> } error - Indicates the error during execution.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
onCompleted?(error: BusinessError<void>): void;
}
export default StartupListener;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.appstartup.startupManager.d.ts.md
# @ohos.app.appstartup.startupManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
import StartupConfig from './@ohos.app.appstartup.StartupConfig';
import common from './@ohos.app.ability.common';
/**
* The module provides the capability to manage startup tasks in
* [AppStartup](docroot://application-models/app-startup.md). The APIs of this module can be called only on the main
* thread.
*
* > **NOTE**
* >
* > This module supports .so file preloading since API version 18.
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
declare namespace startupManager {
/**
* Runs startup tasks or loads .so files.
*
* > **NOTE**
* >
* > This API cannot be used to run startup tasks defined in a feature-type HAP. To run those tasks, use
* > [startupManager.run]{@link startupManager.run(startupTasks: Array<string>, context: common.AbilityStageContext, config: StartupConfig)}
* > .
*
* @param { Array<string> } startupTasks - Array of [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask}
* names or names of .so files to be preloaded.
* @param { StartupConfig } [config] - Configuration for the timeout duration and listener of startup tasks in
* AppStartup.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 28800001 - Startup task or its dependency not found.
* @throws { BusinessError } 28800002 - The startup tasks have circular dependencies.
* @throws { BusinessError } 28800003 - An error occurred while running the startup tasks.
* @throws { BusinessError } 28800004 - Running startup tasks timeout.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
function run(startupTasks: Array<string>, config?: StartupConfig): Promise<void>;
/**
* Runs startup tasks or loads .so files. You can specify
* [AbilityStageContext]{@link ./application/AbilityStageContext:AbilityStageContext} for loading startup tasks. This
* API uses a promise to return the result.
*
* @param { Array<string> } startupTasks - Array of [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask}
* names or names of .so files to be preloaded.
* @param { common.AbilityStageContext } context - AbilityStage context that executes the
* [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask}. It is passed as an input parameter to
* [init]{@link @ohos.app.appstartup.StartupTask:StartupTask#init(context: AbilityStageContext)} of the task.
* @param { StartupConfig } config - Configuration for the timeout duration and listener of startup tasks in
* AppStartup.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 28800001 - Startup task or its dependency not found.
* @throws { BusinessError } 28800002 - The startup tasks have circular dependencies.
* @throws { BusinessError } 28800003 - An error occurred while running the startup tasks.
* @throws { BusinessError } 28800004 - Running startup tasks timeout.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 20
*/
function run(startupTasks: Array<string>, context: common.AbilityStageContext, config: StartupConfig): Promise<void>;
/**
* Removes all startup task results.
* If there are preloading tasks for .so files, the corresponding .so files is set to the unloaded state. However, .so
* files that have already been loaded in the cache will not be removed.
*
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
function removeAllStartupTaskResults(): void;
/**
* Obtains the execution result of a startup task or .so file preloading task.
*
* @param { string } startupTask - Name of the [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask} or
* name of the .so file to be preloaded.
* @returns { Object } Execution result of
* [init]{@link @ohos.app.appstartup.StartupTask:StartupTask#init(context: AbilityStageContext)} of the startup
* task if a startup task name is passed.
* <br>undefined if a .so file name is passed.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
function getStartupTaskResult(startupTask: string): Object;
/**
* Checks whether a startup task or .so file preloading task is initialized.
*
* @param { string } startupTask - Name of the [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask} or
* name of the .so file to be preloaded.
* @returns { boolean } Check result for whether the task is initialized. **true** if initialized, **false**
* otherwise.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
function isStartupTaskInitialized(startupTask: string): boolean;
/**
* Removes the initialization result of a startup task or .so file preloading task.
*
* - If a startup task name is passed, the initialization result of that startup task is removed.
* - If a .so file is passed, the .so file is set to the unloaded state, but the loaded .so file in the cache is not
* removed.
*
* @param { string } startupTask - Name of the [StartupTask]{@link @ohos.app.appstartup.StartupTask:StartupTask} or
* name of the .so file to be preloaded.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types.
* @syscap SystemCapability.Ability.AppStartup
* @stagemodelonly
* @since 12
*/
function removeStartupTaskResult(startupTask: string): void;
}
export default startupManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formBindingData.d.ts.md
# @ohos.app.form.formBindingData.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit FormKit
*/
/**
* The **FormBindingData** module provides APIs for widget data binding. You can use the APIs to create a
* **FormBindingData** object and obtain related information.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
declare namespace formBindingData {
/**
* Creates a **FormBindingData** object.
*
* @param { Object | string } [obj] - Data to be displayed on the widget. The value can be an object containing multiple
* key-value pairs or a JSON string. The image data is identified by **'formImages'**, and the content is multiple key-
* value pairs, each of which consists of an image identifier and image file descriptor. The final format is {'
* formImages': {'key1': fd1, 'key2': fd2}}.<br>**NOTE**<br>During
* [widget update](docroot://form/arkts-ui-widget-interaction-overview.md), when the widget UI receives widget data
* through @LocalStorageProp, the **FormBindingData** object is serialized, that is, the widget data is converted into
* the string type. Since API version 20, if the widget data is updated using shared memory, the total size of the
* updated data cannot exceed 10 MB, and the number of updated images cannot exceed 20. In API version 19 and earlier
* versions, the maximum number of image files is 5, and the maximum memory size of each image is 2 MB. Exceeding this
* 2 MB limit for any image will result in abnormal display.
* @returns { FormBindingData } **FormBindingData** object created based on the passed data.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function createFormBindingData(obj?: Object | string): FormBindingData;
/**
* Defines the createFormBindingData result interface.
*
* @typedef FormBindingData
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
interface FormBindingData {
/**
* Data for updating.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
data: Object;
/**
* proxies for updating.
*
* @syscap SystemCapability.Ability.Form
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
proxies?: Array<ProxyData>;
}
/**
* Defines the form proxy data.
*
* @typedef ProxyData
* @syscap SystemCapability.Ability.Form
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
interface ProxyData {
/**
* Key for proxy. The value depends on the data publisher.
*
* @syscap SystemCapability.Ability.Form
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
key: string;
/**
* SubscriberId. The value depends on the data publisher. The default value is current formId.
*
* @syscap SystemCapability.Ability.Form
* @StageModelOnly
* @atomicservice [since 11]
* @since 10
*/
subscriberId?: string;
}
}
export default formBindingData;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.FormEditExtensionAbility.d.ts.md
# @ohos.app.form.FormEditExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit FormKit
*/
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
import FormEditExtensionContext from './application/FormEditExtensionContext';
/**
* The **FormEditExtensionAbility** module, inherited from
* [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility}, provides the widget editing
* function.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @since 18
*/
declare class FormEditExtensionAbility extends UIExtensionAbility {
/**
* Indicates configuration information about a form edit extension ability context.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @since 18
*/
context: FormEditExtensionContext;
}
export default FormEditExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.FormExtensionAbility.d.ts.md
# @ohos.app.form.FormExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **FormExtensionAbility** module provides lifecycle callbacks invoked when a widget is created, destroyed, or
* updated.
*
* > **NOTE**
*
* > - The formExtensionAbility is cleared after 10 seconds of inactivity.
*
* > - The following modules cannot be referenced in the FormExtensionAbility, as doing so may cause the program to exit
* > abnormally:
* > - @ohos.ability.particleAbility (ParticleAbility)
* > - @ohos.multimedia.audio (Audio Management)
* > - @ohos.multimedia.camera (Camera Management)
* > - @ohos.multimedia.media (Media)
* > - @ohos.resourceschedule.backgroundTaskManager (Background Task Management)
*
* @file
* @kit FormKit
*/
import formBindingData from './@ohos.app.form.formBindingData';
import formInfo from './@ohos.app.form.formInfo';
import FormExtensionContext from './application/FormExtensionContext';
import Want from './@ohos.app.ability.Want';
import { Configuration } from './@ohos.app.ability.Configuration';
/**
* Widget extension class. It provides APIs to notify the widget provider that a widget is being created or the widget
* visibility status is being changed.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
declare class FormExtensionAbility {
/**
* Context of the FormExtensionAbility. This context is inherited from
* [ExtensionContext]{@link ./application/ExtensionContext:ExtensionContext}.
*
* This API can be used in atomic services since API version 11.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
context: FormExtensionContext;
/**
* Called to notify the widget provider that a widget is being created.
*
* @param { Want } want - Want information of the widget. You can set the **parameters** field to one or more values
* enumerated in [widget parameters]{@link @ohos.app.form.formInfo:formInfo.FormParam}, such as widget ID, widget name,
* and widget style. The information must be managed as persistent data to facilitate subsequent widget update and
* deletion.
* @returns { formBindingData.FormBindingData } A **formBindingData.FormBindingData** object containing the data to be
* displayed on the widget.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onAddForm(want: Want): formBindingData.FormBindingData;
/**
* Called to notify the widget provider that a temporary widget has been converted to a normal one. Temporary widgets
* and normal widgets are concepts of the widget host. Temporary widgets have a brief existence, appearing following
* particular events or user interactions and vanishing automatically upon task completion. Normal widgets maintain a
* lasting presence, continuing to exist unless explicitly removed or altered by the user. Function widgets developed
* in normal cases are normal widgets. Currently, the widget host does not use temporary widgets.
*
* @param { string } formId - ID of the widget that requests to be converted to a normal one.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onCastToNormalForm(formId: string): void;
/**
* Called to notify the widget provider that a widget is being updated, with update parameters carried. After
* obtaining the latest data, your application should call
* [updateForm]{@link @ohos.app.form.formProvider:formProvider.updateForm( formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback<void> )}
* of **formProvider** to update the widget data.
*
* @param { string } formId - ID of the widget that requests to be updated.
* @param { Record<string, Object> } [wantParams] - Parameters used for the update.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onUpdateForm(formId: string, wantParams?: Record<string, Object>): void;
/**
* Called to notify the widget provider that the widget visibility status is being changed.
* This API is valid only for system applications when **formVisibleNotify** is set to **true**.
*
* @param { object } newStatus - ID and visibility status of the widget to be changed. [since 9 - 10]
* @param { Record<string, number> } newStatus - ID and visibility status of the widget to be changed. [since 11]
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @since 9
*/
onChangeFormVisibility(newStatus: Record<string, number>): void;
/**
* Called to instruct the widget provider to process the widget event.
*
* @param { string } formId - ID of the widget that requests the event.
* @param { string } message - Event message.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onFormEvent(formId: string, message: string): void;
/**
* Called to notify the widget provider that a widget is being destroyed.
*
* @param { string } formId - ID of the widget to be destroyed.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onRemoveForm(formId: string): void;
/**
* Called when system configuration items change. The **onConfigurationUpdate** callback is triggered only when the
* FormExtensionAbility is alive. <!--Del-->Since API version 20, for system applications, the
* **onConfigurationUpdate** callback within the FormExtensionAbility will be triggered when the system language
* changes.<!--DelEnd-->
*
* @param { Configuration } newConfig - New configuration.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onConfigurationUpdate(newConfig: Configuration): void;
/**
* Called to notify the widget provider that the widget host is requesting the widget state. By default, the initial
* widget state is returned. (You can override this API as required.)
*
* @param { Want } want - Description of the widget state, including the bundle name, ability name, module name, and widget
* name.
* @returns { formInfo.FormState } Enumerated values of the current widget status.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice [since 11]
* @since 9
*/
onAcquireFormState?(want: Want): formInfo.FormState;
/**
* Called when the widget process of the widget provider exits.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 12
*/
onStop?(): void;
/**
* Called when the widget size changes.
*
* @param { string } formId - Widget ID.
* @param { formInfo.FormDimension } newDimension - Widget dimension. For example, **Dimension_1_2** indicates a 1 x 2
* widget.
* @param { formInfo.Rect } newRect - Widget position information, including the X and Y coordinates of the widget's top-
* left corner, as well as its width and height.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
onSizeChanged(formId: string, newDimension: formInfo.FormDimension, newRect: formInfo.Rect): void;
/**
* Called when the widget location changes.
*
* @param { string } formId - Widget ID.
* @param { formInfo.FormLocation } newFormLocation - Enumerated value of the latest widget location.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
onFormLocationChanged(formId: string, newFormLocation: formInfo.FormLocation): void;
}
export default FormExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formInfo.d.ts.md
# @ohos.app.form.formInfo.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit FormKit
*/
import Want from './@ohos.app.ability.Want';
/**
* The **formInfo** module provides types and enums related to the widget information and state.
*
* > **NOTE**
*
* > - This topic describes only system APIs provided by the module. For details about its public APIs, see
* > [@ohos.app.form.formInfo (formInfo)]{@link @ohos.app.form.formInfo:formInfo}.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
declare namespace formInfo {
/**
* Provides information about a form.
*
* @typedef FormInfo
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
interface FormInfo {
/**
* Obtains the bundle name of the application to which this form belongs.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
bundleName: string;
/**
* Obtains the name of the application module to which this form belongs.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
moduleName: string;
/**
* Obtains the class name of the ability to which this form belongs.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
abilityName: string;
/**
* Obtains the name of this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
name: string;
/**
* Obtains the display name of this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 11
*/
displayName: string;
/**
* Obtains the displayName resource id of this form.
* The value must be a positive integer.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 11
*/
displayNameId: number;
/**
* Obtains the description of this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
description: string;
/**
* Obtains the description id of this form.
* The value must be a positive integer.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
descriptionId: number;
/**
* Obtains the type of this form. Currently, JS forms are supported.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
type: FormType;
/**
* Obtains the JS component name of this JS form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
jsComponentName: string;
/**
* Obtains the color mode of this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
colorMode: ColorMode;
/**
* Checks whether this form is a default form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
isDefault: boolean;
/**
* Obtains the updateEnabled.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
updateEnabled: boolean;
/**
* Obtains whether notify visible of this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
formVisibleNotify: boolean;
/**
* Obtains the scheduledUpdateTime.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
scheduledUpdateTime: string;
/**
* Obtains the form config ability about this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
formConfigAbility: string;
/**
* Obtains the updateDuration.
* The value must be an integer within [0,336].
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
updateDuration: number;
/**
* Obtains the default grid style of this form.
* The value must be a positive integer, refer to {@link formInfo.FormDimension}.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
defaultDimension: number;
/**
* Obtains the grid styles supported by this form.
* The minimum length is 1, refer to {@link formInfo.FormDimension}.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
supportDimensions: Array<number>;
/**
* Obtains the custom data defined in this form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
customizeData: Record<string, string>;
/**
* Obtains whether this form is a dynamic form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
isDynamic: boolean;
/**
* Indicates whether the form can be set as a transparent background
*
* @default false
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 11
*/
transparencyEnabled: boolean;
/**
* Obtains the shape supported by this form.
* The minimum length is 1, refer to {@link formInfo.FormShape}.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
supportedShapes: Array<number>;
}
/**
* Type of form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
enum FormType {
/**
* JS form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
JS = 1,
/**
* eTS form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
eTS = 2
}
/**
* Color mode.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
enum ColorMode {
/**
* Automatic mode.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
MODE_AUTO = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
MODE_LIGHT = 1
}
/**
* Provides state information about a form.
*
* @typedef FormStateInfo
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
interface FormStateInfo {
/**
* Obtains the form state.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
formState: FormState;
/**
* Obtains the want form .
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
want: Want;
}
/**
* Provides state about a form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
enum FormState {
/**
* Indicates that the form status is unknown due to an internal error.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
UNKNOWN = -1,
/**
* Indicates that the form is in the default state.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
DEFAULT = 0,
/**
* Indicates that the form is ready.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
READY = 1
}
/**
* Form update reason.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 24
*/
enum FormUpdateReason {
/**
* The reason for the form update is unknown.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 24
*/
UNKNOWN = -1,
/**
* The reason for the form update is node reuse.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 24
*/
FORM_NODE_REUSE = 0
}
/**
* Enumerates widget parameters.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
enum FormParam {
/**
* Indicates the key specifying the ID of the form to be obtained, which is represented as
* want: {
* "parameters": {
* IDENTITY_KEY: "119476135"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
IDENTITY_KEY = "ohos.extra.param.key.form_identity",
/**
* Indicates the key specifying the grid style of the form to be obtained, which is represented as
* want: {
* "parameters": {
* DIMENSION_KEY: FormDimension.Dimension_1_2
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
DIMENSION_KEY = "ohos.extra.param.key.form_dimension",
/**
* Indicates the key specifying the name of the form to be obtained, which is represented as
* want: {
* "parameters": {
* NAME_KEY: "formName"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
NAME_KEY = "ohos.extra.param.key.form_name",
/**
* Indicates the key specifying the name of the module to which the form to be obtained belongs, which is
* represented as
* want: {
* "parameters": {
* MODULE_NAME_KEY: "formEntry"
* }
* }.
* This constant is mandatory.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
MODULE_NAME_KEY = "ohos.extra.param.key.module_name",
/**
* Indicates the key specifying the width of the form to be obtained, which is represented as
* want: {
* "parameters": {
* WIDTH_KEY: 800
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
WIDTH_KEY = "ohos.extra.param.key.form_width",
/**
* Indicates the key specifying the height of the form to be obtained, which is represented as
* want: {
* "parameters": {
* HEIGHT_KEY: 400
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
HEIGHT_KEY = "ohos.extra.param.key.form_height",
/**
* Indicates the key specifying whether a form is temporary, which is represented as
* want: {
* "parameters": {
* TEMPORARY_KEY: true
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
TEMPORARY_KEY = "ohos.extra.param.key.form_temporary",
/**
* Indicates the key specifying the name of the bundle to be obtained, which is represented as
* want: {
* "parameters": {
* BUNDLE_NAME_KEY: "bundleName"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
BUNDLE_NAME_KEY = "ohos.extra.param.key.bundle_name",
/**
* Indicates the key specifying the name of the ability to be obtained, which is represented as
* want: {
* "parameters": {
* ABILITY_NAME_KEY: "abilityName"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
ABILITY_NAME_KEY = "ohos.extra.param.key.ability_name",
/**
* Indicates the key specifying the launch reason of the form to be obtained, which is represented as
* want: {
* "parameters": {
* LAUNCH_REASON_KEY: LaunchReason.FORM_DEFAULT
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
LAUNCH_REASON_KEY = "ohos.extra.param.key.form_launch_reason",
/**
* Indicates the key specifying the custom data of the form to be obtained, which is represented as
* want: {
* "parameters": {
* PARAM_FORM_CUSTOMIZE_KEY: {
* "key": "userData"
* }
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
PARAM_FORM_CUSTOMIZE_KEY = "ohos.extra.param.key.form_customize",
/**
* Indicates the key specifying the form location, which is represented as
* want: {
* "parameters": {
* FORM_LOCATION_KEY: FormLocation.DESKTOP
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @since 12
*/
FORM_LOCATION_KEY = 'ohos.extra.param.key.form_location',
/**
* Indicates the key specifying the form rendering mode, which is represented as
* want: {
* "parameters": {
* FORM_RENDERING_MODE_KEY: FormRenderingMode.SINGLE_COLOR
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 12]
* @since 11
*/
FORM_RENDERING_MODE_KEY = 'ohos.extra.param.key.form_rendering_mode',
/**
* Indicates the key specifying the inverse of the host background color, which is represented as
* want: {
* "parameters": {
* HOST_BG_INVERSE_COLOR_KEY: "#FF000000"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
HOST_BG_INVERSE_COLOR_KEY = 'ohos.extra.param.key.host_bg_inverse_color',
/**
* Indicates the key specifying the user granted permission name, which is represented as
* want: {
* "parameters": {
* FORM_PERMISSION_NAME_KEY: "permissionName"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
FORM_PERMISSION_NAME_KEY = 'ohos.extra.param.key.permission_name',
/**
* Indicates the key specifying whether the user granted, which is represented as
* want: {
* "parameters": {
* FORM_PERMISSION_GRANTED_KEY: true
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
FORM_PERMISSION_GRANTED_KEY = 'ohos.extra.param.key.permission_granted',
/**
* Indicates the key specifying the original form id, used in conjunction with LaunchReason.FORM_SIZE_CHANGE.
* which is represented as
* want: {
* "parameters": {
* ORIGINAL_FORM_KEY: "119476135"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
ORIGINAL_FORM_KEY = 'ohos.extra.param.key.original_form_id',
/**
* Indicates the key specifying the edit form id, used in conjunction with LaunchReason.FORM_EDIT_PREVIEW.
* which is represented as
* want: {
* "parameters": {
* EDIT_FORM_KEY: "119476135"
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 22
*/
EDIT_FORM_KEY = 'ohos.extra.param.key.edit_form_id',
/**
* Indicates the key specifying the reason for the form update.
* which is represented as
* want: {
* "parameters": {
* UPDATE_FORM_REASON_KEY: FormUpdateReason.FORM_NODE_REUSE
* }
* }.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 24
*/
UPDATE_FORM_REASON_KEY = 'ohos.extra.param.key.update_form_reason'
}
/**
* The optional options used as filters to ask
* getFormsInfo to return formInfos from only forms that match the options.
*
* @typedef FormInfoFilter
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
interface FormInfoFilter {
/**
* optional moduleName that used to ask getFormsInfo to return
* form infos with the same moduleName.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
moduleName?: string;
}
/**
* Defines the FormDimension enum.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
enum FormDimension {
/**
* 1 x 2 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
Dimension_1_2 = 1,
/**
* 2 x 2 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
Dimension_2_2 = 2,
/**
* 2 x 4 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
Dimension_2_4 = 3,
/**
* 4 x 4 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
Dimension_4_4 = 4,
/**
* 2 x 1 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
* @deprecated since 20
*/
Dimension_2_1,
/**
* 1 x 1 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 11
*/
DIMENSION_1_1 = 6,
/**
* 6 x 4 form
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
DIMENSION_6_4 = 7,
/**
* 2 x 3 form used for wearable devices
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 18
*/
DIMENSION_2_3 = 8,
/**
* 3 x 3 form used for wearable devices
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 18
*/
DIMENSION_3_3 = 9
}
/**
* Defines the FormShape enum.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
enum FormShape {
/**
* The rect shape.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
RECT = 1,
/**
* The circle shape.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 12
*/
CIRCLE = 2
}
/**
* The visibility of a form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
enum VisibilityType {
/**
* Indicates the type of the form type is unknown.
* Often used as a condition variable in function OnVisibilityChange to specify actions only on forms that are
* changing to unknown.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
UNKNOWN = 0,
/**
* Indicates the type of the form is visible.
* Often used as a condition variable in function OnVisibilityChange to specify actions only on forms that are
* changing to visible.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
FORM_VISIBLE = 1,
/**
* Indicates the type of the form is invisible.
* Often used as a condition variable in function OnVisibilityChange to specify actions only on forms that are
* changing to invisible.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
FORM_INVISIBLE = 2
}
/**
* Indicates the launch reason of a form.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
enum LaunchReason {
/**
* Indicates the launch reason of a form is default.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
FORM_DEFAULT = 1,
/**
* Indicates the launch reason of a form is share.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 10
*/
FORM_SHARE = 2,
/**
* Indicates the launch reason of a form is change size.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
FORM_SIZE_CHANGE = 3
}
/**
* The class of a running form information.
*
* @typedef RunningFormInfo
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
interface RunningFormInfo {
/**
* Obtains the id of the this form.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly formId: string;
/**
* Obtains the bundle name of the application to which this form belongs.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly bundleName: string;
/**
* The location of this form.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly formLocation: FormLocation;
/**
* Obtains the name of the application module to which this form belongs.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly moduleName: string;
/**
* Obtains the class name of the ability to which this form belongs.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly abilityName: string;
/**
* Obtains the name of this form.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly formName: string;
/**
* Obtains the grid style of this form.
* The value must be a positive integer, refer to {@link formInfo.FormDimension}.
*
* @default -
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
readonly dimension: number;
}
/**
* Enumerates the widget locations.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
enum FormLocation {
/**
* The widget is located on the home screen.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
DESKTOP = 0,
/**
* The widget is located in the widget center of the home screen.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
FORM_CENTER = 1,
/**
* The widget is located in the widget manager of the home screen.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
FORM_MANAGER = 2,
/**
* The widget is located on the minus 1 screen.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
NEGATIVE_SCREEN = 3,
/**
* The widget is located on the locked screen.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
SCREEN_LOCK = 6,
/**
* The widget is located in the area of AI Suggestions.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
AI_SUGGESTION = 7,
/**
* The widget is located on landscape standby screen.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 23
*/
STANDBY = 8
}
/**
* Provides OverflowInfo about funInteraction or sceneAnimation form
*
* @typedef { OverflowInfo }
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
interface OverflowInfo {
/**
* The overflow animation area
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
area: Rect;
/**
* The overflow animation duration, unit is ms
* Unit: milliseconds, The value must be an integer within [0,3500].
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
duration: number;
/**
* Whether use default animation, default is true
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
useDefaultAnimation?: boolean;
}
/**
* Indicates rectangle, unit is vp.
*
* @typedef Rect
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
interface Rect {
/**
* The left position of Rect
* Unit: vp.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
left: number;
/**
* The top position of Rect
* Unit: vp.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
top: number;
/**
* The width of Rect
* Unit: vp.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
width: number;
/**
* The height of Rect
* Unit: vp.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
height: number;
}
}
export default formInfo;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.formProvider.d.ts.md
# @ohos.app.form.formProvider.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit FormKit
*/
import { AsyncCallback } from './@ohos.base';
import formBindingData from './@ohos.app.form.formBindingData';
import formInfo from './@ohos.app.form.formInfo';
import Want from './@ohos.app.ability.Want';
import type UIAbilityContext from './application/UIAbilityContext';
/**
* The **formProvider** module provides APIs to obtain widget information, update widgets, and set the update time.
*
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
declare namespace formProvider {
/**
* Sets the next refresh time for a widget. This API uses an asynchronous callback to return the result.
*
* @param { string } formId - Widget ID.
* @param { number } minute - Time after which a widget is updated. The value is greater than or equal to 5, in minutes.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void;
/**
* Sets the next refresh time for a widget. This API uses a promise to return the result.
*
* @param { string } formId - Widget ID.
* @param { number } minute - Time after which a widget is updated. The value is greater than or equal to 5, in minutes.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function setFormNextRefreshTime(formId: string, minute: number): Promise<void>;
/**
* Updates a widget. This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > Starting from API version 20, when widget refresh data is updated via shared memory, the total size of the
* > refreshed data must not exceed 10 MB, and the number of refreshed images must not exceed 20. For API version 19
* > and earlier versions, the upper limit for image files is 5, with a per-image memory limit of 2 MB. Any images
* > that exceed these limits will display abnormally.
*
* @param { string } formId - ID of the widget to update.
* @param { formBindingData.FormBindingData } formBindingData - Data to be used for the update.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback<void>): void;
/**
* Updates a widget. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > Starting from API version 20, when widget refresh data is updated via shared memory, the total size of the
* > refreshed data must not exceed 10 MB, and the number of refreshed images must not exceed 20. For API version 19
* > and earlier versions, the upper limit for image files is 5, with a per-image memory limit of 2 MB. Any images
* > that exceed these limits will display abnormally.
*
* @param { string } formId - ID of the widget to update.
* @param { formBindingData.FormBindingData } formBindingData - Data to be used for the update.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>;
/**
* Obtains the application's widget information that meets a filter criterion on the device. This API uses an
* asynchronous callback to return the result.
*
* @param { formInfo.FormInfoFilter } filter - Filter criterion.
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback used to return the information obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function getFormsInfo(filter: formInfo.FormInfoFilter, callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
/**
* Obtains the application's widget information on the device. This API uses an asynchronous callback to return the
* result.
*
* @param { AsyncCallback<Array<formInfo.FormInfo>> } callback - Callback used to return the information obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function getFormsInfo(callback: AsyncCallback<Array<formInfo.FormInfo>>): void;
/**
* Obtains information about widgets that meet the criteria of the current application. This API uses a promise to
* return the result.
*
* @param { formInfo.FormInfoFilter } [filter] - Filter criterion. By default, no value is passed, indicating that no
* filtering is performed.
* @returns { Promise<Array<formInfo.FormInfo>> } Promise used to return the information obtained.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice [since 11]
* @since 9
*/
function getFormsInfo(filter?: formInfo.FormInfoFilter): Promise<Array<formInfo.FormInfo>>;
/**
* Obtains the information of the widget that has been added to the home screen on the device. This API uses a promise
* to return the result.
*
* > **NOTE**
* >
* > This field is supported since API version 18 and deprecated since API version 20. You are advised to use
* > [getPublishedRunningFormInfoById]{@link formProvider.getPublishedRunningFormInfoById} instead.
*
* @param { string } formId - Widget ID.
* @returns { Promise<formInfo.FormInfo> } Promise used to return the information obtained.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 18
* @deprecated since 20
* @useinstead formProvider.getPublishedRunningFormInfoById
*/
function getPublishedFormInfoById(formId: string): Promise<formInfo.FormInfo>;
/**
* Obtains the information of all widgets that have been added to the home screen on the device. This API uses a
* promise to return the result.
*
* > **NOTE**
* >
* > This field is supported since API version 18 and deprecated since API version 20. You are advised to use
* > [getPublishedRunningFormInfos]{@link formProvider.getPublishedRunningFormInfos} instead.
*
* @returns { Promise<Array<formInfo.FormInfo>> } Promise used to return the information obtained.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 18
* @deprecated since 20
* @useinstead formProvider.getPublishedRunningFormInfos
*/
function getPublishedFormInfos(): Promise<Array<formInfo.FormInfo>>;
/**
* Obtains the information of a specified widget that has been added to the home screen. This API uses a promise to
* return the result.
*
* @param { string } formId - Widget ID.
* @returns { Promise<formInfo.RunningFormInfo> } Promise used to return the information about the widgets that meet the
* requirements, including the widget name and dimension.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
function getPublishedRunningFormInfoById(formId: string): Promise<formInfo.RunningFormInfo>;
/**
* Obtains information about all widgets that have been added to the home screen. This API uses a promise to return
* the result.
*
* @returns { Promise<Array<formInfo.RunningFormInfo>> } Promise used to return the information about widgets that meet the
* requirements.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
function getPublishedRunningFormInfos(): Promise<Array<formInfo.RunningFormInfo>>;
/**
* Opens the Widget Manager page of the current application.
*
* @param { Want } want - Parameter that must contain the following fields:<br>**bundleName**: bundle name of widget.<br>
* **abilityName**: ability name of the widget.<br>**parameters**:<br>- **ohos.extra.param.key.form_dimension**:
* [Widget dimension]{@link @ohos.app.form.formInfo:formInfo.FormDimension}.<br>- **ohos.extra.param.key.form_name**:
* Widget name.<br>- **ohos.extra.param.key.module_name**: module name of the widget.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 18
*/
function openFormManager(want: Want): void;
/**
* Opens the widget editing page.
*
* @param { string } abilityName - Ability name on the editing page.
* @param { string } formId - Widget ID.
* @param { boolean } [isMainPage] - Whether the page is the main editing page.<br>- **true**: The page is the main
* editing page.<br>- **false**: The page is not the main editing page.<br>Default value: **true**.
* @throws { BusinessError } 801 - Capability not supported.function openFormEditAbility cannot work correctly due to
* limited device capabilities.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @throws { BusinessError } 16501007 - Form is not trust.
* @syscap SystemCapability.Ability.Form
* @since 18
*/
function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void;
/**
* Requests an animation. This API takes effect only for
* [scene-based widgets](docroot://form/arkts-ui-widget-configuration.md#sceneanimationparams-field). This API uses a
* promise to return the result.
*
* > **NOTE**
* >
*
* @param { string } formId - Widget ID.
* @param { formInfo.OverflowInfo } overflowInfo - Animation request parameter information.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported.function requestOverflow can
* not work correctly due to limited device capabilities.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @throws { BusinessError } 16501011 - The form cannot support this operation.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
function requestOverflow(formId: string, overflowInfo: formInfo.OverflowInfo): Promise<void>;
/**
* Cancels an animation. This API takes effect only for
* [scene-based widgets](docroot://form/arkts-ui-widget-configuration.md#sceneanimationparams-field). This API uses a
* promise to return the result.
*
* @param { string } formId - Widget ID.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported.function cancelOverflow can
* not work correctly due to limited device capabilities.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @throws { BusinessError } 16501011 - The form cannot support this operation.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
function cancelOverflow(formId: string): Promise<void>;
/**
* Obtains the position and dimension of a widget. This API uses a promise to return the result.
*
* @param { string } formId - Widget ID.
* @returns { Promise<formInfo.Rect> } Promise used to return the position and dimension of the widget relative to the
* upper-left corner of the screen, in vp.
* @throws { BusinessError } 801 - Capability not supported.function getFormRect cannot work correctly
* due to limited device capabilities.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16500060 - Service connection error.
* @throws { BusinessError } 16500100 - Failed to obtain the configuration information.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist.
* @throws { BusinessError } 16501003 - The form cannot be operated by the current application.
* @syscap SystemCapability.Ability.Form
* @atomicservice
* @since 20
*/
function getFormRect(formId: string): Promise<formInfo.Rect>;
/**
* Reloads widgets. For widgets with the same **moduleName**, **abilityName**, and **formName** of the current
* application, each widget has a different widget ID after being added to the home screen for multiple times. Widget
* providers can use this API to batch update widgets that have different IDs but share the same **moduleName**,
* **abilityName**, and **formName**. Invoked in the main process of the application, this API notifies the
* FormExtension process to perform batch updates. It can only be called within a
* [UIAbility]{@link @ohos.app.ability.UIAbility} and uses a promise to return the result.
*
* @param { UIAbilityContext } context - [UIAbility]{@link @ohos.app.ability.UIAbility} context, which is used for
* verification.
* @param { string } moduleName - Module name of the widget.
* @param { string } abilityName - Ability name of the widget.
* @param { string } formName - Name of the widget configured in
* [form_config.json](docroot://form/arkts-ui-widget-configuration.md#fields-in-configuration-file).
* @returns { Promise<number> } Promise used to return the number of widgets requested for update.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 22
*/
function reloadForms(context: UIAbilityContext, moduleName: string, abilityName: string, formName: string): Promise<number>;
/**
* Reloads all widgets. Invoked in the main process of the application, this API notifies the FormExtension process to
* perform batch updates of all widgets added to the current application. It can only be called within a
* [UIAbility]{@link @ohos.app.ability.UIAbility} and uses a promise to return the result.
*
* @param { UIAbilityContext } context - [UIAbility]{@link @ohos.app.ability.UIAbility} context, which is used for
* verification.
* @returns { Promise<number> } Promise used to return the number of widgets requested for update.
* @throws { BusinessError } 16501000 - An internal functional error occurred.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 22
*/
function reloadAllForms(context: UIAbilityContext): Promise<number>;
/**
* Closes the widget editing page.
*
* @param { boolean } [isMainPage] - Whether to close the main editing page. The value **true** means closing the main
* editing page, and **false** means closing a non-main editing page.<br>Default value: **true**.
* @throws { BusinessError } 801 - Capability not supported due to limited device capabilities.
* @throws { BusinessError } 16500050 - IPC connection error.
* @throws { BusinessError } 16501015 - Cannot close the widget editing page opened by other apps.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @since 23
*/
function closeFormEditAbility(isMainPage?: boolean): void;
}
export default formProvider;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.app.form.LiveFormExtensionAbility.d.ts.md
# @ohos.app.form.LiveFormExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **LiveFormExtensionAbility** module, inherited from
* [ExtensionAbility]{@link @ohos.app.ability.ExtensionAbility:ExtensionAbility}, provides interactive widget functions,
* including creating and destroying interactive widgets.
*
* > **NOTE**
*
* > Exceptions may occur if some APIs are called. For details about the API list, see
* > [Appendix](docroot://reference/apis-form-kit/js-apis-app-form-LiveFormExtensionAbility.md#appendix).
*
* @file
* @kit FormKit
*/
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
import LiveFormExtensionContext from './application/LiveFormExtensionContext';
import type UIExtensionContentSession from './@ohos.app.ability.UIExtensionContentSession';
import formInfo from './@ohos.app.form.formInfo';
/**
* Provides information about a live form.
* @typedef { LiveFormInfo }
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
export interface LiveFormInfo {
/**
* The form id of the live form.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
formId: string;
/**
* The live form display area.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
rect: formInfo.Rect;
/**
* The form border radius.
* Unit: vp, The value must be greater than or equal to 0.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
borderRadius: number;
}
/**
* Interactive widget extension class. It provides APIs for the widget provider to receive notifications about widget
* creation and destruction.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
declare class LiveFormExtensionAbility extends ExtensionAbility {
/**
* Context of the **LiveFormExtensionAbility**. This context is inherited from
* [ExtensionContext]{@link ./application/ExtensionContext:ExtensionContext}.
*
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
context: LiveFormExtensionContext;
/**
* Called after the UI content of **LiveFormExtensionAbility** is created.
*
* @param { LiveFormInfo } liveFormInfo - Interactive widget information, including the widget ID.
* @param { UIExtensionContentSession } session - UI information.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
onLiveFormCreate(liveFormInfo: LiveFormInfo, session: UIExtensionContentSession): void;
/**
* Called to clear resources when this **LiveFormExtensionAbility** is destroyed.
*
* @param { LiveFormInfo } liveFormInfo - Interactive widget information, including the widget ID.
* @syscap SystemCapability.Ability.Form
* @stagemodelonly
* @atomicservice
* @since 20
*/
onLiveFormDestroy(liveFormInfo: LiveFormInfo): void;
}
export default LiveFormExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.abilityDelegatorRegistry.d.ts.md
# @ohos.application.abilityDelegatorRegistry.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
import { AbilityDelegator } from './application/AbilityDelegator';
import { AbilityDelegatorArgs } from './application/abilityDelegatorArgs';
/**
* The **AbilityDelegatorRegistry** module provides APIs for storing global registers of the registered
* [AbilityDelegator]{@link ./application/AbilityDelegator:AbilityDelegator} and
* [AbilityDelegatorArgs]{@link ./application/abilityDelegatorArgs:AbilityDelegatorArgs} objects, including obtaining
* the **AbilityDelegator** and **AbilityDelegatorArgs** objects. The APIs can be used only in the test framework.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry
*/
declare namespace abilityDelegatorRegistry {
/**
* Obtains the **AbilityDelegator** object of the application.
*
* @returns { AbilityDelegator } [AbilityDelegator]{@link ./application/AbilityDelegator:AbilityDelegator} object,
* which can be used to schedule functions related to the test framework.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.getAbilityDelegator
*/
function getAbilityDelegator(): AbilityDelegator;
/**
* Obtains the **AbilityDelegatorArgs** object of the application.
*
* @returns { AbilityDelegatorArgs }
* [AbilityDelegatorArgs]{@link ./application/abilityDelegatorArgs:AbilityDelegatorArgs} object, which can be used
* to obtain test parameters.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.getArguments
*/
function getArguments(): AbilityDelegatorArgs;
/**
* Enumerates the ability lifecycle states.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState
*/
export enum AbilityLifecycleState {
/**
* The ability is in an invalid state.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState.UNINITIALIZED
*/
UNINITIALIZED = 0,
/**
* The ability is created.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState.CREATE
*/
CREATE = 1,
/**
* The ability is running in the foreground.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState.FOREGROUND
*/
FOREGROUND = 2,
/**
* The ability is running in the background.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState.BACKGROUND
*/
BACKGROUND = 3,
/**
* The ability is destroyed.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.ability.abilityDelegatorRegistry:abilityDelegatorRegistry.AbilityLifecycleState.DESTROY
*/
DESTROY = 4
}
}
export default abilityDelegatorRegistry;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.AccessibilityExtensionAbility.d.ts.md
# @ohos.application.AccessibilityExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **AccessibilityExtensionAbility** module provides accessibility extension capabilities based on the
* ExtensionAbility framework.
*
* @file
* @kit AccessibilityKit
*/
import type accessibility from './@ohos.accessibility';
import type { KeyEvent } from './@ohos.multimodalInput.keyEvent';
import type { AccessibilityElement as _AccessibilityElement, ElementAttributeValues as _ElementAttributeValues, FocusDirection as _FocusDirection, FocusType as _FocusType, WindowType as _WindowType, Rect as _Rect } from './application/AccessibilityExtensionContext';
import type * as _AccessibilityExtensionContext from './application/AccessibilityExtensionContext';
/**
* Indicates an accessibility element. For details, see
* [AccessibilityElement]{@link ./application/AccessibilityExtensionContext:AccessibilityElement}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type AccessibilityElement = _AccessibilityElement;
/**
* Provides attribute names and value types of a node element. For details, see
* [ElementAttributeValues]{@link ./application/AccessibilityExtensionContext:ElementAttributeValues}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type ElementAttributeValues = _ElementAttributeValues;
/**
* Enumerates the focus directions. For details, see
* [FocusDirection]{@link ./application/AccessibilityExtensionContext:FocusDirection}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type FocusDirection = _FocusDirection;
/**
* Describes the attribute name of
* [ElementAttributeValues]{@link ./application/AccessibilityExtensionContext:ElementAttributeValues}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type ElementAttributeKeys = keyof ElementAttributeValues;
/**
* Enumerates the focus types. For details, see [FocusType]{@link ./application/AccessibilityExtensionContext:FocusType}
* .
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type FocusType = _FocusType;
/**
* Enumerates the window types. For details, see
* [WindowType]{@link ./application/AccessibilityExtensionContext:WindowType}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type WindowType = _WindowType;
/**
* Defines a rectangle. For details, see [Rect]{@link ./application/AccessibilityExtensionContext:Rect}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type Rect = _Rect;
/**
* Defines the context of the accessibility extension. For details, see
* [AccessibilityExtensionContext]{@link ./application/AccessibilityExtensionContext}.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 10
*/
export type AccessibilityExtensionContext = _AccessibilityExtensionContext.default;
/**
* The **AccessibilityExtensionAbility** module provides accessibility extension capabilities based on the
* ExtensionAbility framework.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
declare class AccessibilityExtensionAbility {
/**
* Context of the accessibility extension ability.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
context: AccessibilityExtensionContext;
/**
* Called when the **AccessibilityExtensionAbility** is enabled and connected to the system service. In this API, you
* can have the service logic initialized. This API can be overridden as required.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
onConnect(): void;
/**
* Called when the **AccessibilityExtensionAbility** is disabled and disconnected from the system service. In this API
* , you can implement the service logic of resource release and exit. This API can be overridden as required.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
onDisconnect(): void;
/**
* Called when an event that matches the specified bundle and event type occurs. In this API, you can implement event-
* specific service logic. Generally, this API needs to be overridden.
*
* @param { AccessibilityEvent } event - Accessibility event. No return value.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
onAccessibilityEvent(event: AccessibilityEvent): void;
/**
* Called when a physical key is pressed. In this API, you can determine whether to consume the event based on the
* service.
*
* @param { KeyEvent } keyEvent - Key event. If **true** is returned, the key is consumed.
* @returns { boolean } Returns **true** if the event is consumed and will not be transferred;<br>returns **false** if
* the event is not consumed and will be transferred.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
* @deprecated since 12
*/
onKeyEvent(keyEvent: KeyEvent): boolean;
}
export default AccessibilityExtensionAbility;
/**
* Defines an accessibility event.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
export declare interface AccessibilityEvent {
/**
* Event type.
*
* **EventType**: accessibility event type.
*
* **WindowUpdateType**: window update type.
*
* **TouchGuideType**: touch guide type.
*
* **GestureType**: gesture type.
*
* **PageUpdateType**: page update type.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
eventType: accessibility.EventType | accessibility.WindowUpdateType | TouchGuideType | GestureType | PageUpdateType;
/**
* Target component where the event occurs.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
target?: AccessibilityElement;
/**
* Timestamp of the event, in milliseconds. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
timeStamp?: number;
/**
* Component ID for auto-focusing. The default value is **0**.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
elementId?: number;
/**
* Content for auto-broadcasting. Set the broadcast content based on the actual scenario. No special restrictions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 12
*/
textAnnouncedForAccessibility?: string;
/**
* Added or deleted text content carried by the **TextArea**, **TextInput**, **SearchField**, or **RichEdit**
* component. Set this parameter based on site requirements. No special restrictions.
*
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 20
*/
extraInfo?: string;
}
/**
* Enumerates gesture types.
*
* @unionmember { 'left' } Left gesture.
* @unionmember { 'leftThenRight' } Left-then-right gesture.
* @unionmember { 'leftThenUp' } Left-then-up gesture.
* @unionmember { 'leftThenDown' } Left-then-down gesture.
* @unionmember { 'right' } Right gesture.
* @unionmember { 'rightThenLeft' } Right-then-left gesture.
* @unionmember { 'rightThenUp' } Right-then-up gesture.
* @unionmember { 'rightThenDown' } Right-then-down gesture.
* @unionmember { 'up' } Up gesture.
* @unionmember { 'upThenLeft' } Up-then-left gesture.
* @unionmember { 'upThenRight' } Up-then-right gesture.
* @unionmember { 'upThenDown' } Up-then-down gesture.
* @unionmember { 'down' } Down gesture.
* @unionmember { 'downThenLeft' } Down-then-left gesture.
* @unionmember { 'downThenRight' } Down-then-right gesture.
* @unionmember { 'downThenUp' } Down-then-up gesture.
* @unionmember { 'twoFingerSingleTap' } Two-finger single-tap gesture. [since 11]
* @unionmember { 'twoFingerDoubleTap' } Two-finger double-tap gesture. [since 11]
* @unionmember { 'twoFingerDoubleTapAndHold' } Two-finger double-tap-and-hold gesture. [since 11]
* @unionmember { 'twoFingerTripleTap' } Two-finger triple-tap gesture. [since 11]
* @unionmember { 'twoFingerTripleTapAndHold' } Two-finger triple-tap-and-hold gesture. [since 11]
* @unionmember { 'threeFingerSingleTap' } Three-finger single-tap gesture. [since 11]
* @unionmember { 'threeFingerDoubleTap' } Three-finger double-tap gesture. [since 11]
* @unionmember { 'threeFingerDoubleTapAndHold' } Three-finger double-tap-and-hold gesture. [since 11]
* @unionmember { 'threeFingerTripleTap' } Three-finger triple-tap gesture. [since 11]
* @unionmember { 'threeFingerTripleTapAndHold' } Three-finger triple-tap-and-hold gesture. [since 11]
* @unionmember { 'fourFingerSingleTap' } Four-finger single-tap gesture. [since 11]
* @unionmember { 'fourFingerDoubleTap' } Four-finger double-tap gesture. [since 11]
* @unionmember { 'fourFingerDoubleTapAndHold' } Four-finger double-tap-and-hold gesture. [since 11]
* @unionmember { 'fourFingerTripleTap' } Four-finger triple-tap gesture. [since 11]
* @unionmember { 'fourFingerTripleTapAndHold' } Four-finger triple-tap-and-hold gesture. [since 11]
* @unionmember { 'threeFingerSwipeUp' } Three-finger swipe-up gesture. [since 11]
* @unionmember { 'threeFingerSwipeDown' } Three-finger swipe-down gesture. [since 11]
* @unionmember { 'threeFingerSwipeLeft' } Three-finger swipe-left gesture. [since 11]
* @unionmember { 'threeFingerSwipeRight' } Three-finger swipe-right gesture. [since 11]
* @unionmember { 'fourFingerSwipeUp' } Four-finger swipe-up gesture. [since 11]
* @unionmember { 'fourFingerSwipeDown' } Four-finger swipe-down gesture. [since 11]
* @unionmember { 'fourFingerSwipeLeft' } Four-finger swipe-left gesture. [since 11]
* @unionmember { 'fourFingerSwipeRight' } Four-finger swipe-right gesture. [since 11]
* @unionmember {'oneFingerDoubleTap'} [since 26.0.0]
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @stagemodelonly
* @since 9
*/
type GestureType = 'left' | 'leftThenRight' | 'leftThenUp' | 'leftThenDown' | 'right' | 'rightThenLeft' | 'rightThenUp' | 'rightThenDown' | 'up' | 'upThenLeft' | 'upThenRight' | 'upThenDown' | 'down' | 'downThenLeft' | 'downThenRight' | 'downThenUp' | 'twoFingerSingleTap' | 'twoFingerDoubleTap' | 'twoFingerDoubleTapAndHold' | 'twoFingerTripleTap' | 'twoFingerTripleTapAndHold' | 'threeFingerSingleTap' | 'threeFingerDoubleTap' | 'threeFingerDoubleTapAndHold' | 'threeFingerTripleTap' | 'threeFingerTripleTapAndHold' | 'fourFingerSingleTap' | 'fourFingerDoubleTap' | 'fourFingerDoubleTapAndHold' | 'fourFingerTripleTap' | 'fourFingerTripleTapAndHold' | 'threeFingerSwipeUp' | 'threeFingerSwipeDown' | 'threeFingerSwipeLeft' | 'threeFingerSwipeRight' | 'fourFingerSwipeUp' | 'fourFingerSwipeDown' | 'fourFingerSwipeLeft' | 'fourFingerSwipeRight' | 'oneFingerDoubleTap';
/**
* Enumerates the page update types.
*
* @unionmember { 'pageContentUpdate' } Update of the page content.
* @unionmember { 'pageStateUpdate' } Update of the page status.
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
type PageUpdateType = 'pageContentUpdate' | 'pageStateUpdate';
/**
* Enumerates the touch guide event types.
*
* @unionmember { 'touchBegin' } Start of touch.
* @unionmember { 'touchEnd' } End of touch.
* @unionmember { 'touchGuideGesture' } Event indicating the touchGuide gesture. [since 26.0.0]
* @syscap SystemCapability.BarrierFree.Accessibility.Core
* @since 9
*/
type TouchGuideType = 'touchBegin' | 'touchEnd' | 'touchGuideGesture';
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.appManager.d.ts.md
# @ohos.application.appManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
import { AsyncCallback } from './@ohos.base';
import { ProcessRunningInfo } from './application/ProcessRunningInfo';
/**
* The appManager module provides APIs for application management. For example, you can query whether the system is
* undergoing a stability test, determine whether the device is RAM-constrained, obtain the maximum memory available to
* the current application, and retrieve information about running processes.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager
*/
declare namespace appManager {
/**
* Checks whether the system is undergoing a stability test. This API uses an asynchronous callback to return the
* result.
*
* > **NOTE**
* >
* > A stability test scenario refers to a specific testing environment designed to verify application reliability
* > under complex, extreme, or long-term operating conditions.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the API call result and the result indicating
* whether the system is undergoing a stability test. You can perform error handling or custom processing in this
* callback. **true** if the system is undergoing a stability test, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#isRunningInStabilityTest
*/
function isRunningInStabilityTest(callback: AsyncCallback<boolean>): void;
/**
* Checks whether the system is undergoing a stability test. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > A stability test scenario refers to a specific testing environment designed to verify application reliability
* > under complex, extreme, or long-term operating conditions.
*
* @returns { Promise<boolean> } Promise used to return the API call result and the result indicating whether the system is
* undergoing a stability test. You can perform error handling or custom processing in this callback. **true** if the
* system is undergoing a stability test, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#isRunningInStabilityTest
*/
function isRunningInStabilityTest(): Promise<boolean>;
/**
* Obtains information about the running processes. This API uses a promise to return the result.
*
* > This API is deprecated since API version 9. You are advised to use
* > [appManager.getRunningProcessInformation]{@link @ohos.app.ability.appManager:appManager.getRunningProcessInformation()}
* > instead.
*
* @permission ohos.permission.GET_RUNNING_INFO
* @returns { Promise<Array<ProcessRunningInfo>> } Promise used to return the information about the running processes.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#getRunningProcessInformation
*/
function getProcessRunningInfos(): Promise<Array<ProcessRunningInfo>>;
/**
* Obtains information about the running processes. This API uses an asynchronous callback to return the result.
*
* > This API is deprecated since API version 9. You are advised to use
* > [appManager.getRunningProcessInformation]{@link @ohos.app.ability.appManager:appManager.getRunningProcessInformation()}
* > instead.
*
* @permission ohos.permission.GET_RUNNING_INFO
* @param { AsyncCallback<Array<ProcessRunningInfo>> } callback - Callback used to return the information about the running
* processes.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#getRunningProcessInformation
*/
function getProcessRunningInfos(callback: AsyncCallback<Array<ProcessRunningInfo>>): void;
/**
* Checks whether the current device is a RAM-constrained device (a device with severely limited memory resources).
* This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the API call result and the result indicating whether the device is
* RAM-constrained. You can perform error handling or custom processing in this callback. **true** if the device is RAM
* -constrained, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#isRamConstrainedDevice
*/
function isRamConstrainedDevice(): Promise<boolean>;
/**
* Checks whether the current device is a RAM-constrained device (a device with severely limited memory resources).
* This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<boolean> } callback - Callback used to return the API call result and the result indicating
* whether the device is RAM-constrained. You can perform error handling or custom processing in this callback.
* **true** if the device is RAM-constrained, **false** otherwise.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#isRamConstrainedDevice
*/
function isRamConstrainedDevice(callback: AsyncCallback<boolean>): void;
/**
* Obtains the maximum memory (RAM allocation) available to the current application. This API uses a promise to return
* the result.
*
* @returns { Promise<number> } Promise used to return the maximum memory (RAM allocation) size, in MB. You can perform
* error processing or other custom processing based on the size.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#getAppMemorySize
*/
function getAppMemorySize(): Promise<number>;
/**
* Obtains the maximum memory (RAM allocation) available to the current application. This API uses an asynchronous
* callback to return the result.
*
* @param { AsyncCallback<number> } callback - Callback used to return the maximum memory (RAM allocation) size, in MB. You
* can perform error processing or other custom processing based on the size.
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 7
* @deprecated since 9
* @useinstead ohos.app.ability.appManager/appManager#getAppMemorySize
*/
function getAppMemorySize(callback: AsyncCallback<number>): void;
}
export default appManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.BackupExtensionAbility.d.ts.md
# @ohos.application.BackupExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit CoreFileKit
*/
import type BackupExtensionContext from './@ohos.file.BackupExtensionContext';
/**
* Describe bundle version
*
* @interface BundleVersion
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 10
*/
export interface BundleVersion {
/**
* Indicates bundle's version code.
*
* @type { number }
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @stagemodelonly
* @since 10
*/
code: number;
/**
* Indicates bundle's version name.
*
* @type { string }
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 10
*/
name: string;
}
/**
* Class to be override for backup extension ability.
*
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 10
*/
declare class BackupExtensionAbility {
/**
* Indicates backup extension ability context.
*
* @type { ExtensionContext }
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 11
*/
/**
* Indicates backup extension ability context.
*
* @type { BackupExtensionContext }
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 12
*/
context: BackupExtensionContext;
/**
* Callback to be called when the backup procedure is started.
* Developer could override this method to build files to be backup.
*
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 10
*/
onBackup(): void;
/**
* Callback to be called when the backup procedure is started.
* Developer could override this method to restore.
*
* @param { string } backupInfo BackupInfo to be backup, the param is a JSON string,
* it is an array, each array element includes detail and type now.
* @returns { string | Promise<string> } Return backup result, support promise, the result is a JSON string,
* it includes type, errorCode and errorInfo now.
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 12
*/
onBackupEx(backupInfo: string): string | Promise<string>;
/**
* Callback to be called when the restore procedure is started.
* Developer could override this method to restore from copies for various bundle versions.
*
* @param { BundleVersion } bundleVersion Bundle version to be restore.
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 10
*/
onRestore(bundleVersion: BundleVersion): void;
/**
* Callback to be called when the restore procedure is started.
* Developer could override this method to restore.
*
* @param { BundleVersion } bundleVersion Bundle version to be restore.
* @param { string } restoreInfo RestoreInfo to be restore, the param is a JSON string,
* it is an array, each array element includes detail and type now.
* @returns { string | Promise<string> } Return restore result, support promise. the result is a JSON string,
* it includes type, errorCode and errorInfo now.
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 12
*/
onRestoreEx(bundleVersion: BundleVersion, restoreInfo: string): string | Promise<string>;
/**
* Callback to be called when getting backup/restore process info.
* Developer could override this method to provide the backup/restore process info.
*
* @returns { string } Return the backup/restore process info.
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 12
*/
onProcess(): string;
/**
* Callback to be called before extension ability exits.
* Developer could override this method to clean abnormal data.
*
* @param { number } scenario - The value 1 indicates backup and the value 2 indicates restoration.
* @returns { Promise<void> } the promise returned by the function
* @syscap SystemCapability.FileManagement.StorageService.Backup
* @StageModelOnly
* @since 20
*/
onRelease(scenario: number): Promise<void>;
}
export default BackupExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.Configuration.d.ts.md
# @ohos.application.Configuration.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
import ConfigurationConstant from './@ohos.application.ConfigurationConstant';
/**
* The module defines environment change information. Configuration is an interface definition and is used only for
* field declaration.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration/Configuration
*/
export interface Configuration {
/**
* Language of the application, for example, **zh**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration/Configuration#language
*/
language?: string;
/**
* Color mode, which can be **COLOR_MODE_LIGHT** or **COLOR_MODE_DARK**. The default value is **COLOR_MODE_LIGHT**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Configuration/Configuration#colorMode
*/
colorMode?: ConfigurationConstant.ColorMode;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.ConfigurationConstant.d.ts.md
# @ohos.application.ConfigurationConstant.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
/**
* The ConfigurationConstant module provides the enumerated values of the environment configuration information.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant
*/
declare namespace ConfigurationConstant {
/**
* Enumerates the color modes.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant#ColorMode
*/
export enum ColorMode {
/**
* Unspecified color mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_NOT_SET
*/
COLOR_MODE_NOT_SET = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_DARK
*/
COLOR_MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.ConfigurationConstant/ConfigurationConstant.ColorMode#COLOR_MODE_LIGHT
*/
COLOR_MODE_LIGHT = 1
}
}
export default ConfigurationConstant;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.DistributedExtensionAbility.d.ts.md
# @ohos.application.DistributedExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit DistributedServiceKit
*/
import Want from './@ohos.app.ability.Want';
import AbilityConstant from './@ohos.app.ability.AbilityConstant';
import type DistributedExtensionContext from './@ohos.application.DistributedExtensionContext';
/**
* The **DistributedExtensionAbility** module provides distributed extension capabilities and lifecycle callbacks for
* distributed ability creation, destruction, and connection.
*
*
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
declare class DistributedExtensionAbility {
/**
* Context of the **DistributedExtension**. This context inherits from **ExtensionContext**.
*
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
context: DistributedExtensionContext;
/**
* Callback invoked to initialize the service logic when a **DistributedExtensionAbility** instance is created.
*
* @param { Want } want - Want information related to the **DistributedExtensionAbility** instance, including the ability
* name and bundle name.
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
onCreate(want: Want): void;
/**
* Callback invoked to clear resources when a **ServiceExtensionAbility** instance is destroyed.
*
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
onDestroy(): void;
/**
* Callback invoked to return the collaboration result in multi-device collaboration scenarios.
*
* @param { Record<string, Object> } wantParam - Want parameter, which supports only the key **"
* ohos.extra.param.key.supportCollaborateIndex"**. The key can be used to obtain the data passed by the caller and
* perform corresponding processing.
* @returns { AbilityConstant.CollaborateResult } Collaboration result, that is, whether the target application accepts the
* collaboration request.
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
onCollaborate(wantParam: Record<string, Object>): AbilityConstant.CollaborateResult;
}
export default DistributedExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.DistributedExtensionContext.d.ts.md
# @ohos.application.DistributedExtensionContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Distributed Extension Context
* @kit DistributedServiceKit
*/
import { ConnectOptions } from './ability/connectOptions';
import type ExtensionContext from './application/ExtensionContext';
import Want from './@ohos.app.ability.Want';
/**
* Class inherited for the distributed extension function.
*
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 20
*/
declare class DistributedExtensionContext extends ExtensionContext {
/**
* Connects to a remote Service extension ability.
*
* This method connects to a Service extension ability on a remote device.
* You must implement the {@link ConnectOptions} interface to obtain the proxy of the target
* service extension when connected.
*
* @param { Want } want - Indicates the service extension to connect.
* @param { ConnectOptions } options - Indicates the callback of connection.
* @returns { number } Returns the connection id.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 26.0.0
*/
connectServiceExtensionAbility(want: Want, options: ConnectOptions): number;
/**
* Disconnects from a remote Service extension ability.
*
* @param { number } connection - the connection id returned from connectServiceExtensionAbility
* @returns { Promise<void> } The promise returned by the function.
* @throws { BusinessError } 16000003 - The connection id does not exist.
* @throws { BusinessError } 16000011 - The ability has been destroyed. The context is no longer valid,
* meaning the context does not exist.
* @throws { BusinessError } 16000050 - Internal error.
* @syscap SystemCapability.DistributedSched.AppCollaboration
* @stagemodelonly
* @since 26.0.0
*/
disconnectServiceExtensionAbility(connection: number): Promise<void>;
}
export default DistributedExtensionContext;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.formBindingData.d.ts.md
# @ohos.application.formBindingData.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
/**
* The **FormBindingData** module provides APIs for widget data binding. You can use the APIs to create a
* **FormBindingData** object and obtain related information.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formBindingData:formBindingData
*/
declare namespace formBindingData {
/**
* Creates a **FormBindingData** object.
*
* @param { Object | string } [obj] - Data to be displayed on the JS widget. The value can be an object containing multiple
* key-value pairs or a string in JSON format. The image data is identified by **'formImages'**, and the content is
* multiple key-value pairs, each of which consists of an image identifier and image file descriptor. The final format
* is {'formImages': {'key1': fd1, 'key2': fd2}}.
* @returns { FormBindingData } **FormBindingData** object created based on the passed data.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formBindingData:formBindingData#createFormBindingData
*/
function createFormBindingData(obj?: Object | string): FormBindingData;
/**
* Describes a **FormBindingData** object.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formBindingData:formBindingData#FormBindingData
*/
interface FormBindingData {
/**
* Data to be displayed on the JS widget. The value can be an object containing multiple key-value pairs or a string
* in JSON format.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formBindingData:formBindingData#FormBindingData
*/
data: Object;
}
}
export default formBindingData;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.formError.d.ts.md
# @ohos.application.formError.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit FormKit
*/
/**
* interface of formError.
*
* @namespace formError
* @syscap SystemCapability.Ability.Form
* @since 8
*/
declare namespace formError {
/**
* Error of form.
*
* @enum { number }
* @syscap SystemCapability.Ability.Form
* @since 8
*/
enum FormError {
/**
* A common internal error occurs during form processing.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_COMMON = 1,
/**
* The application does not have permission to use forms.
* Ensure that the application is granted with the ohos.permission.REQUIRE_FORM
* and ohos.permission.GET_BUNDLE_INFO_PRIVILEGED permissions.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_PERMISSION_DENY = 2,
/**
* Failed to obtain the configuration information about the form specified by the
* request parameters. Ensure that the parameters of the form to be added are
* consistent with those provided by the form provider.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_GET_INFO_FAILED = 4,
/**
* Failed to obtain the bundle to which the form belongs based on the request parameters.
* Ensure that the bundle to which the form to be added belongs is available.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_GET_BUNDLE_FAILED = 5,
/**
* Failed to initialize the form layout based on the request parameters.
* Ensure that the grid style of the form is supported by the form provider.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_GET_LAYOUT_FAILED = 6,
/**
* Invalid input parameter during form operation. Ensure that all input
* parameters are valid.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_ADD_INVALID_PARAM = 7,
/**
* The form configuration to be obtained using an existing form ID is
* different from that obtained for the first time.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_CFG_NOT_MATCH_ID = 8,
/**
* The ID of the form to be operated does not exist in the Form Manager Service.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_NOT_EXIST_ID = 9,
/**
* Failed to bind the Form Manager Service to the provider service.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_BIND_PROVIDER_FAILED = 10,
/**
* The total number of added forms exceeds the maximum allowed by the system.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_MAX_SYSTEM_FORMS = 11,
/**
* The number of form instances generated using the same form configuration
* exceeds the maximum allowed by the system.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_MAX_INSTANCES_PER_FORM = 12,
/**
* The form being requested was added by other applications and cannot be
* operated by the current application.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_OPERATION_FORM_NOT_SELF = 13,
/**
* The Form Manager Service failed to instruct the form provider to delete the form.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_PROVIDER_DEL_FAIL = 14,
/**
* The total number of added forms exceeds the maximum per client.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_MAX_FORMS_PER_CLIENT = 15,
/**
* The total number of added temp forms exceeds the maximum in system.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_MAX_SYSTEM_TEMP_FORMS = 16,
/**
* The module can not be find in system.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_FORM_NO_SUCH_MODULE = 17,
/**
* The ability can not be find in system.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_FORM_NO_SUCH_ABILITY = 18,
/**
* The dimension is not exist in the form.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_FORM_NO_SUCH_DIMENSION = 19,
/**
* The ability is not installed.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_FORM_FA_NOT_INSTALLED = 20,
/**
* Failed to obtain the RPC object of the Form Manager Service because
* the service is not started.Please try again after the service is started.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_SYSTEM_RESPONSES_FAILED = 30,
/**
* Failed to obtain the form requested by the client because another form
* with the same form ID is in use. Forms in use cannot have the same ID.
* To obtain and display a form that has the same configuration as an in-use
* form in the same application, you are advised to set the form ID to 0 in
* the request parameters.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_FORM_DUPLICATE_ADDED = 31,
/**
* The form is being restored. Perform operations on the form only after
* the restoration is complete.
*
* @syscap SystemCapability.Ability.Form
* @since 8
*/
ERR_IN_RECOVERY = 36
}
}
export default formError;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.formInfo.d.ts.md
# @ohos.application.formInfo.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
import Want from './@ohos.app.ability.Want';
/**
* The **formInfo** module provides types and enums related to the widget information and state.
*
* > **NOTE**
*
* > - This module is deprecated since API version 9. You are advised to use
* > [formInfo]{@link @ohos.app.form.formInfo:formInfo} instead.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo
*/
declare namespace formInfo {
/**
* Widget information.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#FormInfo
*/
interface FormInfo {
/**
* Name of the bundle to which the widget belongs.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#bundleName
*/
bundleName: string;
/**
* Name of the module to which the widget belongs.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#moduleName
*/
moduleName: string;
/**
* Name of the ability to which the widget belongs.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#abilityName
*/
abilityName: string;
/**
* Widget name.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#name
*/
name: string;
/**
* Description of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#description
*/
description: string;
/**
* Type of the widget. Currently, only JS widgets are supported.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#type
*/
type: FormType;
/**
* Component name of the JS widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#jsComponentName
*/
jsComponentName: string;
/**
* Color mode of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#colorMode
*/
colorMode: ColorMode;
/**
* Whether the widget is the default one.
*
* - **true**: The widget is the default one.
* - **false**: The widget is not the default one.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#isDefault
*/
isDefault: boolean;
/**
* Whether the widget is updatable.
*
* - **true**: The widget can be updated periodically.
* - **false**: The widget cannot be updated periodically.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#updateEnabled
*/
updateEnabled: boolean;
/**
* Whether to send a notification when the widget is visible.
*
* - **true**: The widget provider is notified of the status change.
* - **false**: The widget provider is not notified of the status change.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#formVisibleNotify
*/
formVisibleNotify: boolean;
/**
* Name of the associated bundle to which the widget belongs.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
*/
relatedBundleName: string;
/**
* Time when the widget was updated.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#scheduledUpdateTime
*/
scheduledUpdateTime: string;
/**
* Configuration ability of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#formConfigAbility
*/
formConfigAbility: string;
/**
* Update period of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#updateDuration
*/
updateDuration: number;
/**
* Default dimension of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#defaultDimension
*/
defaultDimension: number;
/**
* Dimensions supported by the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#supportDimensions
*/
supportDimensions: Array<number>;
/**
* Custom data of the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormInfo#customizeData
*/
customizeData: {
[key: string]: [
value: string
];
};
}
/**
* Enumerates the widget types.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#FormType
*/
enum FormType {
/**
* JS widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormType#JS
*/
JS = 1
}
/**
* Enumerates the color modes supported by the widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#ColorMode
*/
enum ColorMode {
/**
* Auto mode.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_AUTO
*/
MODE_AUTO = -1,
/**
* Dark mode.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_DARK
*/
MODE_DARK = 0,
/**
* Light mode.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.ColorMode#MODE_LIGHT
*/
MODE_LIGHT = 1
}
/**
* Describes the widget state information.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#FormStateInfo
*/
interface FormStateInfo {
/**
* Widget state.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormStateInfo#formState
*/
formState: FormState;
/**
* Want text.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormStateInfo#want
*/
want: Want;
}
/**
* Enumerates the widget states.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#FormState
*/
enum FormState {
/**
* Unknown state.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormState#UNKNOWN
*/
UNKNOWN = -1,
/**
* Default state.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormState#DEFAULT
*/
DEFAULT = 0,
/**
* Ready state.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormState#READY
*/
READY = 1
}
/**
* Enumerates the widget parameters.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo#FormParam
*/
enum FormParam {
/**
* Widget dimension.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#DIMENSION_KEY
*/
DIMENSION_KEY = 'ohos.extra.param.key.form_dimension',
/**
* Widget name.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#NAME_KEY
*/
NAME_KEY = 'ohos.extra.param.key.form_name',
/**
* Name of the module to which the widget belongs.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#MODULE_NAME_KEY
*/
MODULE_NAME_KEY = 'ohos.extra.param.key.module_name',
/**
* Widget width.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#WIDTH_KEY
*/
WIDTH_KEY = 'ohos.extra.param.key.form_width',
/**
* Widget height.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#HEIGHT_KEY
*/
HEIGHT_KEY = 'ohos.extra.param.key.form_height',
/**
* Temporary widget.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead ohos.app.form.formInfo/formInfo.FormParam#TEMPORARY_KEY
*/
TEMPORARY_KEY = 'ohos.extra.param.key.form_temporary'
}
}
export default formInfo;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.formProvider.d.ts.md
# @ohos.application.formProvider.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
import { AsyncCallback } from './@ohos.base';
import formBindingData from './@ohos.application.formBindingData';
/**
* The **FormProvider** module provides APIs related to the widget provider. You can use the APIs to update a widget,
* set the next refresh time for a widget, obtain widget information, and request a widget release.
*
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formProvider:formProvider
*/
declare namespace formProvider {
/**
* Sets the next refresh time for a widget. This API uses an asynchronous callback to return the result.
*
* @param { string } formId - Widget ID.
* @param { number } minute - Time for the next refresh. The value must be greater than or equal to 5, in minutes.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formProvider:formProvider#setFormNextRefreshTime
*/
function setFormNextRefreshTime(formId: string, minute: number, callback: AsyncCallback<void>): void;
/**
* Sets the next refresh time for a widget. This API uses a promise to return the result.
*
* @param { string } formId - Widget ID.
* @param { number } minute - Time for the next refresh. The value must be greater than or equal to 5, in minutes.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formProvider:formProvider#setFormNextRefreshTime
*/
function setFormNextRefreshTime(formId: string, minute: number): Promise<void>;
/**
* Updates a widget. This API uses an asynchronous callback to return the result.
*
* @param { string } formId - ID of the widget to update.
* @param { formBindingData.FormBindingData } formBindingData - Data to be used for the update.
* @param { AsyncCallback<void> } callback - Callback used to return the result.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formProvider:formProvider#updateForm
*/
function updateForm(formId: string, formBindingData: formBindingData.FormBindingData, callback: AsyncCallback<void>): void;
/**
* Updates a widget. This API uses a promise to return the result.
*
* @param { string } formId - ID of the widget to update.
* @param { formBindingData.FormBindingData } formBindingData - Data to be used for the update.
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.Ability.Form
* @since 8
* @deprecated since 9
* @useinstead @ohos.app.form.formProvider:formProvider#updateForm
*/
function updateForm(formId: string, formBindingData: formBindingData.FormBindingData): Promise<void>;
}
export default formProvider;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionAbility.d.ts.md
# @ohos.application.NotificationSubscriberExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit NotificationKit
*/
import type NotificationSubscriberExtensionContext from './@ohos.application.NotificationSubscriberExtensionContext';
import { NotificationInfo } from './notification/NotificationInfo';
/**
* NotificationSubscriberExtensionAbility is the base class for notification subscriber extension abilities, providing
* notification subscription-related functionality. Third-party wearable apps (such as companion applications for
* watches)implement callback logic by inheriting this class, receiving notification information when notifications
* are published on the local device and forwarding them to the wearable device via Bluetooth, and receiving callbacks
* for notification cancellation when local notifications are cancelled and forwarding them to the wearable device to
* delete the corresponding notifications.
*
* Use this module when your wearable application needs to obtain local notifications and sync them to a paired wearable
* device. This module is used together with the notificationExtensionSubscription module. This module is responsible
* for receiving and processing notification data in callbacks, while the notificationExtensionSubscription module is
* responsible for management operations such as authorization, subscription, and unsubscription.
*
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
declare class NotificationSubscriberExtensionAbility {
/**
* Context for the NotificationSubscriberExtensionAbility.
*
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
context: NotificationSubscriberExtensionContext;
/**
* Called when the notification subscription extension is destroyed.
*
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
onDestroy(): void;
/**
* Called when a notification is received.
*
* @param { NotificationInfo } notificationInfo - Callback information about the notification received in the
* notification subscription extension capability.
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
onReceiveMessage(notificationInfo: NotificationInfo): void;
/**
* Called when notifications are canceled.
*
* @param { Array<string> } hashCodes - List of hash codes of the notifications to cancel, obtained through
* {@link @ohos.application.NotificationSubscriberExtensionAbility:
* NotificationSubscriberExtensionAbility.onReceiveMessage}.
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
onCancelMessages(hashCodes: Array<string>): void;
}
export default NotificationSubscriberExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionContext.d.ts.md
# @ohos.application.NotificationSubscriberExtensionContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit NotificationKit
*/
import type ExtensionContext from './application/ExtensionContext';
/**
* The **NotificationSubscriberExtensionContext** module provides the context
* for the **NotificationSubscriberExtensionAbility**.
*
* @syscap SystemCapability.Notification.Notification
* @stagemodelonly
* @since 22
*/
export default class NotificationSubscriberExtensionContext extends ExtensionContext {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.testRunner.d.ts.md
# @ohos.application.testRunner.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **TestRunner** module provides a test framework. You can use the APIs of this module to prepare the unit test
* environment and run test cases.
* To implement your own unit test framework, extend this class and override its APIs.
*
* > **NOTE**
* >
* > The APIs of this module can be used only in [JsUnit](docroot://application-test/unittest-guidelines.md).
*
* @file
* @kit TestKit
*/
/**
* Stop all test cases.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
type OnStopFn = () => void;
/**
* Base class for the test framework.
* If you want to implement your own unit test framework, you must inherit this class and overrides all its methods.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 8
*/
interface TestRunner {
/**
* Prepare the unit testing environment for running test cases.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 8
*/
onPrepare(): void;
/**
* Run all test cases.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @atomicservice [since 11]
* @since 8
*/
onRun(): void;
/**
* Stop all test cases.
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
onStop?: OnStopFn;
}
/*** if arkts 1.1 */
export { TestRunner };
/*** endif */
export default TestRunner;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.uriPermissionManager.d.ts.md
# @ohos.application.uriPermissionManager.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit AbilityKit
*/
/**
* The **uriPermissionManager** module provides capabilities for granting the permission on a file to another
* application and revoking the granted permissions. The file is identified by a uniform resource identifier (URI).
*
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @since 10
*/
declare namespace uriPermissionManager {
}
export default uriPermissionManager;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.application.Want.d.ts.md
# @ohos.application.Want.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit API10LessDeprecatedModules
*/
/**
* Want is a carrier for information transfer between objects (application components). Want can be used as a parameter
* of **startAbility** to specify a startup target and information that needs to be carried during startup, for example,
* **bundleName** and **abilityName**, which respectively indicate the bundle name of the target ability and the
* ability name in the bundle. When ability A needs to start ability B and transfer some data to ability B, it can use
* Want a carrier to transfer the data.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want
*/
export default class Want {
/**
* ID of the device running the ability. If this field is unspecified, the local device is used.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#deviceId
*/
deviceId?: string;
/**
* Bundle name.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#bundleName
*/
bundleName?: string;
/**
* Name of the ability. If both **bundleName** and **abilityName** are specified in a Want object, the Want object can
* match a specific ability. The value of **abilityName** must be unique in an application.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#abilityName
*/
abilityName?: string;
/**
* URI information to match. If **Uri** is specified in a Want object, the Want object will match the specified URI
* information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#uri
*/
uri?: string;
/**
* MIME type, that is, the type of the file to open, for example, **'text/xml'** and **'image/*'**. For details about
* the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#type
*/
type?: string;
/**
* How the Want object will be handled. By default, numbers are passed in. For details, see
* [flags]{@link @ohos.ability.wantConstant:wantConstant.Flags}.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#flags
*/
flags?: number;
/**
* Action to take, such as viewing and sharing application details. In implicit Want, you can define this property and
* use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details,
* see [action]{@link @ohos.ability.wantConstant:wantConstant.Action}. For details about the definition and matching
* rules of implicit Want, see
* [Matching Rules of Explicit Want and Implicit Want](docroot://application-models/explicit-implicit-want-mappings.md)
* .
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#action
*/
action?: string;
/**
* Want parameters in the form of custom key-value (KV) pairs. By default, the following keys are carried:
*
* **ohos.aafwk.param.callerPid**: PID of the caller.
*
* **ohos.aafwk.param.callerToken**: token of the caller.
*
* **ohos.aafwk.param.callerUid**: UID in [bundleInfo](js-apis-bundle-BundleInfo.md#bundleinfodeprecated), that is,
* the application UID in the bundle information.
*
* - **component.startup.newRules**: whether to enable the new control rule.
* - **moduleName**: module name of the caller. No matter what this field is set to, the correct module name will be
* sent to the peer.
* - **ohos.dlp.params.sandbox**: available only for DLP files.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#parameters
*/
parameters?: {
[key: string]: any;
};
/**
* Additional category information (such as browser and video player) of the ability. It is a supplement to the
* **action** field for implicit Want. and is used to filter ability types. For details, see
* [entity]{@link @ohos.ability.wantConstant:wantConstant.Entity}.
*
* @syscap SystemCapability.Ability.AbilityBase
* @since 8
* @deprecated since 9
* @useinstead ohos.app.ability.Want/Want#entities
*/
entities?: Array<string>;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcAlphabetIndexer.d.ts.md
# @ohos.arkui.ArcAlphabetIndexer.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Initialization parameters for the **ArcAlphabetIndexer** component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare interface ArcAlphabetIndexerInitInfo {
/**
* Array of alphabet index strings. It cannot be set to empty.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
arrayValue: string[];
/**
* Index of the initial selected item. If the value is out of range, the default value **0** is used.
*
* This parameter supports two-way binding through [!!](docroot://ui/state-management/arkts-new-binding.md).
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selected: number;
}
/**
* Defines the callback used in [onSelect]{@link ArcAlphabetIndexerAttribute#onSelect}.
*
* @param { number } index - Index of the selected item.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type OnSelectCallback = (index: number) => void;
/**
* The **ArcAlphabetIndexer** component is an arc-shaped component designed for quick navigation through alphabetically
* sorted items. It can be integrated with container components to quickly locate items within the visible area.
*
* > **NOTE**
*
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1
* > devices, tablets, and TVs, but the component can still run properly.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export interface ArcAlphabetIndexerInterface {
/**
* Creates an instance of the **ArcAlphabetIndexer** component with initialization parameters.
*
* @param { ArcAlphabetIndexerInitInfo } info - Initialization parameters for the **ArcAlphabetIndexer** component.
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
(info: ArcAlphabetIndexerInitInfo): ArcAlphabetIndexerAttribute;
}
/**
* In addition to the [universal attributes]{@link common}, the following attributes are supported.
*
* In addition to the [universal events]{@link common}, the following events are supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare class ArcAlphabetIndexerAttribute extends CommonMethod<ArcAlphabetIndexerAttribute> {
/**
* Sets the text color of the index items in the normal state.
*
* @param { Optional<ColorMetrics> } color - Text color.<br>Default value: **0xFFFFFF**, displayed as white
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
color(color: Optional<ColorMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets the text color of the selected item.
*
* @param { Optional<ColorMetrics> } color - Text color of the selected item.<br>Default value: **0xFFFFFF**,
* displayed as white
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selectedColor(color: Optional<ColorMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets the text color for the pop-up window.
*
* @param { Optional<ColorMetrics> } color - Text color of the pop-up window.<br>Default value: **0xFFFFFF**,
* displayed as white
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
popupColor(color: Optional<ColorMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets the background color of the selected item.
*
* @param { Optional<ColorMetrics> } color - Background color of the selected item.<br>Default value: **0x1F71FF**,
* displayed as dark blue
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selectedBackgroundColor(color: Optional<ColorMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets the background color of the pop-up window.
*
* @param { Optional<ColorMetrics> } color - Background color of the pop-up window.<br>Default value: **0xD8404040**,
* displayed as dark gray with slight transparency
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
popupBackground(color: Optional<ColorMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets whether to display the pop-up window.
*
* @param { Optional<boolean> } enabled - Whether to display the pop-up window.<br>**true**: yes; **false**: no<br>
* Default value: **false**
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
usePopup(enabled: Optional<boolean>): ArcAlphabetIndexerAttribute;
/**
* Sets the font style of the selected item, including size, weight, style, and font family.
*
* @param { Optional<Font> } font - Font style of the selected item.<br>Default value: {<br>size:'13.0fp',<br> style:
* FontStyle.Normal,<br> weight:500,<br> family:'HarmonyOS Sans'<br>}
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selectedFont(font: Optional<Font>): ArcAlphabetIndexerAttribute;
/**
* Sets the font style of the pop-up window.
*
* @param { Optional<Font> } font - Font style of the pop-up window.<br>Default value:<br>{<br>size:'19.0fp',<br>
* style:FontStyle.Normal,<br> weight:500,<br> family:'HarmonyOS Sans'<br>}
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
popupFont(font: Optional<Font>): ArcAlphabetIndexerAttribute;
/**
* Sets the default font style of the index items.
*
* @param { Optional<Font> } font - Default font style of the index items.<br>Default value:<br>{<br>size:'13.0fp',<br
* > style:FontStyle.Normal,<br> weight:500,<br> family:'HarmonyOS Sans'<br>}
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
font(font: Optional<Font>): ArcAlphabetIndexerAttribute;
/**
* Sets the size of the index item area.
*
* @param { Optional<LengthMetrics> } size - Size of the index item area. For the circular item area, this represents
* the diameter of the circle. Percentage values are not supported.<br>Default value: **24.0**<br>Unit: vp
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
itemSize(size: Optional<LengthMetrics>): ArcAlphabetIndexerAttribute;
/**
* Sets the index of the selected item.
*
* @param { Optional<number> } index - Index of the selected item.<br>Default value: **0**<br>This parameter supports
* two-way binding through [!!](docroot://ui/state-management/arkts-new-binding.md).
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selected(index: Optional<number>): ArcAlphabetIndexerAttribute;
/**
* Sets whether to enable the adaptive collapse behavior for the indexer.
*
* @param { Optional<boolean> } enable - Whether to enable the adaptive collapse behavior for the indexer.<br>Default
* value: **true**.<br>**true**: Enable the adaptive collapse behavior.<br>**false**: Disable the adaptive
* collapse behavior.
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
autoCollapse(enable: Optional<boolean>): ArcAlphabetIndexerAttribute;
/**
* Triggered when an index item is selected. The return value is the index of the selected item.
*
* @param { Optional<OnSelectCallback> } handler - Callback used to return the result.
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onSelect(handler: Optional<OnSelectCallback>): ArcAlphabetIndexerAttribute;
/**
* Sets the background blur style of the pop-up window. If this API is not used, the blur is disabled by default. The
* corresponding value is **NONE** in **BlurStyle**.
*
* > **NOTE**
*
* > After configuring the pop-up window background blur style with **popupBackgroundBlurStyle**, avoid applying
* > background colors via [popupBackground]{@link ArcAlphabetIndexerAttribute#popupBackground}.
*
* @param { Optional<BlurStyle> } style - Background blur style of the pop-up window.
* @returns { ArcAlphabetIndexerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
popupBackgroundBlurStyle(style: Optional<BlurStyle>): ArcAlphabetIndexerAttribute;
}
/**
* The **ArcAlphabetIndexer** component is an arc-shaped component designed for quick navigation through alphabetically
* sorted items. It can be integrated with container components to quickly locate items within the visible area.
*
* > **NOTE**
*
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1
* > devices, tablets, and TVs, but the component can still run properly.
*
* ###### Child Components
*
* Not supported
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @uicomponent [since 19]
* @since 18
* @noninterop
*/
declare const ArcAlphabetIndexer: ArcAlphabetIndexerInterface;
/**
* Defines ArcAlphabetIndexer Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
declare const ArcAlphabetIndexerInstance: ArcAlphabetIndexerAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcList.d.ts.md
# @ohos.arkui.ArcList.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Represents the callback triggered when a child component enters or leaves the visible area
* of the **ArcList** component.
*
* @param { number } start - Index of the first child component in the visible area of the
* **ArcList** component.
* @param { number } end - Index of the last child component in the visible area of the
* **ArcList** component.
* @param { number } center - Index of the center child component in the visible area of the
* **ArcList** component.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type ArcScrollIndexHandler = (start: number, end: number, center: number) => void;
/**
* Provides basic parameters for creating an **ArcList** component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare interface ArkListOptions {
/**
* Item displayed at the beginning of the viewport when the **ArcList** component is loaded
* for the first time, that is, the first item to be displayed.<br/>Default value: **0**<br/>
* **NOTE**<br/>If the set value is a negative number or is greater than the index of the last
* item, the value is invalid. In this case, the default value will be used.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
initialIndex?: number;
/**
* Controller of the scrollable component. After being bound to **ArcList**, the controller
* can control the scrolling of **ArcList**.<br/>**NOTE**<br/>The scroller cannot be bound to
* other scrollable components.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
scroller?: Scroller;
/**
* Header component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
header?: ComponentContent;
}
/**
* The **ArcList** component is a circular layout container that displays a series of list items
* in an arc shape. It is suitable for presenting homogeneous data, such as images and text,
* in a continuous, multi-row format.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
export interface ArcListInterface {
/**
* Creates an **ArcList** component instance with specified configuration options.
*
* @param { ArkListOptions } [options]
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
(options?: ArkListOptions): ArcListAttribute;
}
/**
* The **ArcListItem** component is used to display individual child components in an
* [ArcList]{@link @ohos.arkui.ArcList} component and must be used in conjunction with **ArcList**.
*
* > **NOTE**
*
* > - This component can be used only as a child of [ArcList]{@link @ohos.arkui.ArcList}.
* >
* > - When this component is used with
* > [LazyForEach](docroot://ui/rendering-control/arkts-rendering-control-lazyforeach.md), its child components are
* > created when it is created. When this component is used with
* > [if/else](docroot://ui/rendering-control/arkts-rendering-control-ifelse.md) or
* > [ForEach](docroot://ui/rendering-control/arkts-rendering-control-foreach.md), or when the parent component is
* > [ArcList]{@link @ohos.arkui.ArcList}, its child components are created when it is laid out.
* >
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1 devices
* > , tablets, and TVs, but the component can still run properly.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export interface ArcListItemInterface {
/**
* Creates an item for the **ArcList** component.
*
* @returns { ArcListItemAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
(): ArcListItemAttribute;
}
/**
* In addition to the [universal attributes]{@link common}, the
* following attributes are supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
export declare class ArcListAttribute extends CommonMethod<ArcListAttribute> {
/**
* Sets the sensitivity of the digital crown's event response.
*
* @param { Optional<CrownSensitivity> } sensitivity - Sensitivity of the digital crown's
* event response.<br/>Default value: **CrownSensitivity.MEDIUM**, indicating moderate
* response speed.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
digitalCrownSensitivity(sensitivity: Optional<CrownSensitivity>): ArcListAttribute;
/**
* Sets the spacing between list items.
*
* @param { Optional<LengthMetrics> } space - Spacing between list items.<br/>
* Default value: **LengthMetrics.vp(0)**.<br/>Child components of **ArcList** whose
* visibility attribute is set to **None** are not displayed, but the spacing above and
* below them still takes effect.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
space(space: Optional<LengthMetrics>): ArcListAttribute;
/**
* Sets the state of the scrollbar.
*
* @param { Optional<BarState> } status - State of the scrollbar.<br/>
* Default value: **BarState.Auto**
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
scrollBar(status: Optional<BarState>): ArcListAttribute;
/**
* Sets the color of the scrollbar.
*
* @param { Optional<ColorMetrics> } color - Color of the scrollbar.<br/>
* Default value: **ColorMetrics.numeric(0xA9FFFFFF)**
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
scrollBarColor(color: Optional<ColorMetrics>): ArcListAttribute;
/**
* Sets the width of the scrollbar. Once the width is set, the scrollbar will use this
* width in its pressed state.
*
* @param { Optional<LengthMetrics> } width - Width of the scrollbar.<br/>
* Default value: **LengthMetrics.vp(24)**.<br/>Minimum value: **LengthMetrics.vp(4)**<br>Unit: vp
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
scrollBarWidth(width: Optional<LengthMetrics>): ArcListAttribute;
/**
* Sets the number of arc list items to be preloaded (cached). In a lazy loading scenario,
* only the content equivalent to **cachedCount** outside the visible area of the arc list is
* preloaded. In a non-lazy loading scenario, all items are loaded at once. For both lazy and
* non-lazy loading, only the content within the visible area of the arc list plus the content
* equivalent to **cachedCount** outside the visible area is laid out.
* When **cachedCount** is set for the arc list, the system preloads and lays out the
* **cachedCount**-specified number of rows of arc list items both above and below the
* currently visible area of the arc list.
*
* @param { Optional<number> } count - Number of list items to preload.<br/>
* Default value: number of nodes visible on the screen, with the maximum value of 16.<br/>
* Value range: [0, +∞)
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
cachedCount(count: Optional<number>): ArcListAttribute;
/**
* Sets whether to enable chained animations, which provide a visually connected, or
* "chained," effect when the **ArcList** component is scrolled or its top or bottom edge is
* dragged.
* The list items are separated with even space, and one item animation starts after the
* previous animation during basic sliding interactions. The chained animation effect is
* similar with spring physics.
* For chained animations to work properly, the edge scrolling effect of the **ArcList**
* component must be set to **EdgeEffect.Spring**.
*
* @param { Optional<boolean> } enable - Whether to enable chained animations.<br/>
* **false** (default): Chained animations are disabled. **true**: Chained animations are
* enabled.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
chainAnimation(enable: Optional<boolean>): ArcListAttribute;
/**
* Sets the size information of the child components of the **ArcList** component along the
* main axis.
*
* @param { Optional<ChildrenMainSize> } size - Precise size information for all child
* components along the main axis. This ensures accurate scrolling positions in scenarios
* where child components have varying sizes, are added or removed, or when APIs like
* **scrollToIndex** are used. It guarantees that **scrollTo** can accurately navigate to
* the specified position, **currentOffset** or **offset** can accurately reflect the
* current scrolling position, and the built-in scrollbar can move smoothly without any
* jumps or abrupt changes. The **offset** API is added from API version 23.<br/>
* **NOTE**<br/>The provided sizes must match the actual sizes of the child components.
* Any changes to the sizes, or any additions or removals of child components, must be
* notified to the **ArcList** component through the **ChildrenMainSize** object.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
childrenMainSize(size: Optional<ChildrenMainSize>): ArcListAttribute;
/**
* Sets whether to enable scroll gestures.
*
* @param { Optional<boolean> } enable - Whether to enable scroll gestures. With the value
* **true**, scrolling via finger or mouse is enabled. With the value **false**, scrolling
* via finger or mouse is disabled, but this does not affect the scrolling APIs of the
* **Scroller**.<br/>Default value: **true**
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
enableScrollInteraction(enable: Optional<boolean>): ArcListAttribute;
/**
* Sets whether to enable the edge fading effect.
*
* @param { Optional<boolean> } enable - Whether to enable the edge fading effect.<br/>
* When **fadingEdge** is set to **true**, it overrides the **.overlay()** attribute of
* the component.<br/>With **fadingEdge** set to **true**, avoid setting background-related
* attributes on the component, as this may affect the display of the fading effect.<br/>
* When **fadingEdge** is set to **true**, the component is clipped to the boundary. If the
* **clip** attribute of the component is set to **false**, the setting does not take
* effect.<br/>With the value **true**, the edge fading effect is enabled. With the value
* **false**, the edge fading effect is disabled.<br/>Default value: **false**.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
fadingEdge(enable: Optional<boolean>): ArcListAttribute;
/**
* Sets the friction coefficient. It applies only to gestures in the scrolling area, and it
* affects only the inertial scrolling process. If this attribute is set to a value less than
* or equal to 0, the default value is used.
*
* @param { Optional<number> } friction - Friction coefficient.<br/>
* Default value: **0.8**<br/>Value range: (0, +∞)
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
friction(friction: Optional<number>): ArcListAttribute;
/**
* Sets the maximum initial speed for inertial scrolling after a fling gesture. If this
* attribute is set to a value less than or equal to 0, the default value is used.
*
* @param { Optional<number> } speed - Maximum initial speed for inertial scrolling.<br/>
* Default value: **9000**.<br/>Unit: vp/s.<br/>Value range: (0, +∞)
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
flingSpeedLimit(speed: Optional<number>): ArcListAttribute;
/**
* Triggered when a child component enters or leaves the visible area of the **ArcList**
* component. This event is triggered during initialization of the **ArcList** component and
* when the index of the first or last child component in the visible area changes, or when
* the center child component changes.
* If the edge scrolling effect of the **ArcList** component is set to spring, this event is
* not triggered during continued scrolling at the edge or during the bounce-back process.
*
* @param { Optional<ArcScrollIndexHandler> } handler - Callback triggered when a child
* component enters or leaves the visible area of the **ArcList** component.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onScrollIndex(handler: Optional<ArcScrollIndexHandler>): ArcListAttribute;
/**
* Triggered when the list reaches the start position.
* This event is triggered during initialization of the **ArcList** component if
* **initialIndex** is set to **0**, and whenever the list scrolls to the start position.
* If the edge scrolling effect is set to spring, this event is triggered when scrolling past
* the start position and again when bouncing back to it.
*
* @param { Optional<VoidCallback> } handler - Callback triggered when the list reaches the
* start position.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onReachStart(handler: Optional<VoidCallback>): ArcListAttribute;
/**
* Triggered when the list reaches the end position.
* If the edge scrolling effect is set to spring, this event is triggered when scrolling past
* the end position and again when bouncing back to it.
*
* @param { Optional<VoidCallback> } handler - Callback triggered when the list reaches the
* end position.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onReachEnd(handler: Optional<VoidCallback>): ArcListAttribute;
/**
* Triggered when the list starts scrolling initiated by the user's finger dragging the list
* or its scrollbar. This event is also triggered when the animation contained in the
* scrolling triggered by **Scroller** starts.
*
* @param { Optional<VoidCallback> } handler - Callback triggered when the list starts
* scrolling.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onScrollStart(handler: Optional<VoidCallback>): ArcListAttribute;
/**
* Triggered when the list stops scrolling after the user's finger leaves the screen.
* This event is also triggered when the animation contained in the scrolling triggered by
* **Scroller** stops.
*
* @param { Optional<VoidCallback> } handler - Callback triggered when the list stops
* scrolling.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onScrollStop(handler: Optional<VoidCallback>): ArcListAttribute;
/**
* Triggered before each frame during list scrolling. The callback returns the offset amount
* by which the list will scroll and the current scroll state. The returned offset is a
* calculated value, not the actual offset.
*
* @param { Optional<OnWillScrollCallback> } handler - Callback triggered before each frame
* during list scrolling.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onWillScroll(handler: Optional<OnWillScrollCallback>): ArcListAttribute;
/**
* Triggered when the list scrolls. The return value is the offset amount by which the list
* has scrolled and the current scroll state.
*
* @param { Optional<OnScrollCallback> } handler - Callback triggered when the list scrolls.
* @returns { ArcListAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onDidScroll(handler: Optional<OnScrollCallback>): ArcListAttribute;
}
/**
* In addition to the [universal attributes]{@link common}, the following attributes are
* supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export declare class ArcListItemAttribute extends CommonMethod<ArcListItemAttribute> {
/**
* Sets whether to enable auto-scaling for the **ArcListItem** component.
*
* @param { Optional<boolean> } enable - Whether to enable auto-scaling.<br>**true**: Enable auto-scaling.<br>
* **false**: Disable auto-scaling.<br>Default value: **true**.
* @returns { ArcListItemAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
autoScale(enable: Optional<boolean>): ArcListItemAttribute;
/**
* Sets the swipe action item displayed when the **ArcListItem** component is swiped out from the screen edge.
*
* @param { Optional<SwipeActionOptions> } options - Swipe action item displayed when the **ArcListItem** component is
* swiped out from the screen edge.
* @returns { ArcListItemAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
swipeAction(options: Optional<SwipeActionOptions>): ArcListItemAttribute;
}
/**
* Defines ArcList Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export declare const ArcListInstance: ArcListAttribute;
/**
* Defines ArcListItem Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export declare const ArcListItemInstance: ArcListItemAttribute;
/**
* The **ArcList** component is a circular layout container that displays a series of list items
* in an arc shape. It is suitable for presenting homogeneous data, such as images and text,
* in a continuous, multi-row format.
*
* > **NOTE**
*
* > - This component is supported since API version 18. Updates will be marked with a
* > superscript to indicate their earliest API version.
* >
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables.
* > In API version 22 and earlier versions, a compilation warning will be reported when this
* > component is used on phones, PCs, 2-in-1 devices, tablets, and TVs, but the component can
* > still run properly.
*
* ###### Child Components
*
* Only the [ArcListItem]{@link @ohos.arkui.ArcList} component is supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @uicomponent [since 19]
* @since 18
* @noninterop
*/
export declare const ArcList: ArcListInterface;
/**
* The **ArcListItem** component is used to display individual child components in an
* [ArcList]{@link @ohos.arkui.ArcList} component and must be used in conjunction with **ArcList**.
*
* > **NOTE**
*
* > - This component can be used only as a child of [ArcList]{@link @ohos.arkui.ArcList}.
* >
* > - When this component is used with
* > [LazyForEach](docroot://ui/rendering-control/arkts-rendering-control-lazyforeach.md), its child components are
* > created when it is created. When this component is used with
* > [if/else](docroot://ui/rendering-control/arkts-rendering-control-ifelse.md) or
* > [ForEach](docroot://ui/rendering-control/arkts-rendering-control-foreach.md), or when the parent component is
* > [ArcList]{@link @ohos.arkui.ArcList}, its child components are created when it is laid out.
* >
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1 devices
* > , tablets, and TVs, but the component can still run properly.
*
* ###### Child Components
*
* This component can contain a single child component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @uicomponent [since 19]
* @since 18
* @noninterop
*/
export declare const ArcListItem: ArcListItemInterface;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcScrollBar.d.ts.md
# @ohos.arkui.ArcScrollBar.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Represents the parameters used to construct an **ArcScrollBar** component.
*
* > **NOTE**
* >
* > **ArcScrollBar** must be bound to a scrollable component through **scroller** to achieve synchronization. Only a
* > one-to-one binding is allowed between **ArcScrollBar** and a scrollable component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare interface ArcScrollBarOptions {
/**
* Scroller, which can be bound to scrollable components for scrolling control.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
scroller: Scroller;
/**
* State of the scrollbar.<br/>Default value: **BarState.Auto**
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
state?: BarState;
}
/**
* The **ArcScrollBar** component is designed to be used together with scrollable components such as
* [ArcList]{@link @ohos.arkui.ArcList}, [List]{@link list},
* [Grid]{@link grid}, [Scroll]{@link scroll}, and
* [WaterFlow]{@link water_flow}.
*
* > **NOTE**
* >
* > - This component is supported since API version 18. Updates will be marked with a superscript to indicate their
* > earliest API version.
* >
* > - When the width and height of the **ArcScrollBar** component are not set, the **maxSize** value specified in its
* > parent component [LayoutConstraint]{@link FrameNode:LayoutConstraint} is used as the width and height. If
* > the parent component of the **ArcScrollBar** component contains scrollable components, such as
* > [ArcList]{@link @ohos.arkui.ArcList}, [List]{@link list},
* > [Grid]{@link grid}, [Scroll]{@link scroll}, or
* > [WaterFlow]{@link water_flow}, you are advised to set the width and height of the
* > **ArcScrollBar** component. Otherwise, the width and height of the component may be infinite.
* >
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1 devices
* > , tablets, and TVs, but the component can still run properly.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export interface ArcScrollBarInterface {
/**
* A constructor used to create an **ArcScrollBar** instance.
*
* @param { ArcScrollBarOptions } options - Parameters of the **ArcScrollBar** component.
* @returns { ArcScrollBarAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
(options: ArcScrollBarOptions): ArcScrollBarAttribute;
}
/**
* Defines the arc scroll bar attribute functions.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export declare class ArcScrollBarAttribute extends CommonMethod<ArcScrollBarAttribute> {
}
/**
* Defines ArcScrollBar Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export declare const ArcScrollBarInstance: ArcScrollBarAttribute;
/**
* The **ArcScrollBar** component is designed to be used together with scrollable components such as
* [ArcList]{@link @ohos.arkui.ArcList}, [List]{@link list},
* [Grid]{@link grid}, [Scroll]{@link scroll}, and
* [WaterFlow]{@link water_flow}.
*
* > **NOTE**
* >
* > - This component is supported since API version 18. Updates will be marked with a superscript to indicate their
* > earliest API version.
* >
* > - When the width and height of the **ArcScrollBar** component are not set, the **maxSize** value specified in its
* > parent component [LayoutConstraint]{@link FrameNode:LayoutConstraint} is used as the width and height. If
* > the parent component of the **ArcScrollBar** component contains scrollable components, such as
* > [ArcList]{@link @ohos.arkui.ArcList}, [List]{@link list},
* > [Grid]{@link grid}, [Scroll]{@link scroll}, or
* > [WaterFlow]{@link water_flow}, you are advised to set the width and height of the
* > **ArcScrollBar** component. Otherwise, the width and height of the component may be infinite.
* >
* > - This component can be used on phones, PCs, 2-in-1 devices, tablets, TVs, and wearables. In API version 22 and
* > earlier versions, a compilation warning will be reported when this component is used on phones, PCs, 2-in-1 devices
* > , tablets, and TVs, but the component can still run properly.
*
* ###### Child Components
*
* Not supported
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @uicomponent
* @since 18
* @noninterop
*/
export declare const ArcScrollBar: ArcScrollBarInterface;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.ArcSwiper.d.ts.md
# @ohos.arkui.ArcSwiper.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Defines the callback to notify the application when the animation stops playing.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type FinishAnimationHandler = () => void;
/**
* Implements the controller of the **ArcSwiper** component. You can bind this object to the **ArcSwiper** component and
* use it to control page switching.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
export class ArcSwiperController {
/**
* A constructor used to create an **ArcSwiperController** instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
constructor();
/**
* Turns to the next page. Page turning occurs with the animation, whose duration is specified by
* [duration]{@link ArcSwiperAttribute#duration}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
showNext();
/**
* Turns to the previous page. Page turning occurs with the animation, whose duration is specified by
* [duration]{@link ArcSwiperAttribute#duration}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
showPrevious();
/**
* Stops an animation.
*
* @param { FinishAnimationHandler } handler - Callback invoked when the animation stops.<br>If no value is provided,
* no callback is performed.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
finishAnimation(handler?: FinishAnimationHandler);
}
/**
* Declare the direction of arc indicator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
export enum ArcDirection {
/**
* 3 o'clock direction.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
THREE_CLOCK_DIRECTION = 0,
/**
* 6 o'clock direction.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
SIX_CLOCK_DIRECTION = 1,
/**
* 9 o'clock direction.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
NINE_CLOCK_DIRECTION = 2
}
/**
* Describes the properties and behavior of the arc dot navigation indicator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
export class ArcDotIndicator {
/**
* A constructor used to create an **ArcDotIndicator** instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
constructor();
/**
* Sets the direction of the arc navigation indicator.
*
* @param { Optional<ArcDirection> } direction - Direction of the arc navigation indicator.<br>Default value:
* **ArcDirection.SIX_CLOCK_DIRECTION** (6 o'clock direction)
* @returns { ArcDotIndicator } Properties and functionality of the arc navigation indicator.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
arcDirection(direction: Optional<ArcDirection>): ArcDotIndicator;
/**
* Sets the color of the unselected navigation points in the arc navigation indicator.
*
* @param { Optional<ResourceColor> } color - Color of the unselected navigation points in the arc navigation
* indicator.<br>Default value: **'#A9FFFFFF'**
* @returns { ArcDotIndicator } Properties and functionality of the arc navigation indicator.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
itemColor(color: Optional<ResourceColor>): ArcDotIndicator;
/**
* Sets the color of the selected navigation point in the arc navigation indicator.
*
* @param { Optional<ResourceColor> } color - Color of the selected navigation point in the arc navigation indicator.<
* br>Default value: **#FF5EA1FF**
* @returns { ArcDotIndicator } Properties and functionality of the arc navigation indicator.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selectedItemColor(color: Optional<ResourceColor>): ArcDotIndicator;
/**
* Sets the color of the arc navigation indicator when it is long-pressed.
*
* @param { Optional<ResourceColor> } color - Color of the arc navigation indicator when it is long-pressed.<br>
* Default value: **'#FF404040'**
* @returns { ArcDotIndicator } Properties and functionality of the arc navigation indicator.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
backgroundColor(color: Optional<ResourceColor>): ArcDotIndicator;
/**
* Sets the mask gradient color of the arc navigation indicator.
*
* @param { Optional<LinearGradient> } color - Mask gradient color of the arc navigation indicator.<br>Default start
* color: **'#00000000'**<br>Default end color: **'#FF000000'**
* @returns { ArcDotIndicator } Properties and functionality of the arc navigation indicator.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
maskColor(color: Optional<LinearGradient>): ArcDotIndicator;
}
/**
* Provide an interface for ArcSwiper.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
interface ArcSwiperInterface {
/**
* Creates an **ArcSwiper** component.
*
* @param { ArcSwiperController } controller - Controller bound to the component to control the page turning.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
(controller?: ArcSwiperController): ArcSwiperAttribute;
}
/**
* Defines the callback to notify the application when the index of the currently displayed element changes.
*
* @param { number } index - Index of the currently displayed element. The index is zero-based.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type IndexChangedHandler = (index: number) => void;
/**
* Defines the callback triggered when the page transition animation starts.
*
* @param { number } index - Index of the currently displayed element before the animation starts (not the final index
* after the animation ends).
* @param { number } targetIndex - Index of the target element to switch to.
* @param { SwiperAnimationEvent } event - Extra information of the animation, including the offset of the currently
* displayed element and target element relative to the start position of the **ArcSwiper** along the main axis, and
* the hands-off velocity.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type AnimationStartHandler = (index: number, targetIndex: number, event: SwiperAnimationEvent) => void;
/**
* Defines the callback triggered when the page transition animation ends.
*
* @param { number } index - Index of the currently displayed element.
* @param { SwiperAnimationEvent } event - Extra information of the animation, which is the offset of the currently
* displayed element relative to the start position of the **ArcSwiper** along the main axis.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type AnimationEndHandler = (index: number, event: SwiperAnimationEvent) => void;
/**
* Defines the callback triggered on a frame-by-frame basis during a swipe-based page turn.
*
* @param { number } index - Index of the currently displayed element.
* @param { SwiperAnimationEvent } event - Extra information of the animation, which is the offset of the currently
* displayed element relative to the start position of the **ArcSwiper** along the main axis.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare type GestureSwipeHandler = (index: number, event: SwiperAnimationEvent) => void;
/**
* Provides the information about the custom page transition animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare interface SwiperContentAnimatedTransition {
/**
* Timeout for the custom page transition animation. The timeout timer starts when the default animation (page
* scrolling) reaches the point where the first frame is moved out of the viewport. If you do not call the
* [finishTransition]{@link SwiperContentTransitionProxy.finishTransition} API of
* [SwiperContentTransitionProxy]{@link SwiperContentTransitionProxy} before the timer expires, the component
* considers that the custom animation of the page ends and immediately removes the page node from the render tree.
* The unit is ms. The default value is **0**.
*
* @default 0 ms
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
timeout?: number;
/**
* Content of the custom page transition animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
transition: Callback<SwiperContentTransitionProxy>;
}
/**
* Implements the proxy object returned during the execution of the custom page transition animation of the
* **ArcSwiper** component. You can use this object to obtain the page information in the custom animation viewport. You
* can also call the **finishTransition** API of this object to notify the **ArcSwiper** component that the custom
* animation has finished playing.
*
* > **NOTE**
*
* > - For example, when the index of the currently selected child component is 0, during a transition animation from
* > page 0 to page 1, the callback is triggered for all pages within the viewport on every frame. When pages 0 and 1
* > are both in the viewport, the callback is triggered twice per frame. The first callback has **selectedIndex** as
* > **0**, **index** as **0**, **position** as the ratio of how much page 0 has moved relative to its position before
* > the animation started on the current frame, and **mainAxisLength** as the length of page 0 on the main axis. The
* > second callback has **selectedIndex** as **0**, **index** as **1**, **position** as the ratio of how much page 1
* > has moved relative to page 0 before the animation started on the current frame, and **mainAxisLength** as the
* > length of page 1 on the main axis.
* >
* > - If the animation curve is a spring interpolation curve, during the transition animation from page 0 to page 1,
* > due to the position and velocity when the user lifts their finger off the screen, animation may overshoot and slide
* > past to page 2, then bounce back to page 1. Throughout this process, a callback is triggered for pages 1 and 2
* > within the viewport on every frame.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
declare interface SwiperContentTransitionProxy {
/**
* Index of the currently selected page.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
selectedIndex: number;
/**
* Index of a page in the viewport.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
index: number;
/**
* Position of the page specified by **index** relative to the start position of the **ArcSwiper** main axis (start
* position of the page corresponding to **selectedIndex**).
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
position: number;
/**
* Length of the page specified by **index** along the main axis.
* Unit: vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
mainAxisLength: number;
/**
* Notifies the **ArcSwiper** component that the custom animation has finished playing.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
finishTransition(): void;
}
/**
* In addition to the [universal attributes]{@link common}, the following attributes are supported.
*
* In addition to the [universal events]{@link common}, the following events are supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
declare class ArcSwiperAttribute extends CommonMethod<ArcSwiperAttribute> {
/**
* Sets the index of the child component currently displayed in the container. If the value is less than 0 or greater
* than or equal to the number of child components, the default value **0** is used.
*
* @param { Optional<number> } index - Index of the child component currently displayed in the container.<br>If
* **index** is set to **undefined**, the value **0** is used.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
index(index: Optional<number>): ArcSwiperAttribute;
/**
* Sets the style of the arc dot navigation indicator.
*
* @param { Optional<ArcDotIndicator | boolean> } style - Style of the arc dot navigation indicator.<br> -
* **ArcDotIndicator**: properties and behavior of the arc dot navigation indicator.<br> - **boolean**: whether to
* enable the arc dot navigation indicator. **true** to enable, **false** otherwise.<br> Default value: **true**<
* br> Default type: **ArcDotIndicator**
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
indicator(style: Optional<ArcDotIndicator | boolean>): ArcSwiperAttribute;
/**
* Sets the duration of the animation for child component switching.
*
* @param { Optional<number> } duration - Duration of the autoplay for child component switching.<br>Default value:
* **400**<br>Unit: ms
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
duration(duration: Optional<number>): ArcSwiperAttribute;
/**
* Sets whether vertical swiping is used.
*
* @param { Optional<boolean> } isVertical - Whether vertical swiping is used.<br>The value **true** means vertical
* swiping, and **false** means horizontal swiping.<br>Default value: **false**
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
vertical(isVertical: Optional<boolean>): ArcSwiperAttribute;
/**
* Sets whether to disable the swipe feature.
*
* @param { Optional<boolean> } disabled - Whether to disable the swipe feature. The value **true** means to disable
* the feature, and **false** means the opposite.<br>Default value: **false**
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
disableSwipe(disabled: Optional<boolean>): ArcSwiperAttribute;
/**
* Sets the sensitivity to the digital crown rotation.
*
* @param { Optional<CrownSensitivity> } sensitivity - Sensitivity to the digital crown rotation.<br>Default value:
* **CrownSensitivity.MEDIUM**.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
digitalCrownSensitivity(sensitivity: Optional<CrownSensitivity>): ArcSwiperAttribute;
/**
* Triggered when the index of the currently displayed child component changes. The return value is the index of the
* currently displayed child component.
*
* When the **ArcSwiper** component is used together with
* [LazyForEach](docroot://ui/rendering-control/arkts-rendering-control-lazyforeach.md), the subpage UI update cannot
* be triggered in the **onChange** event.
*
* @param { Optional<IndexChangedHandler> } handler - Callback for the index of the currently displayed element.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onChange(handler: Optional<IndexChangedHandler>): ArcSwiperAttribute;
/**
* Triggered when the page transition animation starts.
*
* @param { Optional<AnimationStartHandler> } handler - Triggered when the page transition animation starts.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onAnimationStart(handler: Optional<AnimationStartHandler>): ArcSwiperAttribute;
/**
* Triggered when the page transition animation ends.
*
* This event is triggered when the page transition animation of the **ArcSwiper** component ends, whether it is
* caused by gesture interruption or by calling **finishAnimation** through
* [SwiperController]{@link SwiperController}. The **index** parameter indicates the index after the animation ends.
* When the **ArcSwiper** component contains multiple columns, the index is of the leftmost element.
*
* @param { Optional<AnimationEndHandler> } handler - Triggered when the page transition animation ends.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onAnimationEnd(handler: Optional<AnimationEndHandler>): ArcSwiperAttribute;
/**
* Triggered on a frame-by-frame basis when the page is turned by a swipe.
*
* @param { Optional<GestureSwipeHandler> } handler - Triggered on a frame-by-frame basis when the page is turned by a
* swipe.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
onGestureSwipe(handler: Optional<GestureSwipeHandler>): ArcSwiperAttribute;
/**
* Sets the effect used when the scroll boundary is reached. For details about the supported effects, see
* [EdgeEffect]{@link EdgeEffect}. The setting does not take effect when configured using the controller API.
*
* @param { Optional<EdgeEffect> } edgeEffect - Effect used when the component is at one of the edges.<br>Default
* value: **EdgeEffect.Spring**
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
effectMode(edgeEffect: Optional<EdgeEffect>): ArcSwiperAttribute;
/**
* Defines a custom page transition animation. During finger-following swipes and post-release transition animations,
* this triggers a frame-by-frame callback for all pages in the viewport, allowing you to customize animations by
* modifying properties like opacity, scale, and translation.
*
* During finger-following swipes and post-release transition animations, the
* [SwiperContentTransitionProxy]{@link SwiperContentTransitionProxy} callback is invoked for all pages in the
* viewport on a frame-by-frame basis. For example, when there are two pages whose subscripts are 0 and 1 in the
* viewport, two callbacks whose indexes are 0 and 1 are invoked in each frame.
*
* @param { Optional<SwiperContentAnimatedTransition> } transition - Information about the custom page transition
* animation.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
customContentTransition(transition: Optional<SwiperContentAnimatedTransition>): ArcSwiperAttribute;
/**
* Sets whether to disable the transition animation.
*
* @param { Optional<boolean> } disabled - Whether to disable the transition animation.<br>**true**: Disable the
* animation effect. **false**: Do not disable the animation effect.<br>If the input parameter is invalid, the
* value **false** is used.
* @returns { ArcSwiperAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
*/
disableTransitionAnimation(disabled: Optional<boolean>): ArcSwiperAttribute;
}
/**
* Defines the ArcSwiper Component that can provide the ability for sub components to swipe and display.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @uicomponent [since 19]
* @since 18
* @noninterop
*/
declare let ArcSwiper: ArcSwiperInterface;
/**
* Defines ArcSwiper Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @crossplatform
* @atomicservice
* @since 18
* @noninterop
*/
declare let ArcSwiperInstance: ArcSwiperAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkDynamicLayout.d.ts.md
# @ohos.arkui.components.ArkDynamicLayout.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import { LayoutAlgorithm } from './arkui/LayoutAlgorithm';
/**
* Defines the dynamic layout container.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 24
*/
export interface DynamicLayoutInterface {
/**
* Defines the dynamic layout container.
*
* @param { LayoutAlgorithm } algorithm - Layout algorithm of the dynamic layout component. If an invalid value is
* used, the child components are stacked and arranged according to
* [StackLayoutAlgorithm](docroot://reference/apis-arkui/js-apis-arkui-layoutAlgorithm.md#stacklayoutalgorithm).
* @returns { DynamicLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 24
*/
(algorithm: LayoutAlgorithm): DynamicLayoutAttribute;
}
/**
* The [universal attributes]{@link CommonMethod} are supported.
*
* > **NOTE**
* >
* > - When the layout algorithm is [RowLayoutAlgorithm]{@link ./arkui/LayoutAlgorithm:RowLayoutAlgorithm} or
* > [ColumnLayoutAlgorithm]{@link ./arkui/LayoutAlgorithm:ColumnLayoutAlgorithm},
* > the [Flex layout](docroot://reference/apis-arkui/arkui-ts/ts-universal-attributes-flex-layout.md) attributes set
* > for child components take effect.
* >
* > - When the layout algorithm is [StackLayoutAlgorithm]{@link ./arkui/LayoutAlgorithm:StackLayoutAlgorithm},
* > the [layoutGravity]{@link CommonMethod#layoutGravity} attribute set for child components takes effect.
* >
* > - When the layout algorithm is
* > [CustomLayoutAlgorithm]{@link ./arkui/LayoutAlgorithm:CustomLayoutAlgorithm},
* > the [setMeasuredSize]{@link ./arkui/FrameNode:FrameNode#setMeasuredSize} method of the
* > [FrameNode]{@link ./arkui/FrameNode:FrameNode} component of **DynamicLayout** has a higher priority than the
* > [sizing]{@link CommonMethod#size} and [border styling]{@link CommonMethod#border} attributes. The
* > [measure]{@link ./arkui/FrameNode:FrameNode#measure} and [layout]{@link ./arkui/FrameNode:FrameNode#layout} methods
* > of the child component [FrameNode]{@link ./arkui/FrameNode:FrameNode} have a higher priority than the
* > [ignoreLayoutSafeArea]{@link CommonMethod#ignoreLayoutSafeArea} attribute.
*
* The [universal events](docroot://reference/apis-arkui/arkui-ts/ts-component-general-events.md) are supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 24
*/
export declare class DynamicLayoutAttribute extends CommonMethod<DynamicLayoutAttribute> {
}
/**
* Defines the dynamic layout container component, which supports dynamically switching between different layout
* algorithms at runtime without changing the status of child components.
* > **Child Components**
* >
* > Child components are supported.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @uicomponent
* @since 24
*/
export declare const DynamicLayout: DynamicLayoutInterface;
/**
* Defines DynamicLayout Component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @uicomponent
* @since 24
*/
export declare const DynamicLayoutInstance: DynamicLayoutAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyColumnLayout.d.ts.md
# @ohos.arkui.components.ArkLazyColumnLayout.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Defines the lazy column layout component.
*
* @interface LazyColumnLayoutInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface LazyColumnLayoutInterface {
/**
* Construct the lazy column layout attribute.
*
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
(): LazyColumnLayoutAttribute;
}
/**
* Defines the lazy column layout attribute.
*
* @extends CommonMethod<LazyColumnLayoutAttribute>
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class LazyColumnLayoutAttribute extends CommonMethod<LazyColumnLayoutAttribute> {
/**
* The spacing between rows.
*
* @param { LengthMetrics | undefined } space - the spacing between rows.
* <br>Default value: 0. <br>Range: [0, +∞).
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
space(space: LengthMetrics | undefined): LazyColumnLayoutAttribute;
/**
* Sets the horizontal alignment of the row content.
*
* @param { HorizontalAlign | undefined } value - the horizontal alignment of the row content.
* <br>Default value HorizontalAlign.Center.
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
alignItems(value: HorizontalAlign | undefined): LazyColumnLayoutAttribute;
/**
* Sets the header of the lazy column layout.
*
* @param { CustomBuilder | undefined } builder - The header builder function
* <br>Passing undefined will remove the header.
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
header(builder: CustomBuilder | undefined): LazyColumnLayoutAttribute;
/**
* Sets the footer of the lazy column layout.
*
* @param { CustomBuilder | undefined } builder - The footer builder function
* <br>Passing undefined will remove the footer.
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
footer(builder: CustomBuilder | undefined): LazyColumnLayoutAttribute;
/**
* Sets sticky style for header and footer.
*
* @param { StickyStyle | undefined } sticky - The sticky style for header and footer.
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
sticky(sticky: StickyStyle | undefined): LazyColumnLayoutAttribute;
/**
* Triggered when the index of child components in the visible area changes.
*
* @param { OnVisibleIndexesChangeCallback | undefined } callback - callback function, triggered
* when the index of child components in the visible area changes.
* <br>Passing undefined will unregister the callback.
* @returns { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onVisibleIndexesChange(callback: OnVisibleIndexesChangeCallback | undefined): LazyColumnLayoutAttribute;
}
/**
* Defines the lazy column layout component.
*
* @type { LazyColumnLayoutInterface }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const LazyColumnLayout: LazyColumnLayoutInterface;
/**
* Defines the lazy column layout component instance.
*
* @type { LazyColumnLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const LazyColumnLayoutInstance: LazyColumnLayoutAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyDynamicLayout.d.ts.md
# @ohos.arkui.components.ArkLazyDynamicLayout.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import { LazyLayoutAlgorithm } from './arkui/LazyLayoutAlgorithm';
/**
* Defines the LazyDynamicLayout attribute functions.
*
* @extends CommonMethod<LazyDynamicLayoutAttribute>
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class LazyDynamicLayoutAttribute extends CommonMethod<LazyDynamicLayoutAttribute> {
/**
* Called when visible indexes change.
*
* @param { Callback<number[]> | undefined } callback - Callback used to return the list of index
* numbers of visible subcomponents.
* <br>Passing undefined will unregister the callback.
* @returns { LazyDynamicLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onVisibleIndexesChange(callback: Callback<number[]> | undefined): LazyDynamicLayoutAttribute;
}
/**
* Defines LazyDynamicLayout Component.
*
* @param { LazyLayoutAlgorithm } algorithm - Lazy layout algorithm.
* @returns { LazyDynamicLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare function LazyDynamicLayout(algorithm: LazyLayoutAlgorithm): LazyDynamicLayoutAttribute;
/**
* Defines LazyDynamicLayout Component instance.
* @type { LazyDynamicLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const LazyDynamicLayoutInstance: LazyDynamicLayoutAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ArkLazyWaterFlowLayout.d.ts.md
# @ohos.arkui.components.ArkLazyWaterFlowLayout.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Defines the lazy vertical waterflow layout component.
*
* @interface LazyVWaterFlowLayoutInterface
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface LazyVWaterFlowLayoutInterface {
/**
* Construct the lazy vertical waterflow attribute.
*
* @returns { LazyVWaterFlowLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
(): LazyVWaterFlowLayoutAttribute;
}
/**
* Defines the lazy waterflow layout attribute.
*
* @extends CommonMethod<T>
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class LazyWaterFlowLayoutAttribute<T> extends CommonMethod<T> {
/**
* The spacing between rows.
*
* @param { LengthMetrics | undefined } value - The spacing between rows.
* <br>Default value: LengthMetrics.vp(0)
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
rowsGap(value: LengthMetrics | undefined): T;
/**
* The spacing between columns.
*
* @param { LengthMetrics | undefined } value - The spacing between columns.
* <br>Default value: LengthMetrics.vp(0)
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
columnsGap(value: LengthMetrics | undefined): T;
/**
* Sets the header of the lazy waterflow layout.
*
* @param { CustomBuilder | undefined } builder - The header builder function.
* <br>Passing undefined will remove the header.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
header(builder: CustomBuilder | undefined): T;
/**
* Sets the footer of the lazy waterflow layout.
*
* @param { CustomBuilder | undefined } builder - The footer builder function.
* <br>Passing undefined will remove the footer.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
footer(builder: CustomBuilder | undefined): T;
/**
* Sets the sticky style for header and footer.
*
* @param { StickyStyle | undefined } sticky - The sticky style for header and footer.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
sticky(sticky: StickyStyle | undefined): T;
/**
* Called when the first or last item displayed in the component changes.
* It is triggered once when the component is initialized.
*
* @param { OnVisibleIndexesChangeCallback | undefined } callback - callback function, triggered
* when the index of child components in the visible area changes.
* <br>Passing undefined will unregister the callback.
* @returns { T }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onVisibleIndexesChange(callback: OnVisibleIndexesChangeCallback | undefined): T;
}
/**
* Defines the lazy vertical waterflow layout attribute.
*
* @extends LazyWaterFlowLayoutAttribute<LazyVWaterFlowLayoutAttribute>
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class LazyVWaterFlowLayoutAttribute extends LazyWaterFlowLayoutAttribute<LazyVWaterFlowLayoutAttribute> {
/**
* This parameter specifies the number of columns in the current waterflow layout.
*
* @param { string | ItemFillPolicy | undefined } value - Number of columns in the layout.
* <br>Default value: '1fr'
* <br>When the value is a string, it sets the number of columns or the minimum column width
* of the current <em>LazyVWaterFlowLayout</em>. For example,
* <em>columnsTemplate('1fr 1fr 2fr')</em> divides the <em>LazyVWaterFlowLayout</em> into 3 columns,
* splitting the width into 4 equal parts: column 1 takes 1 part, column 2 takes 1 part,
* and column 3 takes 2 parts.
* @returns { LazyVWaterFlowLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
columnsTemplate(value: string | ItemFillPolicy | undefined): LazyVWaterFlowLayoutAttribute;
}
/**
* Defines LazyVWaterFlowLayout Component.
*
* @type { LazyVWaterFlowLayoutInterface }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const LazyVWaterFlowLayout: LazyVWaterFlowLayoutInterface;
/**
* Defines LazyVWaterFlowLayout Component instance.
*
* @type { LazyVWaterFlowLayoutAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const LazyVWaterFlowLayoutInstance: LazyVWaterFlowLayoutAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.ContainerReader.d.ts.md
# @ohos.arkui.components.ContainerReader.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import { Size } from './arkui/Graphics';
/**
* Defines the configuration options for ContainerReader component.
* Used to specify the parameters for container dimension reading and breakpoint analysis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
export interface ContainerReaderInfo {
/**
* The target container size for layout analysis.
* Defines the reference dimensions used for breakpoint calculation and layout adaptation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
size: Size;
/**
* Optional width breakpoint configuration for container width analysis.
* Defines the width thresholds that trigger different layout behaviors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
widthBreakpoint?: WidthBreakpoint;
/**
* Optional height breakpoint configuration for container height analysis.
* Defines the height thresholds that trigger different layout behaviors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
heightBreakpoint?: HeightBreakpoint;
}
/**
* Defines the breakpoint configuration options for container dimension analysis.
* Specifies threshold values that trigger different layout behaviors based on container size.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
export interface BreakpointOptions {
/**
* Optional array of width breakpoint values in vp units.
* Defines the width thresholds for container width analysis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
width?: Array<number>;
/**
* Optional array of height breakpoint values in vp units.
* Defines the height thresholds for container height analysis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
height?: Array<number>;
}
/**
* Defines the ContainerReader Component.
* Used for reading and analyzing container layout information based on size breakpoints in dynamic scenarios.
* Provides container dimension analysis and breakpoint detection capabilities.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
export interface ContainerReaderInterface {
/**
* Sets the container reading configuration for ContainerReader component.
* Configures the size parameters and breakpoint rules for container layout analysis.
*
* @param { ContainerReaderInfo } value - The configuration options for container reading
* @returns { ContainerReaderAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
(value: ContainerReaderInfo): ContainerReaderAttribute;
}
/**
* Defines the ContainerReader attribute functions.
* Provides methods for configuring container reading parameters and breakpoint analysis properties.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
export declare class ContainerReaderAttribute extends CommonMethod<ContainerReaderAttribute> {
/**
* Sets the breakpoint configuration for container dimension analysis.
* Defines a set of threshold values that trigger different layout behaviors based on container size.
*
* @param { BreakpointOptions } [value] - An array of breakpoint values in vp
* @returns { ContainerReaderAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @since 26.0.0
*/
breakpointConfig(value?: BreakpointOptions): ContainerReaderAttribute;
}
/**
* Defines ContainerReader Component.
* A component that analyzes container dimensions and provides breakpoint information for responsive layouts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const ContainerReader: ContainerReaderInterface;
/**
* Defines ContainerReader Component instance.
* Provides access to ContainerReader component methods for container dimension analysis and breakpoint detection.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @form
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const ContainerReaderInstance: ContainerReaderAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.components.SelectionContainer.d.ts.md
# @ohos.arkui.components.SelectionContainer.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* Defines text join style for SelectionContainer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare enum SelectionContainerTextJoinStyle {
/**
* Join text with line break (`\n`) between text nodes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
NEWLINE = 0,
/**
* Join text directly without separator between text nodes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
DIRECT = 1
}
/**
* Defines selection menu options for SelectionContainer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface SelectionContainerMenuOptions {
/**
* Called when the selection menu appears.
* The callback parameter is the selected text concatenated in the visual order of Text components.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onAppear?: Callback<string>;
/**
* Called when the selection menu disappears.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onDisappear?: Callback<void>;
/**
* Called when the selection menu is displayed.
* The callback parameter is the selected text concatenated in the visual order of Text components.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onMenuShow?: Callback<string>;
/**
* Called when the selection menu is hidden.
* The callback parameter is the selected text concatenated in the visual order of Text components.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onMenuHide?: Callback<string>;
}
/**
* Invoke upon clicking an item, capable of intercepting the default system menu execution behavior.
*
* @param { TextMenuItem } menuItem - current clicked menu item.
* @param { string } value - selected text content.
* @returns { boolean } Return true if the event is consumed; false otherwise.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export type OnMenuItemClickWithTextCallback = (menuItem: TextMenuItem, value: string) => boolean;
/**
* Defines custom edit menu options for SelectionContainer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface SelectionContainerEditMenuOptions {
/**
* Passes the default menu, invokes before every display to generate a menu for triggering click events.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onCreateMenu?: OnCreateMenuCallback;
/**
* Invoked upon clicking an item, capable of intercepting the default system menu execution behavior.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onMenuItemClick?: OnMenuItemClickWithTextCallback;
/**
* Callback before displaying the menu when the selection text changes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onPrepareMenu?: OnPrepareMenuCallback;
}
/**
* Describes the initialization options of the SelectionContainer component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface SelectionContainerOptions {
/**
* SelectionContainer controller.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
controller: SelectionContainerController;
}
/**
* Defines the controller of the SelectionContainer component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class SelectionContainerController {
/**
* Closes the custom or default selection menu of the SelectionContainer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
closeSelectionMenu(): void;
/**
* Clears the current text selection of the SelectionContainer,
* and closes the selection menu if it is currently shown.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
clearTextSelection(): void;
}
/**
* Provides a SelectionContainer component interface.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface SelectionContainerInterface {
/**
* Defines the constructor of SelectionContainer.
*
* @param { SelectionContainerOptions } [value] - Initialization options of the component.
* @returns { SelectionContainerAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
(value?: SelectionContainerOptions): SelectionContainerAttribute;
}
/**
* Defines the attributes of SelectionContainer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class SelectionContainerAttribute extends CommonMethod<SelectionContainerAttribute> {
/**
* Set whether to allow copy and where data can be copied.
*
* @param { Optional<CopyOptions> } value - copy option for selected text. Default value is CopyOptions.InApp.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
copyOption(value: Optional<CopyOptions>): SelectionContainerAttribute;
/**
* Set the caret color for selected text.
*
* @param { Optional<ResourceColor> } color - caret color.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
caretColor(color: Optional<ResourceColor>): SelectionContainerAttribute;
/**
* Set selected text background color.
*
* @param { Optional<ResourceColor> } color - selected text background color.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
selectedBackgroundColor(color: Optional<ResourceColor>): SelectionContainerAttribute;
/**
* Enable or disable haptic feedback.
*
* @param { Optional<boolean> } isEnabled - whether to enable haptic feedback. Default value is true.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
enableHapticFeedback(isEnabled: Optional<boolean>): SelectionContainerAttribute;
/**
* Set text join style for aggregated text in SelectionContainer.
*
* <p><strong>NOTE</strong>:
* <br>This setting affects the string value used in callbacks such as onWillCopy and onCopy.
* <br>It also affects built-in text menu item logic that depends on string concatenation, such as copy.
* <br>The default style is SelectionContainerTextJoinStyle.NEWLINE.
* </p>
*
* @param { Optional<SelectionContainerTextJoinStyle> } style - text join style for aggregated text.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
textJoinStyle(style: Optional<SelectionContainerTextJoinStyle>): SelectionContainerAttribute;
/**
* Bind to the selection menu.
*
* <p><strong>NOTE</strong>:
* <br>The duration required for a long-press gesture is 600 ms for bindSelectionMenu and 800 ms for bindContextMenu.
* <br>When both bindSelectionMenu and bindContextMenu are set and both are configured to be triggered by a
* long-press gesture, bindSelectionMenu is triggered first.
* <br>If the custom menu is too long, embed a Scroll component to prevent the keyboard from being blocked.
* </p>
*
* @param { Optional<TextSpanType> } spanType - Indicates the type of selection menu. Default value is
* TextSpanType.TEXT.
* @param { Optional<CustomBuilder> } content - Indicates the content of selection menu.
* @param { Optional<TextResponseType> } responseType - Indicates response type of selection menu. Default value is
* TextResponseType.LONG_PRESS.
* @param { Optional<SelectionContainerMenuOptions> } [options] - Indicates the options of selection menu.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
bindSelectionMenu(spanType: Optional<TextSpanType>, content: Optional<CustomBuilder>, responseType: Optional<TextResponseType>, options?: Optional<SelectionContainerMenuOptions>): SelectionContainerAttribute;
/**
* Set the custom text menu.
* Sets the extended options of the custom context menu on selection,
* including the text content, icon, and callback.
*
* @param { Optional<SelectionContainerEditMenuOptions> } editMenu - Customize text menu options.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
editMenuOptions(editMenu: Optional<SelectionContainerEditMenuOptions>): SelectionContainerAttribute;
/**
* Called when text selection changes in SelectionContainer.
*
* @param { Optional<Callback<Array<string>>> } callback - callback of selection change event.
* The order of items in the first callback parameter array is consistent with the visual order of Text
* components.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onTextSelectionChange(callback: Optional<Callback<Array<string>>>): SelectionContainerAttribute;
/**
* Called before using the Clipboard copy menu.
* Currently, only text can be copied.
*
* @param { Optional<Callback<string, boolean>> } callback - callback used to check whether copy is allowed.
* The first callback parameter (string) is the selected text concatenated in the visual order of Text components.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onWillCopy(callback: Optional<Callback<string, boolean>>): SelectionContainerAttribute;
/**
* Called when selected text is copied.
* Currently, only text can be copied.
*
* @param { Optional<Callback<string>> } callback - callback of copy event.
* The callback parameter (string) is the selected text concatenated in the visual order of Text components.
* @returns { SelectionContainerAttribute } returns the instance of the SelectionContainerAttribute.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onCopy(callback: Optional<Callback<string>>): SelectionContainerAttribute;
}
/**
* Defines SelectionContainer component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const SelectionContainer: SelectionContainerInterface;
/**
* Defines SelectionContainer component instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const SelectionContainerInstance: SelectionContainerAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.componentSnapshot.d.ts.md
# @ohos.arkui.componentSnapshot.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import { AsyncCallback } from './@ohos.base';
import image from './@ohos.multimedia.image';
import colorSpaceManager from './@ohos.graphics.colorSpaceManager';
/**
* The **componentSnapshot** module provides APIs for obtaining component snapshots, including snapshots of components
* that have been loaded and snapshots of components that have not been loaded yet. Snapshots are strictly limited to
* the component's layout bounds. Content drawn outside the area of the owning component or the parent component is not
* visible in the snapshots. In addition, sibling components stacked in the component's area are not displayed in the
* snapshot.
*
* Transformation attributes such as scaling, translation, and rotation only apply to the child components of the target
* component. Applying these transformation attributes directly to the target component itself has no effect; the
* snapshot will still display the component as it appears before any transformations are applied.
*
* For typical use cases (for example, long screenshots) and best practices of component snapshots, see
* [Using Component Snapshot (ComponentSnapshot)](docroot://ui/arkts-uicontext-component-snapshot.md).
*
* > **NOTE**
* >
* > - In scenarios where [XComponent]{@link xcomponent} is used to, for example, display video or camera streams,
* > obtain images through
* > [createPixelMapFromSurface]{@link @ohos.multimedia.image:image.createPixelMapFromSurface(surfaceId: string, region: Region)},
* > instead of through an API in this module.
* >
* > - If the content of a component does not fill the entire area allocated for it, any remaining space in the snapshot
* > will be rendered as transparent pixels. In addition, if the component uses [image effects]{@link common} or other
* > effect-related attributes, the resulting snapshot may not be as expected. To address these potential issues, check
* > whether the component's transparent content area needs to be filled, or use the window screenshot API
* > [snapshot]{@link @ohos.window:window.Window#snapshot(callback: AsyncCallback<image.PixelMap>)} instead.
* >
* > - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
declare namespace componentSnapshot {
/**
* Defines the rectangular region for capturing the component snapshot.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
interface SnapshotRegion {
/**
* X-coordinate of the upper left corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component width].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
left: number;
/**
* X-coordinate of the lower right corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component width].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
right: number;
/**
* Y-coordinate of the upper left corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component height].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
top: number;
/**
* Y-coordinate of the lower right corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component height].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
bottom: number;
}
/**
* Defines the rectangular region for capturing the component snapshot, with coordinates adjusted based on the layout
* direction (LTR or RTL).
*
* > **NOTE**
* >
* > Directly using **componentSnapshot** can lead to the issue of
* > [ambiguous UI context](docroot://ui/arkts-global-interface.md#ambiguous-ui-context). To avoid this, obtain a
* > **UIContext** instance using **getUIContext()**, and then obtain the associated **componentSnapshot** object
* > using
* > [getComponentSnapshot](docroot://reference/apis-arkui/arkts-apis-uicontext-uicontext.md#getcomponentsnapshot12).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
interface LocalizedSnapshotRegion {
/**
* For LTR layouts: X-coordinate of the upper left corner of the rectangular region.
*
* For RTL layouts: X-coordinate of the upper right corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component width].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
start: number;
/**
* For LTR layouts: X-coordinate of the lower right corner of the rectangular region.
*
* For RTL layouts: X-coordinate of the lower left corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component width].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
end: number;
/**
* For LTR layouts: Y-coordinate of the upper left corner of the rectangular region.
*
* For RTL layouts: Y-coordinate of the upper right corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component height].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
top: number;
/**
* Y-coordinate of the lower right corner of the rectangular region.
*
* Unit: px.
*
* Value range: [0, Component height].
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
bottom: number;
}
/**
* Defines the snapshot region rect type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion;
/**
* Defines the color space used for the snapshot.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
interface ColorModeOptions {
/**
* Color space used for the snapshot.
*
* If the target component's color space is known, specify it through **colorSpace** and set **isAuto** to **false**
* to achieve optimal snapshot quality.
*
* The value can be **DISPLAY_P3**, **SRGB**, or **DISPLAY_BT2020_SRGB** in
* [colorSpaceManager.ColorSpace]{@link @ohos.graphics.colorSpaceManager:colorSpaceManager.ColorSpace}.
*
* Default value: **SRGB**
*
* If the value is **undefined**, **null**, or not set, the default value is used. If an abnormal value is used,
* snapshot capture fails and the error code 160003 is returned.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
colorSpace?: colorSpaceManager.ColorSpace;
/**
* Whether the system automatically determines the color space to be used.
*
* The value **true** means to allow the system to automatically determine the color space to be used, and **false**
* means to manually set the color space through **colorSpace**. If an invalid value is used, the default value
* **false** is used.
*
* Default value: **false**
*
* For offscreen snapshots, this parameter can only be set to **false**. Otherwise, the error code 160004 will be
* returned.
*
* If `isAuto` is set to **true**, you are advised to set `waitUntilRenderFinished` in
* [SnapshotOptions]{@link componentSnapshot.SnapshotOptions} to **true** to ensure that the system can properly
* detect the used color space.
*
* If the color space used by the component is uncertain, you are advised to set **isAuto** to **true** so that the
* system can automatically determine the color space to be used.
*
* When **isAuto** is set to true, the value of **colorSpace** is ignored. In this case, if the target component
* contains child components in different color spaces, the color space with the highest priority is used for the
* snapshot. The priority order of the color space is as follows: **DISPLAY_BT2020_SRGB** > **DISPLAY_P3** >
* **SRGB**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
isAuto?: boolean;
}
/**
* Defines the dynamic range mode used for the snapshot.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
interface DynamicRangeModeOptions {
/**
* Dynamic range mode used for the snapshot.
*
* By default, the system snapshots in [STANDARD]{@link ImageAttribute#dynamicRangeMode} mode. If the dynamic range
* mode used by the target component is known, you can specify the dynamic range mode using the **dynamicRangeMode**
* field and set **isAuto** to **false** to achieve the expected snapshot effect.
*
* There are three dynamic range modes available. HDR is applied for **HIGH** and **CONSTRAINT** modes, and SDR is
* applied for **STANDARD** mode.
*
* After a valid dynamic range mode is specified, the dynamic range to be used for the snapshot is determined by
* both the target component and the specified mode. The details are as follows:
*
* 1. If SDR is used for the component, SDR is applied for the snapshot even if the dynamic range mode is set to **HIGH**.
* 2. If HDR is used for the component, the specified dynamic range mode is applied for the screenshot.
* 3. If the [color space]{@link componentSnapshot.ColorModeOptions} is set to **SRGB** or **DISPLAY_P3**, SDR is applied for the snapshot.
* 4. If both SDR and HDR are used for the child components, HDR is applied for the snapshot.
* 5. If both conditions 3 and 4 are met, SDR is applied for the snapshot.
*
* For details about the enum values, see [DynamicRangeMode]{@link ImageAttribute#dynamicRangeMode}.
*
* Default value: **STANDARD**
*
* If the value is **undefined**, **null**, or not set, the default value is used. If an abnormal value is used,
* snapshot capture fails and the error code 160003 is returned.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
dynamicRangeMode?: DynamicRangeMode;
/**
* Whether the system automatically determines the dynamic range mode to be used.
*
* The value **true** means to allow the system to automatically determine the dynamic range mode to be used, and
* **false** means to manually set the dynamic range mode through **dynamicRangeMode**. If an invalid value is used,
* the default value **false** is used.
*
* Default value: **false**
*
* For offscreen snapshots, this parameter can only be set to **false**. Otherwise, the error code 160004 will be
* returned.
*
* If `isAuto` is set to **true**, you are advised to set `waitUntilRenderFinished` in
* [SnapshotOptions]{@link componentSnapshot.SnapshotOptions} to **true** to ensure that the system can properly
* detect the used dynamic range mode.
*
* If the dynamic range mode used by the component is uncertain, you are advised to set **isAuto** to **true** so
* that the system can automatically determine the dynamic range mode to be used.
*
* When **isAuto** is set to true, the value of **dynamicRangeMode** is ignored.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
isAuto?: boolean;
}
/**
* Defines the size limit of a component screenshot.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
interface SnapshotSizeLimitation {
/**
* Maximum width of a component screenshot.
*
* Value range: (-∞, +∞)
*
* Unit: px.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
maxWidth: number;
/**
* Maximum height of a component screenshot.
*
* Value range: (-∞, +∞)
*
* Unit: px.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
maxHeight: number;
}
/**
* Defines the extra options for snapshot taking.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
interface SnapshotOptions {
/**
* Scale ratio for rendering pixel maps during a snapshot. Note that a high scale ratio may increase the time taken
* for the snapshot or even result in a snapshot failure.
*
* Value range: [0, +∞). If the value is less than or equal to 0, the default value is used.
*
* Default value: **1**
*
* **NOTE**
*
* Avoid capturing images that are excessively large, ideally not larger than the screen size. If the size of the
* image to capture exceeds device-specific underlying limits, the capture will fail.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
scale?: number;
/**
* Whether to force the system to wait for all rendering commands to complete before taking the snapshot. The value
* **true** means to force the system to wait for all rendering commands to complete before taking the snapshot, and
* **false** means the opposite. This option ensures the snapshot reflects the most up-to-date content and should be
* enabled whenever possible. Note that enabling this option may increase the time required for the snapshot to
* complete, which depends on the size of the area that needs to be redrawn at the time.
*
* Default value: **false**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
waitUntilRenderFinished?: boolean;
/**
* Rectangular region for the snapshot. The default region is the entire component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
region?: SnapshotRegionType;
/**
* Color space used for the snapshot.
*
* Default value: **{colorSpace: SRGB, isAuto: false}**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
colorMode?: ColorModeOptions;
/**
* Dynamic range mode used for the snapshot.
*
* Default value: **{dynamicRangeMode: STANDARD, isAuto: false}**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
dynamicRangeMode?: DynamicRangeModeOptions;
}
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - Since API version 12, you can use the [getComponentSnapshot]{@link @ohos.arkui.UIContext:UIContext#getComponentSnapshot}
* > API in [UIContext]{@link @ohos.arkui.UIContext} to obtain the [ComponentSnapshot]{@link @ohos.arkui.UIContext:ComponentSnapshot}
* > object associated with the current UI context.
* >
* > - The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.
* @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the result.
* @param { SnapshotOptions } [options] - Custom settings of the snapshot. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.ComponentSnapshot#get
*/
function get(id: string, callback: AsyncCallback<image.PixelMap>, options?: SnapshotOptions): void;
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API uses a promise to return the result.
*
* > **NOTE**
* >
* > - Since API version 12, you can use the [getComponentSnapshot]{@link @ohos.arkui.UIContext:UIContext#getComponentSnapshot}
* > API in [UIContext]{@link @ohos.arkui.UIContext} to obtain the [ComponentSnapshot]{@link @ohos.arkui.UIContext:ComponentSnapshot}
* > object associated with the current UI context.
* >
* > - The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.
* @param { SnapshotOptions } [options] - Custom settings of the snapshot. [since 12]
* @returns { Promise<image.PixelMap> } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.ComponentSnapshot#get
*/
function get(id: string, options?: SnapshotOptions): Promise<image.PixelMap>;
/**
* Renders a custom component in the application background and outputs its snapshot. This API uses an asynchronous
* callback to return the result. The coordinates and size of the offscreen component's drawing area can be obtained
* through the callback.
*
* > **NOTE**
* >
* > - Since API version 12, you can use the [getComponentSnapshot]{@link @ohos.arkui.UIContext:UIContext#getComponentSnapshot}
* > API in [UIContext]{@link @ohos.arkui.UIContext} to obtain the [ComponentSnapshot]{@link @ohos.arkui.UIContext:ComponentSnapshot}
* > object associated with the current UI context.
* >
* > - To account for the time spent in awaiting component building and rendering, the callback of offscreen snapshots
* > has a delay of less than 500 ms.
* >
* > - Components in the builder do not support the setting of animation-related attributes, such as
* > [transition]{@link common}.
* >
* > - If a component is on a time-consuming task, for example, an [Image]{@link image} or [Web]{@link web} component
* > that is loading online images, its loading may be still in progress when this API is called. In this case, the
* > output snapshot does not represent the component in the way it looks when the loading is successfully completed.
*
* @param { CustomBuilder } builder - Builder of the custom component.<br>Note: The global builder is not supported.<
* br>If the root component of the builder has a width or height of zero, the snapshot operation will fail with
* error code 100001.
* @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the result. The coordinates and size of
* the offscreen component's drawing area can be obtained through the callback.
* @param { number } [delay] - Delay time for triggering the screenshot command. When the layout includes an image
* component, it is necessary to set a delay time to allow the system to decode the image resources. The decoding
* time is subject to the resource size. In light of this, whenever possible, use pixel map resources that do not
* require decoding.<br> When pixel map resources are used or when **syncLoad** to **true** for the **Image**
* component, you can set **delay** to **0** to forcibly capture snapshots without waiting. This delay time does
* not refer to the time from the API call to the return: As the system needs to temporarily construct the passed-
* in **builder** offscreen, the return time is usually longer than this delay.<br>Note: In the **builder** passed
* in, state variables should not be used to control the construction of child components. If they are used, they
* should not change when the API is called, so as to avoid unexpected snapshot results.<br> Default value:
* **300**<br> Unit: ms<br> Value range:
* [0, +∞). If the value is less than 0, the default value is used. [since 12]
* @param { boolean } [checkImageStatus] - Whether to verify the image decoding status before taking a snapshot. <br>
* **true**: Check whether all Image components have been decoded. <br>**false**: Skip verification. If the
* verification is not completed, snapshot capture will be canceled and an exception will be returned.<br>Default
* value: **false** [since 12]
* @param { SnapshotOptions } [options] - Custom settings of the snapshot. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The builder is not a valid build function.
* @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
* the ready state is required when the checkImageStatus option is enabled. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder
*/
function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void;
/**
* Renders a custom component in the application background and outputs its snapshot. This API uses a promise to
* return the result. The coordinates and size of the offscreen component's drawing area can be obtained through the
* callback.
*
* > **NOTE**
* >
* > - Since API version 12, you can use the [getComponentSnapshot]{@link @ohos.arkui.UIContext:UIContext#getComponentSnapshot}
* > API in [UIContext]{@link @ohos.arkui.UIContext} to obtain the [ComponentSnapshot]{@link @ohos.arkui.UIContext:ComponentSnapshot}
* > object associated with the current UI context.
* >
* > - To account for the time spent in awaiting component building and rendering, the callback of offscreen snapshots
* > has a delay of less than 500 ms.
* >
* > - Components in the builder do not support the setting of animation-related attributes, such as
* > [transition]{@link common}.
* >
* > - If a component is on a time-consuming task, for example, an [Image]{@link image} or [Web]{@link web} component
* > that is loading online images, its loading may be still in progress when this API is called. In this case, the
* > output snapshot does not represent the component in the way it looks when the loading is successfully completed.
*
* @param { CustomBuilder } builder - Builder of the custom component.<br>Note: The global builder is not supported.<
* br>If the root component of the builder has a width or height of zero, the snapshot operation will fail with
* error code 100001.
* @param { number } [delay] - Delay time for triggering the screenshot command. When the layout includes an image
* component, it is necessary to set a delay time to allow the system to decode the image resources. The decoding
* time is subject to the resource size. In light of this, whenever possible, use pixel map resources that do not
* require decoding.<br> When pixel map resources are used or when **syncLoad** to **true** for the **Image**
* component, you can set **delay** to **0** to forcibly capture snapshots without waiting. This delay time does
* not refer to the time from the API call to the return: As the system needs to temporarily construct the passed-
* in **builder** offscreen, the return time is usually longer than this delay.<br>Note: In the **builder** passed
* in, state variables should not be used to control the construction of child components. If they are used, they
* should not change when the API is called, so as to avoid unexpected snapshot results.<br> Default value:
* **300**<br> Unit: ms [since 12]
* @param { boolean } [checkImageStatus] - Whether to verify the image decoding status before taking a snapshot. <br>
* **true**: Check whether all Image components have been decoded. <br>**false**: Skip verification. If the
* verification is not completed, snapshot capture will be canceled and an exception will be returned.<br>Default
* value: **false** [since 12]
* @param { SnapshotOptions } [options] - Custom settings of the snapshot. [since 12]
* @returns { Promise<image.PixelMap> } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The builder is not a valid build function.
* @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
* the ready state is required when the checkImageStatus option is enabled. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder
*/
function createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): Promise<image.PixelMap>;
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API synchronously waits for the snapshot to complete and returns a
* [PixelMap]{@link @ohos.multimedia.image:image.PixelMap} object.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.
* @param { SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { image.PixelMap } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160002 - Timeout.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
function getSync(id: string, options?: SnapshotOptions): image.PixelMap;
}
export default componentSnapshot;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.componentUtils.d.ts.md
# @ohos.arkui.componentUtils.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
/**
* The **componentUtils** module provides API for obtaining the coordinates and size of the drawing area of a component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
declare namespace componentUtils {
/**
* Implements a **ComponentInfo** object, which provides the size, position, translation, scaling, rotation, and
* affine matrix information of the component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface ComponentInfo {
/**
* Component size.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
size: Size;
/**
* Offset of the component relative to the parent component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
localOffset: Offset;
/**
* Offset of the component relative to the window.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
windowOffset: Offset;
/**
* Offset of the component relative to the screen.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
screenOffset: Offset;
/**
* Translation of the component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
translate: TranslateResult;
/**
* Scaling of the component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
scale: ScaleResult;
/**
* Rotation of the component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
rotate: RotateResult;
/**
* Affine matrix of the component, which is a 4x4 matrix object created based on the input parameter.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
transform: Matrix4Result;
}
/**
* Defines the size property.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface Size {
/**
* Component width.
*
* Unit: px
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
width: number;
/**
* Component height.
*
* Unit: px
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
height: number;
}
/**
* Defines the offset property.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface Offset {
/**
* X-coordinate.
*
* Unit: px
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
x: number;
/**
* Y-coordinate.
*
* Unit: px
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
y: number;
}
/**
* Translation Result
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface TranslateResult {
/**
* Translation distance along the x-axis.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
x: number;
/**
* Translation distance along the y-axis.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
y: number;
/**
* Translation distance along the z-axis.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
z: number;
}
/**
* Scale Result
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface ScaleResult {
/**
* Scale factor along the x-axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
x: number;
/**
* Scale factor along the y-axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
y: number;
/**
* Scale factor along the z-axis.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
z: number;
/**
* X-coordinate of the center point.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
centerX: number;
/**
* Y-coordinate of the center point.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
centerY: number;
}
/**
* Rotation Result.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
interface RotateResult {
/**
* X-coordinate of the rotation vector.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
x: number;
/**
* Y-coordinate of the rotation vector.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
y: number;
/**
* Z coordinate of the rotation vector.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
z: number;
/**
* X-coordinate of the center point.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
centerX: number;
/**
* Y-coordinate of the center point.
*
* Unit: vp
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
centerY: number;
/**
* Rotation angle.
*
* Unit: deg
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
angle: number;
}
/**
* The matrix is column-first fourth-order matrix.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
type Matrix4Result = [
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number,
number
];
/**
* Obtains a **ComponentInfo** object based on the component ID and synchronously returns the geometric properties of
* the component.
*
* > **NOTE**
* >
* > - Since API version 10, you can use the
* > [getComponentUtils]{@link @ohos.arkui.UIContext:UIContext#getComponentUtils} API in
* > [UIContext]{@link @ohos.arkui.UIContext} to obtain the [ComponentUtils]{@link @ohos.arkui.UIContext} object
* > associated with the current UI context. This API provides access to component coordinates and size information
* > after the target component completes layout. It is recommended that you invoke this API within
* > [layout completion callbacks]{@link @ohos.arkui.inspector:inspector}. Note that dynamically created components
* > must be mounted to the component tree before this API can obtain their information, as unmounted components are
* > not measured or laid out by the UI framework. Always ensure that component mounting precedes information
* > retrieval attempts.
*
* @param {string} id - Component ID.
* @returns {ComponentInfo} **ComponentInfo** object, which provides the size, position, translation, scaling,
* rotation, and affine matrix information of the component.
* @throws { BusinessError } 100001 - UI execution context not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.ComponentUtils#getRectangleById
*/
function getRectangleById(id: string): ComponentInfo;
}
export default componentUtils;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.dragController.d.ts.md
# @ohos.arkui.dragController.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import type { AsyncCallback, Callback } from './@ohos.base';
import type unifiedDataChannel from './@ohos.data.unifiedDataChannel';
/**
* This module provides APIs for initiating drag actions. When receiving a gesture event, such as a touch or long-press
* event, an application can initiate a drag action and carry drag information therein.
*
* > **NOTE**
* >
* > - The functionality of this module depends on UI context. This means that the APIs of this module cannot be used
* > where [the UI context is ambiguous](docroot://ui/arkts-global-interface.md#ambiguous-ui-context). For details, see
* > [UIContext]{@link @ohos.arkui.UIContext}.
* >
* > - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
declare namespace dragController {
/**
* Describes the dragging start and end states.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
const enum DragStatus {
/**
* Dragging is started.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
STARTED = 0,
/**
* Dragging ends.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
ENDED = 1
}
/**
* Provides the data reported when the state changes during dragging.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
interface DragAndDropInfo {
/**
* Current dragging state (started or ended).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
status: DragStatus;
/**
* Drag event corresponding to the current state. The drag event initiated by **dragController** only supports the
* APIs for obtaining the result and behavior, and is used exclusively for the dragging end state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
event: DragEvent;
/**
* Additional information about the drag action. Not supported currently. The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
extraParams?: string;
}
/**
* Implements a **DragAction** object to subscribe to drag state changes and start the drag service.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
interface DragAction {
/**
* Starts the drag service. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
startDrag(): Promise<void>;
/**
* Subscribes to drag state changes.
*
* @param { 'statusChange' } type for status changing
* @param { Callback<DragAndDropInfo> } callback with drag event and status information
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
on(type: 'statusChange', callback: Callback<DragAndDropInfo>): void;
/**
* Unsubscribes from drag state changes.
*
* @param { 'statusChange' } type for status changing
* @param { Callback<DragAndDropInfo> } callback with drag event and status information
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
off(type: 'statusChange', callback?: Callback<DragAndDropInfo>): void;
}
/**
* Defines the attributes required for initiating a drag action and information carried in the dragging process.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
interface DragInfo {
/**
* ID of the touch point on the screen when dragging is started. The value is an integer in the [0, 9] range.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
pointerId: number;
/**
* Data carried in the dragging process.
*
* The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
data?: unifiedDataChannel.UnifiedData;
/**
* Additional information about the drag action. Not supported currently.
*
* The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
extraParams?: string;
/**
* Coordinates of the touch point. If this parameter is not set, the touch point is centered horizontally and
* shifted downward by 20% from the top.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
touchPoint?: TouchPoint;
/**
* Processing mode of the drag preview and the display of the number badge during dragging.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
previewOptions?: DragPreviewOptions;
/**
* Unique ID of the component that is automatically hidden by the system during proactive dragging. A single unique
* ID or an array of unique IDs can be passed.
*
* After the proactive dragging is successfully initiated, the system automatically hides the target component
* before displaying the drag preview window.
*
* If the proactive dragging source also needs to be hidden, its unique ID must be passed as well.
*
* The unique ID of a component can be obtained by using [UIContext.getFrameNodeById()]{@link @ohos.arkui.UIContext:UIContext#getFrameNodeById}
* together with [FrameNode.getUniqueId()]{@link FrameNode:FrameNode#getUniqueId}.
*
* You need to restore the component display status as required in the drag end callback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
autoHideComponentUniqueIds?: number | number[];
/**
* Parameters for deferred data loading from the drag source. This API provides data loading parameters to the
* system instead of directly providing complete data objects. When the user drops data on the target application,
* the system will use these parameters to request the actual data from the drag source. If set together with
* **data**, **dataLoadParams** takes effect.
*
* The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 20
*/
dataLoadParams?: unifiedDataChannel.DataLoadParams;
}
/**
* Defines parameters related to drag-and-drop animation effects.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
interface AnimationOptions {
/**
* Animation duration, in ms.
*
* Default value: **1000**
*
* **NOTE**
*
* - If this parameter is set to a value less than 0, the value **0** is used.
* - Floating-point values will be rounded down to integers. For example, if the value set is 1.2, **1** will be
* used.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
duration?: number;
/**
* Animation curve.
*
* Default value: **Curve.EaseInOut**
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
curve?: Curve | ICurve;
}
/**
* Implements a **DragPreview** object. This API does not work in the **OnDrop** and **OnDragEnd** callbacks.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
export class DragPreview {
/**
* Sets the foreground color of the drag preview. This API does not work in the **OnDrop** and **OnDragEnd**
* callbacks. It can only be used on the object obtained through the
* [getDragPreview()]{@link @ohos.arkui.UIContext:DragController#getDragPreview} API.
*
* @param { ResourceColor } color - Foreground color of the drag preview.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
setForegroundColor(color: ResourceColor): void;
/**
* Applies a foreground color animation to the drag preview. This API does not work in the **OnDrop** and
* **OnDragEnd** callbacks. It can only be used on the object obtained through the
* [getDragPreview()]{@link @ohos.arkui.UIContext:DragController#getDragPreview} API.
*
* @param { AnimationOptions } options - Animation settings.
* @param { function } handler - Callback used to change attributes such as the background mask color.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
animate(options: AnimationOptions, handler: () => void): void;
}
/**
* Callback used to return the result.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice
* @since 12
*/
interface DragEventParam {
/**
* Drag event information that includes only the drag result.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
event: DragEvent;
/**
* Additional information about the drag action. Not supported currently.
*
* The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
*/
extraParams: string;
}
/**
* Initiates a drag action, with the object to be dragged and the drag information passed in. This API uses an
* asynchronous callback to return the result.
*
* > **NOTE**
* >
* > Since API version 11, you can use the [getDragController]{@link @ohos.arkui.UIContext:UIContext#getDragController} API in
* > [UIContext]{@link @ohos.arkui.UIContext} to obtain the [DragController]{@link @ohos.arkui.UIContext:DragController} object
* > associated with the current UI context.
*
* @param { CustomBuilder | DragItemInfo } custom - Object to be dragged.<br>**NOTE**<br>The global builder is not
* supported. If the [Image]{@link image} component is used in the builder, enable synchronous loading, that is,
* set the [syncLoad]{@link ImageAttribute#syncLoad} attribute of the component to **true**. The builder is used
* only to generate the image displayed during the current dragging. If the root component of the builder has zero
* width or height, it will cause failure in drag image generation, which in turn breaks the entire drag
* operation. Changes to the builder, if any, apply to the next dragging, but not to the current dragging.
* @param { DragInfo } dragInfo - Drag information.
* @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback function. If the operation
* is successful, **err** is **undefined** and **data** is the **DragEventParam** object obtained. Otherwise,
* **err** is an error object. [since 10 - 11]
* @param { AsyncCallback<DragEventParam> } callback - Callback function. If the operation is successful, **err** is
* **undefined** and **data** is the **DragEventParam** object obtained. Otherwise, **err** is an error
* object. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.DragController#executeDrag
*/
function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, callback: AsyncCallback<DragEventParam>): void;
/**
* Initiates a drag action, with the object to be dragged and the drag information passed in. This API uses a promise
* to return the result.
*
* > **NOTE**
* >
* > Since API version 11, you can use the [getDragController]{@link @ohos.arkui.UIContext:UIContext#getDragController} API in
* > [UIContext]{@link @ohos.arkui.UIContext} to obtain the [DragController]{@link @ohos.arkui.UIContext:DragController} object
* > associated with the current UI context.
*
* @param { CustomBuilder | DragItemInfo } custom - Object to be dragged.
* @param { DragInfo } dragInfo - Drag information.
* @returns { Promise<{ event: DragEvent, extraParams: string }> } Promise used to return the result. [since 10 - 11]
* @returns { Promise<DragEventParam> } A Promise with the drag event information. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.DragController#executeDrag
*/
function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise<DragEventParam>;
/**
* Initiates a drag action, with the object to be dragged and the drag information passed in. This API uses a promise
* to return the result.
*
* > **NOTE**
* >
* > - Since API version 11, you can use the
* > [getDragController]{@link @ohos.arkui.UIContext:UIContext#getDragController} API in
* > [UIContext]{@link @ohos.arkui.UIContext} to obtain the
* > [DragController]{@link @ohos.arkui.UIContext:DragController} object associated with the current UI context.
* >
* > - For optimal drag and drop performance, limit the number of drag previews.
*
* @param { Array<CustomBuilder | DragItemInfo> } customArray - Object to be dragged.
* @param { DragInfo } dragInfo - Drag information.
* @returns { DragAction } **DragAction** object, which is used to subscribe to drag state changes and start the
* drag service.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.DragController#createDragAction
*/
function createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: DragInfo): DragAction;
/**
* Obtains the **DragPreview** object, which represents the preview displayed during a drag operation.
*
* > **NOTE**
* >
* > Since API version 11, you can use the [getDragController]{@link @ohos.arkui.UIContext:UIContext#getDragController} API in
* > [UIContext]{@link @ohos.arkui.UIContext} to obtain the [DragController]{@link @ohos.arkui.UIContext:DragController} object
* > associated with the current UI context.
*
* @returns { DragPreview } **DragPreview** object. It provides the API for setting the preview style. It does not
* work in the **OnDrop** and **OnDragEnd** callbacks.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.DragController#getDragPreview
*/
function getDragPreview(): DragPreview;
/**
* Enumerates the states defining whether an application can initiate a drag operation. This API is effective only
* when [onDragStart]{@link CommonMethod#onDragStart} is called.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
const enum DragStartRequestStatus {
/**
* The application is preparing data and cannot initiate a drag operation yet.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
WAITING = 0,
/**
* The application has completed data preparation and is ready to initiate a drag operation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
READY = 1
}
/**
* Enumerates hover detection states during drag operations.
* Under default system configuration, if no CANCEL occurs, the state reporting is as follows:
* Hover still-->500ms-->BEGIN-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->END
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
const enum DragSpringLoadingState {
/**
* Initial state when a dragged item enters the component boundary and remains stationary for the specified
* duration. This state enables preparation operations.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
BEGIN,
/**
* Periodic notification state during sustained hover detection. In this state, periodic updates refresh UI effects
* to highlight the hover state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
UPDATE,
/**
* Final state indicating completion of the hover detection cycle, which is triggered when the dragged item remains
* stationary after the last update notification. Hover detection will only restart after the dragged item exits and
* re-enters the component boundary or enters a child component. In this state, the application can perform cleanup,
* navigation, or view switching operations.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
END,
/**
* Interruption state of hover detection triggered by termination events, which include the following: finger or
* mouse release, window switching, screen off, exiting the component boundary, entering child components, or
* exceeding the movement threshold within the component. The application will restore the UI style and cancel
* pending navigation and view switching operations.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
CANCEL
}
/**
* Defines the configuration parameters for drag hover detection. The default settings typically suffice. These
* settings can be customized through [onDragSpringLoading]{@link CommonMethod#onDragSpringLoading} binding or
* dynamically updated during BEGIN state using
* [updateConfiguration]{@link dragController.SpringLoadingContext#updateConfiguration}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
interface DragSpringLoadingConfiguration {
/**
* Time (in ms) required to remain stationary to enter the BEGIN state of hover detection. Value range: integer in
* the [0, 2<sup>31</sup>-1] range. Floating-point number inputs will be truncated to integers. Invalid values (
* negative numbers, **null**, **undefined**, **NaN**) are treated as the default value **500**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
stillTimeLimit?: number;
/**
* Time interval (in ms) at which update notifications are sent after hover detection enters the UPDATE state. Value
* range: integer in the [0, 2<sup>31</sup>-1] range. Floating-point number inputs will be truncated to integers.
* Invalid values (negative numbers, **null**, **undefined**, **NaN**) are treated as the default value **100**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
updateInterval?: number;
/**
* Maximum number of update notifications after hover detection enters the UPDATE state. Value range: integer in the
* [0, 2<sup>31</sup>-1] range. Floating-point number inputs will be truncated to integers. Invalid values (negative
* numbers, **null**, **undefined**, **NaN**) are treated as the default value **3**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
updateNotifyCount?: number;
/**
* Maximum waiting time (in ms) from the UPDATE state to the END state. Value range: integer in the
* [0, 2<sup>31</sup>-1] range. Floating-point number inputs will be truncated to integers. Invalid values (negative
* numbers, **null**, **undefined**, **NaN**) are treated as the default value **100**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
updateToFinishInterval?: number;
}
/**
* Defines the drag event information when hover detection is triggered. This API provides drag data summaries and
* additional drag event information, allowing applications to decide whether to respond to hover detection
* callbacks.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
interface SpringLoadingDragInfos {
/**
* Summary of the dragged data. The default value is null.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
dataSummary?: unifiedDataChannel.Summary;
/**
* Additional information about the drag event. The default value is an empty string.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
extraInfos?: string;
}
/**
* Defines callback context information passed to applications during hover detection. It enables access to drag
* states, dynamic UI effect updates, and drag data for operation handling decisions.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 20
*/
class SpringLoadingContext {
/**
* Current state of hover detection.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
state: DragSpringLoadingState;
/**
* Callback notification sequence number in the current hover detection cycle. The value is zero-based.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
currentNotifySequence: number;
/**
* Drag information. Omitted in CANCEL state; uses the
* [SpringLoadingDragInfos]{@link dragController.SpringLoadingDragInfos} default value when **undefined**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
dragInfos?: SpringLoadingDragInfos;
/**
* Configuration information in the current callback. Omitted in CANCEL state; uses the
* [DragSpringLoadingConfiguration]{@link dragController.DragSpringLoadingConfiguration} default value when
* **undefined**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
currentConfig?: DragSpringLoadingConfiguration;
/**
* Terminates subsequent hover detection. This API does not trigger CANCEL state notifications, and the application
* needs to perform state cleanup when executing this API.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
abort(): void;
/**
* Updates the hover detection configuration. This API is effective only when the hover detection state is BEGIN.
* Applications typically set the hover detection configuration when binding
* [onDragSpringLoading]{@link CommonMethod#onDragSpringLoading} or use the default configuration. This API does not
* modify the original configuration set during binding, but updates dynamic configuration information for
* subsequent hover detection. Use this API with caution, as different drag data types may require different UX
* timing.
*
* @param { DragSpringLoadingConfiguration } config - New configuration for hover detection.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
updateConfiguration(config: DragSpringLoadingConfiguration): void;
}
}
export default dragController;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.drawableDescriptor.d.ts.md
# @ohos.arkui.drawableDescriptor.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* This module provides capabilities for layered icon composition (foreground, background, mask), animated image
* control, and basic image processing.
*
* > **NOTE**
* >
* > - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
*
* @file DrawableDescriptor
* @kit ArkUI
*/
import image from './@ohos.multimedia.image';
import drawing from './@ohos.graphics.drawing';
/**
* Represents the result of loading an image resource or URI.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
export interface DrawableDescriptorLoadedResult {
/**
* Image width.
*
* Unit: px.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
imageWidth: number;
/**
* Image height.
*
* Unit: px.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
imageHeight: number;
}
/**
* Represents the base class providing overridable methods for [PixelMap]{@link @ohos.multimedia.image:image.PixelMap}
* acquisition and image resource loading.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
export class DrawableDescriptor {
/**
* Obtains this **PixelMap** instance.
*
* @returns { image.PixelMap } **PixelMap** object.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
getPixelMap(): image.PixelMap;
/**
* Synchronously loads the image resource and returns the loading result.
*
* @returns { DrawableDescriptorLoadedResult } Image resource loading result.
* @throws { BusinessError } 111001 - resource loading failed.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
loadSync(): DrawableDescriptorLoadedResult;
/**
* Asynchronously loads the image resource and returns the loading result. This API uses a promise to return the
* result.
*
* @returns { Promise<DrawableDescriptorLoadedResult> } Image resource loading result.
* @throws { BusinessError } 111001 - resource loading failed.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
load(): Promise<DrawableDescriptorLoadedResult>;
/**
* Releases the resource held by **DrawableDescriptor**. After the **release** API is called, the object becomes
* unavailable. In this case, if you call APIs such as [getPixelMap]{@link DrawableDescriptor#getPixelMap},
* [getForeground]{@link LayeredDrawableDescriptor#getForeground},
* [getBackground]{@link LayeredDrawableDescriptor#getBackground}, [getMask]{@link LayeredDrawableDescriptor#getMask},
* [loadSync]{@link DrawableDescriptor#loadSync}, and [load]{@link DrawableDescriptor#load} again, error code 111002
* will be thrown. No crash occurs when the **release** API is called repeatedly.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
release(): void;
/**
* Checks whether **DrawableDescriptor** is released. If **true** is returned, the object has been released. In this
* case, calling APIs such as [getPixelMap]{@link DrawableDescriptor#getPixelMap},
* [getForeground]{@link LayeredDrawableDescriptor#getForeground},
* [getBackground]{@link LayeredDrawableDescriptor#getBackground}, [getMask]{@link LayeredDrawableDescriptor#getMask},
* [loadSync]{@link DrawableDescriptor#loadSync}, and [load]{@link DrawableDescriptor#load} will throw error code 1110
* 02. If **false** is returned, the object has not been released and can be used normally.
*
* @returns { boolean } Whether **DrawableDescriptor** is released. The value **true** indicates that the object is
* released, and **false** indicates that the object is not released.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
isReleased(): boolean;
/**
* Redraws **DrawableDescriptor**. Currently, this API is supported for the
* [PictureDrawableDescriptor]{@link PictureDrawableDescriptor} type, and does not take effect for other
* **DrawableDescriptor** subtypes. If no component is bound to **DrawableDescriptor**, no operation is performed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
invalidate(): void;
}
/**
* Creates a **LayeredDrawableDescriptor** object when the passed resource ID or name belongs to a JSON file that
* contains foreground and background resources. Inherits from
* [DrawableDescriptor]{@link DrawableDescriptorLoadedResult}.
*
* The **drawable.json** file is located under **entry/src/main/resources/base/media** in the project directory. Below
* shows the file content:
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
export class LayeredDrawableDescriptor extends DrawableDescriptor {
/**
* A constructor used to create a **LayeredDrawableDescriptor** object.
*
* @param { DrawableDescriptor } [foreground] - Options for the foreground image of the layered drawable.
* @param { DrawableDescriptor } [background] - Options for the background image of the layered drawable.
* @param { DrawableDescriptor } [mask] - Options for the mask of the layered drawable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 23]
* @atomicservice
* @since 12
*/
constructor(foreground?: DrawableDescriptor, background?: DrawableDescriptor, mask?: DrawableDescriptor);
/**
* Obtains the **DrawableDescriptor** object of the foreground.
*
* @returns { DrawableDescriptor } **DrawableDescriptor** object.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
getForeground(): DrawableDescriptor;
/**
* Obtains the **DrawableDescriptor** object of the background.
*
* @returns { DrawableDescriptor } **DrawableDescriptor** object.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
getBackground(): DrawableDescriptor;
/**
* Obtains the **DrawableDescriptor** object of the mask.
*
* @returns { DrawableDescriptor } **DrawableDescriptor** object.
* @throws { BusinessError } 111002 - The native memory referenced by
* the drawableDescriptor has been released. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
getMask(): DrawableDescriptor;
/**
* Sets the blend mode of **LayeredDrawableDescriptor**. If this API is called for multiple times on the same
* **LayeredDrawableDescriptor** object, only the last call before the drawing completion takes effect. This API does
* not support dynamic switching. The default drawing order of **LayeredDrawableDescriptor** is background, mask, and
* foreground. After the blend mode is set, the drawing order changes to background, foreground, and mask. If the
* specified value is invalid, the default drawing order is used.
*
* @param { drawing.BlendMode } mode - Blend mode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
setBlendMode(mode: drawing.BlendMode): void;
/**
* Obtains the built-in clipping path parameters of the system. It is a static method of
* **LayeredDrawableDescriptor**.
*
* @returns { string } String of the clipping path.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
static getMaskClipPath(): string;
}
/**
* Implements a **PixelMapDrawableDescriptor** object, which can be created by passing in a **PixelMap** object.
* Inherits from [DrawableDescriptor]{@link DrawableDescriptorLoadedResult}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 23]
* @atomicservice
* @since 12
*/
export class PixelMapDrawableDescriptor extends DrawableDescriptor {
/**
* A constructor used to create a **PixelMapDrawableDescriptor** object.
*
* @param { image.PixelMap } src - **PixelMap** image data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 23]
* @atomicservice
* @since 12
*/
constructor(src?: image.PixelMap);
/**
* A constructor used to create a **PixelMapDrawableDescriptor** object through the PixelMap type or **ResourceStr**.
*
* @param { image.PixelMap | ResourceStr } [src] - **PixelMap** image data. You can use application resources, system
* resources, sandbox paths (file://<bundleName>/<sandboxPath>), and Base64 strings to create
* **PixelMapDrawableDescriptor** objects.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
constructor(src?: image.PixelMap | ResourceStr);
}
/**
* Enumerates the stop modes of an animation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
export enum AnimationStopMode {
/**
* The animation returns to the first frame when it stops.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
FIRST_FRAME = 0,
/**
* The animation stays at the last frame when it stops.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
LAST_FRAME = 1
}
/**
* Provides the configuration options for animation playback, including the playback duration, number of playback times,
* and autoplay behavior.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
declare interface AnimationOptions {
/**
* Total playback duration for the image sequence.
*
* For **PixelMap** arrays, the default value is 1s per image. For local or application resources, the duration is
* determined by the playback delay embedded in the image resource.
*
* Unit: ms.
*
* Value range: [0, +∞).
*
* Negative values are treated as the default value.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
duration?: number;
/**
* Number of playback times for the image sequence.
*
* A value of **-1** indicates infinite playback, **0** indicates no playback, and a value greater than 0 represents
* the number of playback times.
*
* The default value is **1**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
iterations?: number;
/**
* Per-frame playback duration. The setting overrides **duration** if specified.
*
* If **duration** and **frameDurations** are set, **duration** is ignored.
*
* If the value of **frameDurations** is inconsistent with the image count, animation timing distributes across the
* total duration.
*
* Unit: ms.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
frameDurations?: Array<number>;
/**
* Whether to enable autoplay.
*
* **true** to enable, **false** otherwise.
*
* The default value is **true**.
*
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
autoPlay?: boolean;
/**
* Sets the stop mode for an animation.
*
* The default value is **AnimationStopMode.FIRST_FRAME**, indicating that the animation returns to the first frame
* when it stops.
*
* @default AnimationStopMode.FIRST_FRAME
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
stopMode?: AnimationStopMode;
}
/**
* Implements an animation controller object. It provides APIs for playing, stopping, resuming, and pausing animations,
* as well as querying the status.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
export interface AnimationController {
/**
* Starts playback from the first frame.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
start(): void;
/**
* Stops playback and resets to the first frame.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
stop(): void;
/**
* Pauses playback on the current frame.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
pause(): void;
/**
* Resumes playback from the current frame.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
resume(): void;
/**
* Obtains the current animation playback status.
*
* @returns { AnimationStatus } Current animation state: initial, running, paused, or stopped.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
getStatus(): AnimationStatus;
}
/**
* Defines a descriptor object used to play animated content (for example, **PixelMap** arrays or animated image
* resources) using the [Image]{@link ./@internal/component/ets/image} component. It inherits from
* [DrawableDescriptor]{@link DrawableDescriptorLoadedResult}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export class AnimatedDrawableDescriptor extends DrawableDescriptor {
/**
* A constructor used to create an **AnimatedDrawableDescriptor** object.
*
* @param { Array<image.PixelMap> } pixelMaps - **PixelMap** image data.
* @param { AnimationOptions } [options] - Animation options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
constructor(pixelMaps: Array<image.PixelMap>, options?: AnimationOptions);
/**
* A constructor used to create an **AnimatedDrawableDescriptor** object.
*
* @param { ResourceStr | Array<image.PixelMap> } src - Animated image source address or
* [PixelMap]{@link @ohos.multimedia.image:image.PixelMap} array.<br> The address (**ResourceStr**) supports the
* following formats: application resources (**Resource**), sandbox path (file://<bundleName>/<sandboxPath>), and
* Base64 string.
* @param { AnimationOptions } [options] - Animation playback configuration.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
constructor(src: ResourceStr | Array<image.PixelMap>, options?: AnimationOptions);
/**
* Obtains the animation controller for playback control.
*
* @param { string } [id] - ID of the target component.<br>Optional when the
* [Image]{@link ./@internal/component/ets/image} component and **AnimatedDrawableDescriptor** object have a 1:1
* relationship.<br>Required when the same **AnimatedDrawableDescriptor** object is bound to multiple
* [Image]{@link ./@internal/component/ets/image} components (in this case, you must ensure the ID uniqueness).<br
* >This rule is based on the design principle of the animation system: Animation data can be shared across
* multiple components, but each component's animation runs independently. Correspondingly, an
* **AnimationController** object maintains a strict 1:1 relationship with a component, meaning one component is
* paired with exactly one **AnimationController** object.<br>In addition,
* [AnimatedDrawableDescriptor]{@link AnimatedDrawableDescriptor} supports the feature for automatically pausing
* animation playback when the bound component is not visible (for example, when the component is scrolled out of
* the screen or hidden). For specific implementation details, see [onVisibleAreaChange]
* {@link CommonMethod#onVisibleAreaChange(ratios: Array<number>, event: VisibleAreaChangeCallback)}.
* @returns { AnimationController | undefined } Animation controller object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 21
*/
getAnimationController(id?: string): AnimationController | undefined;
}
/**
* Provides HDR composition configuration.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
declare interface HdrCompositionConfig {
/**
* Rectangle area for HDR composition.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
rect: Rectangle;
}
/**
* Creates a **PictureDrawableDescriptor** object by passing a **Picture** object. This API inherits from
* [DrawableDescriptor]{@link DrawableDescriptorLoadedResult}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class PictureDrawableDescriptor extends DrawableDescriptor {
/**
* A constructor used to create a **PictureDrawableDescriptor** object.
*
* @param { image.Picture } src - **Picture** object for creating **PictureDrawableDescriptor**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(src: image.Picture);
/**
* Sets HDR composition.
*
* @param { HdrCompositionConfig } config - HDR composition configuration.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
setHdrComposition(config: HdrCompositionConfig): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.inspector.d.ts.md
# @ohos.arkui.inspector.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Layout Callback
* @kit ArkUI
*/
import { Callback } from './@ohos.base';
/**
* Used to do observer layout and draw event for component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
declare namespace inspector {
/**
* The ComponentObserver is used to listen for layout, draw and drawChildren events.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
interface ComponentObserver {
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the component layout complete.
*
* @param { string } type - type of the listened event. [since 10 - 11]
* @param { ()=>void } callback - callback of the listened event. [since 10 - 11]
* @param { 'layout' } type - type of the listened event. [since 12]
* @param { function } callback - callback of the listened event. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
on(type: 'layout', callback: () => void): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the component layout complete.
*
* @param { string } type - type of the listened event. [since 10 - 11]
* @param { ()=>void } callback - callback of the listened event. [since 10 - 11]
* @param { 'layout' } type - type of the listened event. [since 12]
* @param { function } callback - callback of the listened event. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
off(type: 'layout', callback?: () => void): void;
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the component draw complete.
*
* @param { string } type - type of the listened event. [since 10 - 11]
* @param { ()=>void } callback - callback of the listened event. [since 10 - 11]
* @param { 'draw' } type - type of the listened event. [since 12]
* @param { function } callback - callback of the listened event. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
on(type: 'draw', callback: () => void): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the component draw complete.
*
* @param { string } type - type of the listened event. [since 10 - 11]
* @param { ()=>void } callback - callback of the listened event. [since 10 - 11]
* @param { 'draw' } type - type of the listened event. [since 12]
* @param { function } callback - callback of the listened event. [since 12]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
*/
off(type: 'draw', callback?: () => void): void;
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the child of component draw complete.
*
* @param { 'drawChildren' } type - type of the listened event.
* @param { Callback<void> } callback - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
on(type: 'drawChildren', callback: Callback<void>): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the child of component draw complete.
*
* @param { 'drawChildren' } type - type of the listened event.
* @param { Callback<void> } callback - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
off(type: 'drawChildren', callback?: Callback<void>): void;
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback is triggered when the child of component draw complete.
*
* @param { Callback<number[]> } callback - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
onDrawChildren(callback: Callback<number[]>): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback is not triggered when the child of component draw complete.
*
* @param { Callback<number[]> } [callback] - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
offDrawChildren(callback?: Callback<number[]>): void;
/**
* Registers a callback with the corresponding query condition by using the handle.
* This callback will be triggered when the child of component layout is complete.
*
* @param { Callback<void> } callback - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
onLayoutChildren(callback: Callback<void>): void;
/**
* Deregisters a callback with the corresponding query condition by using the handle.
* This callback will not be triggered when the child of component layout is complete.
*
* @param { Callback<void> } [callback] - callback of the listened event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
offLayoutChildren(callback?: Callback<void>): void;
}
/**
* Sets the component after layout or draw criteria and returns the corresponding listening handle
*
* @param { string } id - component id.
* @returns { ComponentObserver } create listener for observer component event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 10
* @deprecated since 18
* @useinstead ohos.arkui.UIContext.UIInspector#createComponentObserver
*/
function createComponentObserver(id: string): ComponentObserver;
}
export default inspector;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.Prefetcher.d.ts.md
# @ohos.arkui.Prefetcher.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Prefetching
* @kit ArkUI
*/
/**
* Extends the [IDataSource]{@link IDataSource} API to provide a data source that can be prefetched.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export interface IDataSourcePrefetching extends IDataSource {
/**
* Prefetches a specified data item from the dataset. This API can be either synchronous or asynchronous. When the
* visible area changes, the prefetching algorithm calls this API if it determines that the data item about to enter
* the visible area needs to be prefetched.
*
* @param { number } index - Index of the data item to be prefetched. The value range is [0, **totalCount()** - 1].
* @returns { Promise<void> | void } Promise when this API is executed asynchronously; no return value when this API
* is executed synchronously. The promise only indicates that the operation is completed and contains no actual
* return content.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
prefetch(index: number): Promise<void> | void;
/**
* Cancels the prefetching of a specified data item from the dataset. This API can be either synchronous or
* asynchronous. This API is optional. If the data source does not implement this API, the prefetching cancellation
* operation will not be performed.
*
* @param { number } index - Index of the data item whose prefetching is to be canceled. The value range is
* [0, **totalCount()** - 1].
* @returns { Promise<void> | void } Promise when this API is executed asynchronously; no return value when this API
* is executed synchronously. The promise only indicates that the operation is completed and contains no actual
* return content.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
cancel?(index: number): Promise<void> | void;
}
/**
* Provides the prefetching capability. It works with **LazyForEach** to prefetch data items when users swipe through
* container components such as **List** and **Grid**, improving user browsing experience.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export interface IPrefetcher {
/**
* Sets the prefetching-capable data source to bind to the **Prefetcher**.
*
* @param { IDataSourcePrefetching } dataSource - Prefetching-capable data source.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
setDataSource(dataSource: IDataSourcePrefetching): void;
/**
* Called when the boundary of the visible area changes. It notifies **Prefetcher** of the current visible area range
* so that **Prefetcher** can determine whether to prefetch or cancel the prefetching of data items. Before calling
* this API, you need to set a data source using **setDataSource**. This API works with the **List**, **Grid**,
* **WaterFlow**, and **Swiper** components.
*
* @param { number } minVisible - Index of the first data item in the current visible area.
* @param { number } maxVisible - Index of the last data item in the current visible area.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
visibleAreaChanged(minVisible: number, maxVisible: number): void;
}
/**
* **BasicPrefetcher** is a fundamental implementation of **IPrefetcher**. It offers an intelligent data prefetching
* algorithm that decides the data items to prefetch based on real-time changes in the visible area on the screen and
* variations in the prefetch duration. It can also determine the prefetch requests to be canceled based on the user's
* scrolling actions.
*
* **BasicPrefetcher** objects do not support JSON serialization.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export class BasicPrefetcher implements IPrefetcher {
/**
* Passes the data source that supports prefetching and binds it to **Prefetcher** when an object is created. If no
* data source is passed during the creation, you can use **setDataSource** to set a data source after the creation.
*
* @param { IDataSourcePrefetching } dataSource - Prefetching-capable data source. If this parameter is not specified,
* the value is empty by default. You can set a data source using **setDataSource** later.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
constructor(dataSource?: IDataSourcePrefetching);
/**
* Sets the prefetching-capable data source to bind to the **Prefetcher**.
*
* @param { IDataSourcePrefetching } dataSource - Prefetching-capable data source.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
setDataSource(dataSource: IDataSourcePrefetching): void;
/**
* Called when the boundary of the visible area changes. It notifies **Prefetcher** of the current visible area range
* so that **Prefetcher** can determine whether to prefetch or cancel the prefetching of data items. Before calling
* this API, ensure that the data source has been set using the constructor or the **setDataSource** API. This API
* works with the **List**, **Grid**, **WaterFlow**, and **Swiper** components.
*
* @param { number } minVisible - Index of the first data item in the current visible area.
* @param { number } maxVisible - Index of the last data item in the current visible area.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
visibleAreaChanged(minVisible: number, maxVisible: number): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.StateManagement.d.ts.md
# @ohos.arkui.StateManagement.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (C) 2024-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The state management module provides data storage, persistent data management, UIAbility data storage, and
* environment state and tools required by applications.
*
* T and S in this topic represent the types as described below.
*
* | Type | Description |
* | ---- | -------------------------------------- |
* | T | Class, number, boolean, string, and arrays of these types.|
* | S | number, boolean, string. |
*
* @file State Management
* @kit ArkUI
*/
import contextConstant from '@ohos.app.ability.contextConstant';
import collections from '@arkts.collections';
/**
* Obtains the default constructor.
*
* @returns { T } Default constructor.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare type StorageDefaultCreator<T> = () => T;
/**
* Represents a class constructor that accepts arbitrary arguments.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export interface TypeConstructorWithArgs<T> {
/**
* Creates and returns an instance of the specified type T.
*
* @param { any } args - Function arguments.
* @returns { T } Instance of the T type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
new (...args: any): T;
}
/**
* Defines the parameter type for **globalConnect**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
export class ConnectOptions<T extends object> {
/**
* Specified type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
type: TypeConstructorWithArgs<T>;
/**
* Input key. If no value is passed in, the type name is used as the key.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
key?: string;
/**
* Default constructor. You are advised to pass this parameter. If **globalConnect** is connected to the key for the
* first time, an error is reported if this parameter is not passed in.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
defaultCreator?: StorageDefaultCreator<T>;
/**
* Encryption level, ranging from EL1 to EL5 (corresponding to the value from 0 to 4). For details, see
* [Encryption Levels](docroot://application-models/application-context-stage.md#obtaining-and-modifying-encryption-levels).
* If no value is passed in, EL2 is used by default. Storage paths vary based on the encryption levels. If the input
* value of encryption level is not in the range of **0** to **4**, a crash occurs.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
areaMode?: contextConstant.AreaMode;
}
/**
* For details about how to use AppStorageV2, see
* [AppStorageV2: Storing Application-wide UI State](docroot://ui/state-management/arkts-new-appstoragev2.md).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class AppStorageV2 {
/**
* Stores key-value pair data in the application memory. If the given key already exists in
* [AppStorageV2](docroot://ui/state-management/arkts-new-appstoragev2.md), the corresponding value is returned.
* Otherwise, a default value is constructed using the default value constructor and returned.
*
* @param { TypeConstructorWithArgs<T> } type - Type. If no key is specified, the name of the type is used as the key.
* @param { string | StorageDefaultCreator<T> } [keyOrDefaultCreator] - Key, or constructor for obtaining the default
* value. The default value is **undefined**.
* @param { StorageDefaultCreator<T> } [defaultCreator] - Constructor for obtaining the default value. The default
* value is **undefined**.
* @returns { T | undefined } Returns data if the creation or data acquisition from AppStorageV2 is successful;
* returns **undefined** otherwise.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static connect<T extends object>(type: TypeConstructorWithArgs<T>, keyOrDefaultCreator?: string | StorageDefaultCreator<T>, defaultCreator?: StorageDefaultCreator<T>): T | undefined;
/**
* Removes the specified key-value pair from [AppStorageV2](docroot://ui/state-management/arkts-new-appstoragev2.md).
* If the specified key does not exist in AppStorageV2, the removal will fail.
*
* @param { string | TypeConstructorWithArgs<T> } keyOrType - Key to be removed. If a type is specified, the key to be
* removed is the name of that type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static remove<T>(keyOrType: string | TypeConstructorWithArgs<T>): void;
/**
* Obtains all keys in [AppStorageV2](docroot://ui/state-management/arkts-new-appstoragev2.md).
*
* @returns { Array<string> } All keys stored in AppStorageV2.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static keys(): Array<string>;
}
/**
* Defines a callback used to return the cause of the persistence failure.
*
* @param { string } key - Key of the error.
* @param { 'quota' | 'serialization' | 'unknown' } reason - Reason of the error.
* @param { string } message - Extra information about the error.
* @param { string } [oldValue] - Old serialized data stored on the disk when deserialization fails. [since 26.0.0]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare type PersistenceErrorCallback = (key: string, reason: 'quota' | 'serialization' | 'unknown', message: string, oldValue?: string) => void;
/**
* Defines the types of persistent collection data supported by **globalConnect** using the generic type of the input
* parameter of **globalConnect**.
*
* @unionmember { Array<S> } The value is of the array type.
* @unionmember { Map<string | number, S> } The value is of the Map type.
* @unionmember { Set<S> } The value is of the Set type.
* @unionmember { collections.Array<S> } The value is of the collections.Array type.
* @unionmember { collections.Map<string | number, S> } The value is of the collections.Map type.
* @unionmember { collections.Set<S> } The value is of the collections.Set type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
export declare type CollectionType<S> = Array<S> | Map<string | number, S> | Set<S> | collections.Array<S> | collections.Map<string | number, S> | collections.Set<S>;
/**
* Defines the parameter type for the
* [globalConnect]{@link PersistenceV2.globalConnect<T extends CollectionType<S>, S extends object>( type: ConnectOptionsCollections<T, S> | ConnectOptions<T> )}
* API. **ConnectOptionsCollections** is inherited from [ConnectOptions\<T\>]{@link ConnectOptions}. You can use the
* **ConnectOptionsCollections** input parameter to persist container data (such as **Array\<S>**).
*
* The following shows the examples of **StorageDefaultCreator\<T>** and **StorageDefaultCreator\<S>**:
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
export class ConnectOptionsCollections<T extends CollectionType<S>, S extends object> extends ConnectOptions<T> {
/**
* Persists container data. **defaultSubCreator** should be provided together with **defaultCreator**; otherwise, the
* container data cannot be persisted. The collection item type **S** must be the same as the return type of
* **defaultSubCreator**. If **defaultSubCreator** is provided but **defaultCreator** is not, the persistence fails.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
defaultCreator?: StorageDefaultCreator<T>;
/**
* Persists container data. If the return value of **defaultSubCreator** is **undefined** or **null**, the persistence
* fails. When a user-defined class collection (such as **Array<ClassA>**) is persisted, the generic type **T** in
* **defaultCreator** is **Array<ClassA>**, and **S** in **defaultSubCreator** is **ClassA**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
defaultSubCreator?: StorageDefaultCreator<S>;
}
/**
* Inherits from [AppStorageV2]{@link AppStorageV2}. For details, see
* [PersistenceV2: Persisting Application State](docroot://ui/state-management/arkts-new-persistencev2.md).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class PersistenceV2 extends AppStorageV2 {
/**
* Stores key-value pair data on the application disk. If the given key already exists in
* [PersistenceV2](docroot://ui/state-management/arkts-new-persistencev2.md), the corresponding value is returned.
* Otherwise, a default value is constructed using the default value constructor and returned. If **globalConnect** is
* used for an [\@ObservedV2](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) decorated object,
* changes to the object's [\@Trace](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) properties will
* trigger automatic refresh of the associated object, while changes to non-@Trace properties will not. If necessary,
* the [PersistenceV2.save]{@link PersistenceV2#save} API can be called to store the data manually.
*
* @param { ConnectOptions<T> } type - Connection settings.
* @returns { T | undefined } Returns the data if creation or acquisition is successful; otherwise, returns
* **undefined**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
static globalConnect<T extends object>(type: ConnectOptions<T>): T | undefined;
/**
* Stores key-value pair data on the application disk. Supports the persistence of the following collection types:
* [Array, Map, Set, Date, collections.Array, collections.Map, and collections.Set](docroot://ui/state-management/arkts-new-persistencev2.md#types-supported-by-globalconnect).
* Note that when persisting data of the **Array\<ClassA>** type, you need to call
* [makeObserved]{@link UIUtils#makeObserved} to make the returned object observed. Multi-level nested sets are not
* supported. For example, **Array<Array\<ClassA>>** persistence is not supported.
*
* @param { ConnectOptionsCollections<T, S> | ConnectOptions<T> } type - Passed **globalConnect** parameters. For
* details, see the description of **ConnectOptions** and **ConnectOptionsCollections**.
* <br>If **defaultSubCreator** is provided in **ConnectOptionsCollections**, **defaultCreator** must be provided.
* Otherwise, the persistence fails. The collection item type S must be the same as the return type of
* **defaultSubCreator**. If the return types are inconsistent, an error will be reported during compilation.
* @returns { T | undefined } Returns the data if creation or acquisition is successful; otherwise, returns
* **undefined**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
static globalConnect<T extends CollectionType<S>, S extends object>(type: ConnectOptionsCollections<T, S> | ConnectOptions<T>): T | undefined;
/**
* Persists the specified key-value pair data once.
*
* @param { string | TypeConstructorWithArgs<T> } keyOrType - Key to be persisted. If a type is specified, the key for
* persistence is the name of the type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static save<T>(keyOrType: string | TypeConstructorWithArgs<T>): void;
/**
* Called when persistence fails.
*
* @param { PersistenceErrorCallback | undefined } callback - Callback called when persistence fails.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static notifyOnError(callback: PersistenceErrorCallback | undefined): void;
}
/**
* Represents a class constructor.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export interface TypeConstructor<T> {
/**
* Creates and returns an instance of the specified type T.
*
* @returns { T } Instance of the T type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
new (): T;
}
/**
* Defines the attribute decorator, which is used to decorate attributes of the custom class in a nested class.
*
* @param { TypeConstructor<T> } type - Type of the class property.
* @returns { PropertyDecorator } Property decorator.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare type TypeDecorator = <T>(type: TypeConstructor<T>) => PropertyDecorator;
/**
* Define Type PropertyDecorator, adds type information to an object.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
* @noninterop
*/
export declare const Type: TypeDecorator;
/**
* Provides APIs for handling data transformations related to state management.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class UIUtils {
/**
* Obtains the original object from a proxy object wrapped by the state management framework. For details, see
* [getTarget API: Obtaining Original Objects](docroot://ui/state-management/arkts-new-getTarget.md).
*
* @param { T } source - Source object.
* @returns { T } Original object of the source after the proxy added by the state management framework is removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static getTarget<T extends object>(source: T): T;
/**
* Converts ordinary unobservable data into observable data. For details, see
* [makeObserved API: Changing Unobservable Data to Observable Data](docroot://ui/state-management/arkts-new-makeObserved.md).
*
* @param { T } source - Source object. It supports classes not decorated by @Observed or @ObservedV2, objects
* returned by **JSON.parse**, and classes decorated by @Sendable.
* <br>Array, Map, Set, and Date types are supported.
* <br>collections.Array, collections.Set, and collections.Map are supported.
* <br>For details, see
* [makeObserved API: Changing Unobservable Data to Observable Data](docroot://ui/state-management/arkts-new-makeObserved.md).
* @returns { T } Observable data.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
static makeObserved<T extends object>(source: T): T;
/**
* Wraps an unobservable object into an object that is observable by V1 state management. This API is equivalent to @
* Observed and can be used to initialize @ObjectLink.
*
* This API can be used together with [enableV2Compatibility]{@link UIUtils#enableV2Compatibility} in scenarios where
* state management V1 and V2 are used together. For details, see
* [Mixed Use of State Management V1 and V2 (API Version 19 and Later)](docroot://ui/state-management/arkts-v1-v2-mixusage.md).
*
* @param { T } source - Data source. Common classes, Array, Map, Set, and Date types are supported.
* <br>[@arkts.collections]{@link @arkts.collections:collections} (ArkTS containers) and
* classes decorated with [@Sendable](docroot://arkts-utils/arkts-sendable.md) are not supported.
* <br>**undefined** and **null** are not supported. V2 state management data and
* the return value of [makeObserved]{@link UIUtils#makeObserved} are not supported.
* @returns { T } For supported input parameter types, returns data observable by V1 state management. For unsupported
* input parameter types, returns the data source object itself.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
static makeV1Observed<T extends object>(source: T): T;
/**
* Enables V1 state variables to be observable in @ComponentV2. This API is primarily used in scenarios where V1 and V
* 2 state management are mixed. For details, see
* [Mixed Use of State Management V1 and V2 (API Version 19 and Later)](docroot://ui/state-management/arkts-v1-v2-mixusage.md).
*
* @param { T } source - Data source, which must be V1 state data.
* @returns { T } If the data source is V1 state data, returns data that can be observed in @ComponentV2; otherwise,
* returns the data source itself.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
static enableV2Compatibility<T extends object>(source: T): T;
/**
* Dynamically adds a listener to the state variable of state management V2. For details, see
* [addMonitor and clearMonitor APIs: Dynamically Adding and Removing Listeners](docroot://ui/state-management/arkts-new-addMonitor-clearMonitor.md).
*
* @param { object } target - Target object. Only
* [@ComponentV2](docroot://ui/state-management/arkts-create-custom-components.md#componentv2) and
* [@ObservedV2](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) instances are supported.
* <br>If an unsupported type is provided, a runtime error is thrown.
* @param { string | string[] } path - Name path of the variable to be listened for. You can specify a path or pass a
* string array to specify multiple variable paths to be listened for at a time.
* <br>Only string and string array are supported. If an unsupported type is provided, a runtime error is thrown.
* @param { MonitorCallback } monitorCallback - Listener function registered with the corresponding state variable.
* That is, when the state variable corresponding to the path changes, a specific function is called.
* <br>If an unsupported type is provided, a runtime error is thrown.
* @param { MonitorOptions} [options] - Configuration item of the listener. For details, see
* [MonitorOptions]{@link MonitorOptions}. By default, the asynchronous callback is used.
* @throws { BusinessError } 130000 - The target is not a custom component instance or V2 class instance.
* @throws { BusinessError } 130001 - The path is invalid.
* @throws { BusinessError } 130002 - monitorCallback is not a function or an anonymous function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static addMonitor(target: object, path: string | string[], monitorCallback: MonitorCallback, options?: MonitorOptions): void;
/**
* Deletes the listener added to the state variable of the state management V2 by calling the
* [addMonitor]{@link UIUtils#addMonitor} API. For details, see
* [addMonitor and clearMonitor APIs: Dynamically Adding and Removing Listeners](docroot://ui/state-management/arkts-new-addMonitor-clearMonitor.md).
*
* @param { object } target - Target object. Only
* [@ComponentV2](docroot://ui/state-management/arkts-create-custom-components.md#componentv2) and
* [@ObservedV2](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) instances are supported.
* <br>If an unsupported type is provided, a runtime error is thrown.
* @param { string | string[] } path - Name path of the variable to be deleted. You can specify a path or pass a
* string array to delete the listener functions of multiple state variables at a time.
* <br>Only string and string array are supported. If an unsupported type is provided, a runtime error is thrown.
* @param { MonitorCallback } [monitorCallback] - Listener function to be deleted.
* <br>If this parameter is not specified, all listener functions registered with the variable corresponding to
* the path will be deleted.
* <br>If an unsupported type is provided, a runtime error is thrown.
* @throws { BusinessError } 130000 - The target is not a custom component instance or V2 class instance.
* @throws { BusinessError } 130001 - The path is invalid.
* @throws { BusinessError } 130002 - monitorCallback is not a function or an anonymous function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static clearMonitor(target: object, path: string | string[], monitorCallback?: MonitorCallback): void;
/**
* Creates a read-only one-way data binding instance, which is used to construct the arguments of the **Binding** type
* in the [\@Builder](docroot://ui/state-management/arkts-builder.md) function.
*
* @param { GetterCallback<T> } getter - Callback used to obtain the value. Each value access triggers this function
* to obtain the latest value.
* @returns { Binding<T> } Returns a read-only one-way data binding instance with a **value** attribute, which is used
* to obtain the currently bound value. The value can only be read and cannot be directly modified.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static makeBinding<T>(getter: GetterCallback<T>): Binding<T>;
/**
* Creates a mutable two-way data binding instance, which is used to construct the argument of the **MutableBinding**
* type in the \@Builder function.
*
* @param { GetterCallback<T> } getter - Callback used to obtain the value. Each value access triggers this function
* to obtain the latest value.
* @param { SetterCallback<T> } [setter] - Callback used to update the value. Each modification to **.value** triggers
* this function.
* @returns { MutableBinding<T> } Returns a two-way data binding instance with a **value** attribute, which allows you
* to read and modify data. If the value is set, the system checks whether the value type matches the generic type
* **T**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static makeBinding<T>(getter: GetterCallback<T>, setter: SetterCallback<T>): MutableBinding<T>;
/**
* Synchronously updates a specified state variable. This API receives a closure function and updates only the
* internal modifications, including the updates of [@Computed](docroot://ui/state-management/arkts-new-computed.md)
* and [@Monitor](docroot://ui/state-management/arkts-new-monitor.md) decorators, and re-rendering of the UI nodes.
* For details, see
* [applySync/flushUpdates/flushUIUpdates APIs: Synchronous Update](docroot://ui/state-management/arkts-new-applySync-flushUpdates-flushUIUpdates.md).
*
* @param { TaskCallback } task - Closure function. The state variable modification generated in the closure will be
* executed synchronously.
* @returns { T } Return value obtained by executing the closure function.
* @throws { BusinessError } 140001 - The function is not allowed to be called in @Computed
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static applySync<T>(task: TaskCallback): T;
/**
* Synchronously updates all state variable modifications before this API call, including the updates
* of @Computed and @Monitor decorators, and re-rendering of the UI nodes. For details, see
* [applySync/flushUpdates/flushUIUpdates APIs: Synchronous Update](docroot://ui/state-management/arkts-new-applySync-flushUpdates-flushUIUpdates.md).
*
* @throws { BusinessError } 140001 - The function is not allowed to be called in @Computed
* @throws { BusinessError } 140002 - The function is not allowed to be called in @Monitor
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static flushUpdates(): void;
/**
* Processes all state variable modifications before this API call and synchronizes the
* [dirty](docroot://ui/state-management/arkts-state-management-introduce.md#triggering-updates) UI nodes. However, it
* does not synchronize the execution of @Computed and @Monitor decorators. For details, see
* [applySync/flushUpdates/flushUIUpdates APIs: Synchronous Update](docroot://ui/state-management/arkts-new-applySync-flushUpdates-flushUIUpdates.md).
*
* @throws { BusinessError } 140001 - The function is not allowed to be called in @Computed
* @throws { BusinessError } 140002 - The function is not allowed to be called in @Monitor
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static flushUIUpdates(): void;
/**
* Determines whether a data object can be observed and returns the observation result. For details, see
* [canBeObserved API: Determining Whether an Object Can Be Observed](docroot://ui/state-management/arkts-new-canBeObserved.md).
*
* @param { T } source - Data object to be determined. Array, Map, Set, and Date types are supported.
* <br>For details, see
* [canBeObserved API: Determining Whether an Object Can Be Observed](docroot://ui/state-management/arkts-new-canBeObserved.md).
* @returns { ObservedResult } Returns a result about whether the object can be observed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
static canBeObserved<T extends object>(source: T): ObservedResult;
/**
* Obtains the [lifecycle of a custom component]{@link ComponentInit}.
*
* @param { T } customComponent - Custom component instance.
* @returns { CustomComponentLifecycle } Lifecycle instance of a custom component obtained.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
static getLifecycle<T extends BaseCustomComponent>(customComponent: T): CustomComponentLifecycle;
/**
* Obtains [CustomComponentContext]{@link CustomComponentContext} of the given @Component(V1) or @ComponentV2.
* **CustomComponentContext** can be used to access the reuse pool of the component. For details about the reuse pool,
* see
* [Global Reuse: Centralized Component Recycling and Reuse](docroot://ui/state-management/arkts-global-reuse-pool.md).
*
* @param { T } customComponent - @Component or @ComponentV2 whose context is to be obtained.
* @returns { CustomComponentContext } Context object of the given component instance.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
static getCustomComponentContext<T extends BaseCustomComponent>(customComponent: T): CustomComponentContext;
}
/**
* Defines a synchronous callback.
*
* @returns { T } Return value obtained by executing the closure function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
declare type TaskCallback = () => T;
/**
* Listener callback function of the [IMonitor]{@link IMonitor} type.
*
* @param { IMonitor} monitorValue - Change information passed by the callback.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type MonitorCallback = (monitorValue: IMonitor) => void;
/**
* Defines the optional parameters for [addMonitor]{@link UIUtils#addMonitor}, which are used to configure the callback
* type and whether to enable the wildcard capability.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export interface MonitorOptions {
/**
* Whether the current callback is a synchronous callback. **true**: The current callback is a synchronous callback.
* **false** (default value): The current callback is an asynchronous callback.
*
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
isSynchronous?: boolean;
/**
* Whether to enable the wildcard capability for this **addMonitor**. **true** to enable the wildcard capability, and
* **false** means the opposite. The default value is **false**. If the wildcard capability is disabled but the path
* contains wildcards, the path is considered invalid.
*
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
enableWildcard?: boolean;
}
/**
* Defines a callback used to obtain a value.
*
* @returns { T } Value of the T type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type GetterCallback<T> = () => T;
/**
* Defines a callback used to set a value.
*
* @param { T } newValue - Parameter of the T type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type SetterCallback<T> = (newValue: T) => void;
/**
* Represents the generic class for read-only data binding, which can bind data of any type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare class Binding<T> {
/**
* Obtains a bound value.
*
* @returns { T } Returns a value whose type is the generic parameter T, which is the same as the type defined by
* **Binding<T>**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
get value(): T;
}
/**
* Represents a generic class for mutable data binding, which allows the read and write operations on the bound value
* and provides complete **get** and **set** accessors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare class MutableBinding<T> {
/**
* Obtains a bound value.
*
* @returns { T } Returns a value whose type is the generic parameter T, which is the same as the type defined by
* **Binding<T>**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
get value(): T;
/**
* Provides the **set** accessor to set a new value for the current bound value. The **set** accessor must be provided
* when the **MutableBinding** class instance is constructed. Otherwise, a runtime error will be thrown when the
* **set** accessor is triggered.
*
* @param { T } newValue - New value, whose type is the generic parameter T, which is the same as the type defined in
* **MutableBinding<T>**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
set value(newValue: T);
}
/**
* Provides the result of whether the object can be observed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export interface ObservedResult {
/**
* Whether an object can be observed.
*
* **true**: The object can be observed.
*
* **false**: The object cannot be observed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
isObserved: boolean;
/**
* Reason for the object's observability.
*
* For the object that cannot be observed: The object itself cannot be observed.
*
* For the object that can be observed:
*
* 1. The V1 object is decorated by the [@Observed](docroot://ui/state-management/arkts-observed-and-objectlink.md)
* decorator or the object is converted by the [makeV1Observed]{@link UIUtils#makeV1Observed} method.
* 2. The V1 object is decorated by the [@Observed](docroot://ui/state-management/arkts-observed-and-objectlink.md)
* decorator or the object is converted by the [makeV1Observed]{@link UIUtils#makeV1Observed} method, but the object is not used by the UI component.
* 3. The V1 object is converted by the [enableV2Compatibility]{@link UIUtils#enableV2Compatibility} method
* and then passed to the V2 component.
* 4. The V1 object is converted by the [enableV2Compatibility]{@link UIUtils#enableV2Compatibility} method
* and then passed to the V2 component, but is not used by the V2 component.
* 5. The V2 object is decorated by the
* [@ObservedV2 or @Trace](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) decorator.
* 6. The V2 object is converted by the [makeObserved]{@link UIUtils#makeObserved} method.
* 7. The V2 object is of the Array, Map, Set, or Date type.
* 8. The V2 object is decorated by the
* [@ObservedV2 or @Trace](docroot://ui/state-management/arkts-new-observedV2-and-trace.md) decorator,
* but is not used by the UI component.
* 9. The V2 object is converted by the [makeObserved]{@link UIUtils#makeObserved} method, but the object is not
* used by the UI component.
* 10. The V2 object is of the Array, Map, Set, or Date type, but is not used by the UI component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
reason: string;
/**
* Decorator and component information associated with the observable object. If the object cannot be observed, the
* array is empty.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
decoratorInfo: Array<DecoratorInfo>;
}
/**
* Defines the decorator and component information associated with the observable object.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export interface DecoratorInfo {
/**
* Decorator name.
*
* For a V1 object, the value is the name of the decorator associated with the object.
*
* If the V1 object uses [@Track](docroot://ui/state-management/arkts-track.md), the value is **'@Track'**.
*
* If the V2 object uses [@Trace](docroot://ui/state-management/arkts-new-observedV2-and-trace.md), the value is
* **'@Trace'**.
*
* If the V2 object uses [makeObserved]{@link UIUtils#makeObserved}, the value is **'MakeObserved'**.
*
* If the V2 object uses [enableV2Compatibility]{@link UIUtils#enableV2Compatibility}, the value is
* **'EnableV2Compatible'**.
*
* If the V2 object uses built-in data, the value is **'ProxyObservedV2'**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
decoratorName: string;
/**
* Name of the attribute decorated by the decorator.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
stateVariableName: string;
/**
* Component or object name.
*
* For a V1 object, the component name is returned.
*
* For a V1 object whose properties are decorated by the [@Track](docroot://ui/state-management/arkts-track.md)
* decorator, the object name is returned.
*
* For a V2 object, the object name is returned.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
owningComponentOrClassName: string;
/**
* Component ID.
*
* For a V1 object, the component ID is returned.
*
* For the V1 object whose properties are decorated by the [@Track](docroot://ui/state-management/arkts-track.md)
* decorator or for the V2 object, **-1** is returned instead of the component ID.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
owningComponentId: number;
/**
* Information about the component that uses the observable object. If the object is not used in any UI, an empty
* array is returned.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
dependentInfo: Array<ElementInfo>;
}
/**
* Defines information about the components associated with the observable object, including system components and
* custom components.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export interface ElementInfo {
/**
* Component name.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
elementName: string;
/**
* Component ID.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
elementId: number;
}
/**
* **CustomComponentLifecycle** monitors the lifecycle changes of a custom component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare interface CustomComponentLifecycle {
/**
* getCurrentState(): CustomComponentLifecycleState
*
* @returns { CustomComponentLifecycleState } - Current lifecycle status of a custom component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
getCurrentState(): CustomComponentLifecycleState;
/**
* Registers a listener for the lifecycle of a custom component. Lifecycle changes will trigger the lifecycle callback in the listener.
*
* @param { CustomComponentLifecycleObserver } observer - Listener for a custom component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
addObserver(observer: CustomComponentLifecycleObserver): void;
/**
* Removes a listener for the lifecycle of a custom component. After the listener is removed,
* the lifecycle callback in the listener is not triggered even if the component status changes.
*
* @param { CustomComponentLifecycleObserver } observer - Listener for a custom component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
removeObserver(observer: CustomComponentLifecycleObserver): void;
}
/**
* Observes lifecycle status changes of a custom component,
* and triggers the lifecycle callback in the listener when detecting lifecycle status changes.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare interface CustomComponentLifecycleObserver {
/**
* Called after a new instance of the custom component is created and before its **build()** function is executed.
* You can modify the status variables in this phase.
* Its function is similar to that of [aboutToAppear]{@link BaseCustomComponent.aboutToAppear},
* but it is triggered under the constraints of the custom component state machine.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
aboutToAppear?(): void;
/**
* Called after a new instance of the custom component is created and its **build()** function is executed.
* You can use this callback for actions that do not affect the UI, such as event data reporting.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
onDidBuild?(): void;
/**
* Called before the custom component is destroyed. You are advised not to change state variables
* in the **aboutToDisappear** function. Modifying the **@Link** decorated variable may lead to unstable
* application behavior. This function is similar to the earlier **aboutToDisappear** function, which is triggered
* under the constraints of the custom component state machine. Therefore, this function is added for compatibility.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
aboutToDisappear?(): void;
/**
* Called when a reusable custom component is re-added to the node tree from the cache to receive the component
* constructors. The value of **params** is not **undefined** in the reuse callback of the V1 component. The value
* of **params** is **undefined** in the reuse callback of the V2 component.
*
* @param { Record<string, Object | undefined |null> } [params] - The value is not **undefined** in the reuse
* callback of the V1 component and is **undefined** in the reuse callback of the V2 component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
aboutToReuse?(params?: Record<string, Object | undefined | null>): void;
/**
* Called after necessary component recycling operations defined in the application are performed.
* Then, the component is frozen to prevent UI updates when the component is in the recycling pool.
* At last, the **aboutToRecycle** function recursively traverses all child components,
* and the **aboutToRecycle** function in each recycled child component will be called.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
aboutToRecycle?(): void;
}
/**
* Current lifecycle status of a custom component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare enum CustomComponentLifecycleState {
/**
* Initial.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
INIT = 0,
/**
* To build.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
APPEARED = 1,
/**
* Built.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
BUILT = 2,
/**
* Recycled.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
RECYCLED = 3,
/**
* Deleted.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
DISAPPEARED = 4
}
/**
* Decorates a function that is called when the initialization of a custom component is about to complete.
* You can register a listener at this time.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentInit: MethodDecorator;
/**
* Decorates a function that is called after a new instance of the custom component is created and
* before the **build()** function is executed. This callback is similar to **aboutToAppear**. The difference is that
* the **@ComponentAppear** callback is triggered only when the custom component is in the
* **[CustomComponentLifecycleState]{@link CustomComponentLifecycleState}.INIT** state. The state variable can be
* changed in **@ComponentAppear**. The change will take effect in the subsequent **build()** function execution.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentAppear: MethodDecorator;
/**
* Decorates a function that is called after the **build()** function of the custom component is executed
* for the first time, that is, when the component status changes from **CustomComponentLifecycleState.APPEARED**
* to **CustomComponentLifecycleState.BUILT**. You can use this callback for actions that do not affect the UI,
* such as tracking data reporting.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentBuilt: MethodDecorator;
/**
* Decorates a function that is called when a reusable custom component is re-added to the node tree from the cache,
* that is, when the component status changes from the **CustomComponentLifecycleState.RECYCLED** to
* **CustomComponentLifecycleState.BUILT** phase, to receive the constructor parameters. At last, the function
* decorated by **@ComponentReuse** recursively traverses all child components, and the **@ComponentReuse**
* decorated function in each reused child component will be called.
*
* > **NOTE**
* >
* > - The value of **params** is not **undefined** in the callback of the reused state management V1 component.
* >
* > - The value of **params** is **undefined** in the callback of the reused state management V2 component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentReuse: MethodDecorator;
/**
* Decorates a function that is called when the necessary recycling operations defined in the application
* are performed. That is, this function is triggered when the component status changes
* from **CustomComponentLifecycleState.BUILT** to **CustomComponentLifecycleState.RECYCLED**.
* At last, the function decorated by **@ComponentRecycle** recursively traverses all child components,
* and the **@ComponentRecycle** decorated function in each recycled child component will be called.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentRecycle: MethodDecorator;
/**
* The function decorated is invoked before a custom component becomes active.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const ComponentActive: MethodDecorator;
/**
* The function decorated is invoked before a custom component becomes inactive.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare const ComponentInactive: MethodDecorator;
/**
* Decorates a function that is called when the custom component is destructed. You are advised not to
* change state variables in this function. Modifying the **@Link** decorated variable may lead to
* unstable application behavior.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export declare const ComponentDisappear: MethodDecorator;
/**
* The **CustomComponentContext** class provides access to component-level services, including the reuse pool. You can
* obtain an instance through [UIUtils.getCustomComponentContext]{@link UIUtils#getCustomComponentContext}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare interface CustomComponentContext {
/**
* Obtains the global reuse pool of the custom component. If the component does not configure the reuse pool through
* **reusePool** and **poolAccepts**, **undefined** is returned. For details about how to configure the global reuse
* pool, see
* [Global Reuse: Centralized Component Recycling and Reuse](docroot://ui/state-management/arkts-global-reuse-pool.md).
*
* @returns { IReusePool | undefined } If a global reuse pool is configured for the current component, the reuse pool
* information is returned. Otherwise, **undefined** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
getReusePool(): IReusePool | undefined;
}
/**
* The **IReusePool** API provides the features related to the global reuse pool of a custom component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare interface IReusePool {
/**
* Obtains the information about the recycling instance of a given reusable component type in this reuse pool.
*
* @param { ReusableComponentConstructor } constructor - Name of the reusable custom component to be queried.
* @param { string } [reuseId] - Reuse ID for filtering. If specified, only the information about the reuse pool with
* the reuse ID is returned. The default value is **undefined**, indicating that information about all reuse pools
* is returned.
* @returns { IReusableInfo[] | IReusableInfo | undefined } If the reuse pool is not configured to accept the given
* component type, **undefined** is returned.
* <br>If **reuseId** is specified, a single **IReusableInfo** is returned (even if **count** is set to **0** and
* **maxCount** is set to the default value).
* <br>If **reuseId** is not specified and the reusable component does not use **reuseId**, a single **IReusableInfo**
* is returned.
* <br>If **reuseId** is not specified but the reusable component uses **reuseId**, an **Array<IReusableInfo>** is
* returned, providing a separate entry for each **reuseId** that has a positive value of **count** or a non-
* default value of **maxCount** as well as an entry of **reuseId: undefined**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
getReusableInfo(constructor: ReusableComponentConstructor, reuseId?: string): IReusableInfo[] | IReusableInfo | undefined;
/**
* Pre-creates @Reusable/@ReusableV2 decorated components and places them in this reuse pool.
*
* @param { WrappedBuilder<[]> } builder - **WrappedBuilder** that contains the @Builder decorated function to be
* executed *n* times. Each execution should create one or more @Reusable/@ReusableV2 decorated components.
* @param { number } times - Number of times the @Builder decorated function is executed.
* @returns { Promise<void> } Promise parsed when the idle task is successfully completed. This promise returns no
* value.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
preRender(builder: WrappedBuilder<[
]>, times: number): Promise<void>;
}
/**
* The **IReusableInfo** API provides information about the current number and maximum number of reusable components
* managed by the reuse pool.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare interface IReusableInfo {
/**
* Current number of @Reuseable/V2 component instances in pool.
* count is usually <= maxCount. It is allowed to be larger for short time
* because pool clean happens asynchronously.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
readonly count: number;
/**
* Maximum number of permissible @Reusable/V2 component instances.
* The default value is 100, the maximum value is 200.
* Setting to a negative number will be treated as setting to 0.
* Setting to a number greater than maximum will be treated as setting to 200.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
maxCount: number;
/**
* reuse id.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
readonly reuseId?: string;
}
/**
* Function for initializing the reusable custom component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
declare type ReusableComponentConstructor = Function;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.UIContext.d.ts.md
# @ohos.arkui.UIContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import font from './@ohos.font';
import mediaQuery from './@ohos.mediaquery';
import type inspector from './@ohos.arkui.inspector';
import promptAction, { LevelOrder, LevelMode } from './@ohos.promptAction';
import router from './@ohos.router';
import type componentUtils from './@ohos.arkui.componentUtils';
import { ComponentContent, FrameNode, Frame } from './@ohos.arkui.node';
import type { AnimatorOptions, AnimatorResult } from './@ohos.animator';
import type observer from './@ohos.arkui.observer';
import { SimpleAnimatorOptions } from './@ohos.animator';
import type { Callback, AsyncCallback } from './@ohos.base';
import { MeasureOptions } from './@ohos.measure';
import type componentSnapshot from './@ohos.arkui.componentSnapshot';
import type dragController from './@ohos.arkui.dragController';
import image from './@ohos.multimedia.image';
import type common from './@ohos.app.ability.common';
import type pointer from './@ohos.multimodalInput.pointer';
/**
* Provides APIs for registering custom fonts.
*
* > **NOTE**
* >
* > - In the following API examples, you must first use [getFont()]{@link UIContext.getFont} in **UIContext** to obtain
* > a **Font** instance, and then call the APIs using the obtained instance.
* >
* > - You are advised to use the [loadFontSync]{@link @ohos.graphics.text:text.FontCollection#loadFontSync} API of the
* > font engine to register custom fonts.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class Font {
/**
* Registers a custom font with the font manager.
*
* This API is asynchronous and does not support concurrent calls.
*
* @param { font.FontOptions } options - Information about the custom font to register.<br>**NOTE**<br>When setting
* the path to the font file, you are advised to use a string with the **file://** path prefix for resources
* within the system sandbox path. Ensure that the file exists in the sandbox directory path and has read
* permissions.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
registerFont(options: font.FontOptions): void;
/**
* Obtains the list of supported fonts.
*
* This API only takes effect on PCs/2-in-1 devices and returns an empty array on other devices.
*
* You are advised to use the
* [getSystemFontFullNamesByType]{@link @ohos.graphics.text:text.getSystemFontFullNamesByType} API to obtain the
* latest system-supported font list data.
*
* @returns { Array<string> } List of supported fonts.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 10
*/
getSystemFontList(): Array<string>;
/**
* Obtains information about a system font based on the font name.
*
* @param { string } fontName - System font name.
* @returns { font.FontInfo } Detailed information of the font.
* <br>If no font is found, **undefined** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 10
*/
getFontByName(fontName: string): font.FontInfo;
}
/**
* class MediaQuery
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class MediaQuery {
/**
* Sets the media query criteria and returns the corresponding listening handle
*
* @param { string } condition - media conditions
* @returns { mediaQuery.MediaQueryListener } the corresponding listening handle
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
matchMediaSync(condition: string): mediaQuery.MediaQueryListener;
}
/**
* Provides APIs for registering the component layout and drawing display completion callbacks.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class UIInspector {
/**
* Registers a callback for layout and drawing display completion notifications for a specific component.
* @param { string } id - ID of the target component, set using the universal attributes [id]{@link CommonMethod#id}
* or [key]{@link CommonMethod#key}.
* @returns { inspector.ComponentObserver } Component observer, which is used to register or unregister listeners
* for completion of component layout or drawing display.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
createComponentObserver(id: string): inspector.ComponentObserver;
/**
* Sets the component after layout or draw criteria and returns the corresponding listening handle.
*
* @param { string | number } id - component id or uniqueId of the component.
* @returns { inspector.ComponentObserver } create listener for observer component event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
createComponentObserver(id: string | number): inspector.ComponentObserver;
}
/**
* Provides APIs to access pages through URLs. You can use the APIs to navigate to a specified page in an application,
* replace the current page with another one in the same application, and return to the previous page or a specified
* page.
*
* > **NOTE**
*
* > In the following API examples, you must first use
* > [getRouter()](docroot://reference/apis-arkui/arkts-apis-uicontext-uicontext.md#getrouter) in **UIContext** to
* > obtain a **Router** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class Router {
/**
* Navigates to a specified page in the application. This API uses an asynchronous callback to return the result.
*
* @param { router.RouterOptions } options - Page routing parameters.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void;
/**
* Navigates to a specified page in the application. This API uses a promise to return the result.
*
* @param { router.RouterOptions } options - Page routing parameters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushUrl(options: router.RouterOptions): Promise<void>;
/**
* Navigates to a specified page in the application. This API uses an asynchronous callback to return the result.
* Compared with [pushUrl]{@link Router#pushUrl(options: router.RouterOptions, callback: AsyncCallback<void>)}, this
* API supports the **mode** parameter, which enables you to set the routing mode.
*
* @param { router.RouterOptions } options - Page routing parameters.
* @param { router.RouterMode } mode - Routing mode.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
/**
* Navigates to a specified page in the application. This API uses a promise to return the result. Compared with
* [pushUrl]{@link Router#pushUrl(options: router.RouterOptions)}, this API supports the **mode** parameter, which
* enables you to set the routing mode.
*
* @param { router.RouterOptions } options - Page routing parameters.
* @param { router.RouterMode } mode - Routing mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>;
/**
* Replaces the current page with another one in the application and destroys the current page. This API uses an
* asynchronous callback to return the result.
*
* @param { router.RouterOptions } options - Description of the new page.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does
* not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceUrl(options: router.RouterOptions, callback: AsyncCallback<void>): void;
/**
* Replaces the current page with another one in the application and destroys the current page. This API uses a
* promise to return the result.
*
* @param { router.RouterOptions } options - Description of the new page.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does
* not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceUrl(options: router.RouterOptions): Promise<void>;
/**
* Replaces the current page with another one in the application and destroys the current page. This API uses an
* asynchronous callback to return the result. Compared with
* [replaceUrl]{@link Router#replaceUrl(options: router.RouterOptions, callback: AsyncCallback<void>)}, this API
* supports the **mode** parameter, which enables you to set the routing mode.
*
* @param { router.RouterOptions } options - Description of the new page.
* @param { router.RouterMode } mode - Routing mode.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does
* not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
/**
* Replaces the current page with another one in the application and destroys the current page. This API uses a
* promise to return the result. Compared with [replaceUrl]{@link Router#replaceUrl(options: router.RouterOptions)},
* this API supports the **mode** parameter, which enables you to set the routing mode.
*
* @param { router.RouterOptions } options - Description of the new page.
* @param { router.RouterMode } mode - Routing mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard
* system.
* @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does
* not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise<void>;
/**
* Returns to the previous page or a specified page.
*
* @param { router.RouterOptions } options - Description of the target page. The **url** parameter specifies the URL
* of the page to return to. If the page with the specified URL does not exist in the navigation stack, no action
* is performed. If the navigation stack contains the corresponding URL, the application returns to the page with.
* the largest index.<br>If no URL is set, the application returns to the previous page, and the page is not
* rebuilt. The page in the page stack is not reclaimed. It will be reclaimed after being popped up.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
back(options?: router.RouterOptions): void;
/**
* Returns to the specified page.
*
* @param { number } index - Index of the target page to navigate to.
* <br>Value range: [0, +∞).
* @param { Object } [params] - Parameters carried when returning to the page.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
back(index: number, params?: Object): void;
/**
* Clears all historical pages in the stack and retains only the current page at the top of the stack.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
clear(): void;
/**
* Obtains the number of pages in the current stack.
*
* > **NOTE**
*
* @returns { string } Number of pages in the stack. The maximum value is **32**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
* @deprecated since 23
* @useinstead ohos.arkui.UIContext.Router#getStackSize
*/
getLength(): string;
/**
* Obtains the number of pages in the current stack.
*
* @returns { number } Number of pages in the stack. The maximum value is **32**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
getStackSize(): number;
/**
* Obtains state information about the current page.
*
* @returns { router.RouterState } Page routing state.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getState(): router.RouterState;
/**
* Obtains the status information about a page by its index.
*
* @param { number } index - Index of the target page.
* <br>Value range: [1, +∞).
* @returns { router.RouterState | undefined } State information about the target page. **undefined** if the specified
* index does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getStateByIndex(index: number): router.RouterState | undefined;
/**
* Obtains the status information about a page by its URL.
*
* @param { string } url - URL of the target page.
* @returns { Array<router.RouterState> } Page routing state.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getStateByUrl(url: string): Array<router.RouterState>;
/**
* Enables the display of a confirm dialog box before returning to the previous page.
*
* @param { router.EnableAlertOptions } options - Description of the dialog box.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showAlertBeforeBackPage(options: router.EnableAlertOptions): void;
/**
* Disables the display of a confirm dialog box before returning to the previous page.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
hideAlertBeforeBackPage(): void;
/**
* Obtains the parameters passed from the page that initiates redirection to the current page.
*
* @returns { Object } Parameters passed from the page that initiates redirection to the current page.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getParams(): Object;
/**
* Navigates to a page using the named route. This API uses an asynchronous callback to return the result.
*
* @param { router.NamedRouterOptions } options - Page routing parameters.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void;
/**
* Navigates to a page using the named route. This API uses a promise to return the result.
*
* @param { router.NamedRouterOptions } options - Page routing parameters.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushNamedRoute(options: router.NamedRouterOptions): Promise<void>;
/**
* Navigates to a page using the named route. This API uses an asynchronous callback to return the result. Compared
* with
* [pushNamedRoute]{@link Router#pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>)},
* this API supports the **mode** parameter, which enables you to set the routing mode.
*
* @param { router.NamedRouterOptions } options - Page routing parameters.
* @param { router.RouterMode } mode - Routing mode.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
/**
* Navigates to a page using the named route. This API uses a promise to return the result. Compared with
* [pushNamedRoute]{@link Router#pushNamedRoute(options: router.NamedRouterOptions)}, this API supports the **mode**
* parameter, which enables you to set the routing mode.
*
* @param { router.NamedRouterOptions } options - Page routing parameters.
* @param { router.RouterMode } mode - Routing mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>;
/**
* Replaces the current page with another one using the named route and destroys the current page. This API uses an
* asynchronous callback to return the result.
*
* @param { router.NamedRouterOptions } options - Description of the new page.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>): void;
/**
* Replaces the current page with another one using the named route and destroys the current page. This API uses a
* promise to return the result.
*
* @param { router.NamedRouterOptions } options - Description of the new page.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not
* string.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceNamedRoute(options: router.NamedRouterOptions): Promise<void>;
/**
* Replaces the current page with another one using the named route and destroys the current page. This API uses an
* asynchronous callback to return the result. Compared with
* [replaceNamedRoute]{@link Router#replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback<void>)},
* this API supports the **mode** parameter, which enables you to set the routing mode.
*
* @param { router.NamedRouterOptions } options - Description of the new page.
* @param { router.RouterMode } mode - Routing mode.
* @param { AsyncCallback<void> } callback - - Callback for the router navigation result.<br>If the navigation succeeds,
* **error** is **undefined**. If the navigation fails, **error** is the error object returned by the system.
* @throws { BusinessError } 401 - if the number of parameters is less than 1 or the type of the url parameter is not
* string.
* @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the
* standard system.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback<void>): void;
/**
* Replaces the current page with another one using the named route and destroys the current page. This API uses a
* promise to return the result. Compared with
* [replaceNamedRoute]{@link Router#replaceNamedRoute(options: router.NamedRouterOptions)}, this API supports the
* **mode** parameter, which enables you to set the routing mode.
*
* @param { router.NamedRouterOptions } options - Description of the new page.
* @param { router.RouterMode } mode - Routing mode.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard
* system.
* @throws { BusinessError } 100004 - Named route error. The named route does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise<void>;
}
/**
* Defines a type that can be used for component attributes and method parameters to customize the UI description and
* generate custom components with a specific component ID.
*
* @param { number } id
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
declare type CustomBuilderWithId = (id: number) => void;
/**
* Specifies the target node for component binding.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
export interface TargetInfo {
/**
* Target node for binding popups or menus.<br>**NOTE**<br>1. When **id** is a number, it corresponds to the component's **UniqueID**,
* whose uniqueness is guaranteed by the system.<br>2. When **id** is a string,
* it corresponds to the component specified by the universal attribute
* [id]{@link CommonMethod#id}. You must ensure the uniqueness of this ID,
* although there may be multiple instances.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
id: string | number;
/**
* Unique ID of the custom component where the target node is located.
* When the above **id** is specified as a string, this property can be used to narrow down the scope,
* helping you ensure the uniqueness of **id: string** within a certain range.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
componentId?: number;
}
/**
* Provides APIs to create and display toasts, dialog boxes, action menus, and custom popups.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 10.
* >
* > - In the following API examples, you must first use [getPromptAction()]{@link UIContext#getPromptAction} in
* > **UIContext** to obtain a **PromptAction** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class PromptAction {
/**
* Creates and displays a toast.
*
* @param { promptAction.ShowToastOptions } options - Toast configuration options.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showToast(options: promptAction.ShowToastOptions): void;
/**
* Displays a toast. This API uses a promise to return the toast ID for use with **closeToast**.
*
* @param { promptAction.ShowToastOptions } options - Toast configuration options.
* @returns { Promise<number> } Promise that returns the toast ID for use with **closeToast**.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
openToast(options: promptAction.ShowToastOptions): Promise<number>;
/**
* Closes the specified toast.
*
* @param { number } toastId - Toast ID returned from **openToast**.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @throws { BusinessError } 103401 - Cannot find the toast.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
closeToast(toastId: number): void;
/**
* Creates and displays a dialog box. This API uses an asynchronous callback to return the result.
*
* @param { promptAction.ShowDialogOptions } options - Dialog box configuration options.
* @param { AsyncCallback<promptAction.ShowDialogSuccessResponse> } callback - Callback used to return the result.
* On success, **err** is **undefined** and **data** contains the dialog box response.
* On failure, **err** provides error details.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback<promptAction.ShowDialogSuccessResponse>): void;
/**
* Creates and displays a dialog box. This API uses a promise to return the result.
*
* @param { promptAction.ShowDialogOptions } options - Dialog box configuration options.
* @returns { Promise<promptAction.ShowDialogSuccessResponse> } Promise that returns the dialog box response.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showDialog(options: promptAction.ShowDialogOptions): Promise<promptAction.ShowDialogSuccessResponse>;
/**
* Creates and displays an action menu. This API uses an asynchronous callback to return the result.
*
* @param { promptAction.ActionMenuOptions } options - Action menu options.
* @param { promptAction.ActionMenuSuccessResponse } callback - Callback used to return the menu response.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @since 10
* @deprecated since 11
* @useinstead showActionMenu
*/
showActionMenu(options: promptAction.ActionMenuOptions, callback: promptAction.ActionMenuSuccessResponse): void;
/**
* Creates and displays an action menu. This API uses an asynchronous callback to return the result.
*
* @param { promptAction.ActionMenuOptions } options - Action menu options.
* @param { AsyncCallback<promptAction.ActionMenuSuccessResponse> } callback - Callback used to return the result.
* On success, **err** is **undefined** and **data** contains the action menu response.
* On failure, **err** provides error details.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback<promptAction.ActionMenuSuccessResponse>): void;
/**
* Creates and displays an action menu. This API uses a promise to return the result.
*
* @param { promptAction.ActionMenuOptions } options - Action menu options.
* @returns { Promise<promptAction.ActionMenuSuccessResponse> } callback - Promise that returns the action menu response.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showActionMenu(options: promptAction.ActionMenuOptions): Promise<promptAction.ActionMenuSuccessResponse>;
/**
* Opens a custom dialog box corresponding to **dialogContent**. This API uses a promise to return the result.
* The dialog box displayed through this API has its content fully following style settings of **dialogContent**.
* It is displayed in the same way where **customStyle** is set to **true**.
*
* @param { ComponentContent<T> } dialogContent - Content of the custom dialog box.
* @param { promptAction.BaseDialogOptions } options - Dialog box style.<br>
* Note: If both [isModal]{@link @ohos.promptAction:promptAction.BaseDialogOptions} and [showInSubWindow]{@link @ohos.promptAction:promptAction.BaseDialogOptions}
* in **BaseDialogOptions** are set to **true**, only **showInSubWindow** takes effect.
* In this case, the non-modal dialog box is displayed without mask in the subwindow.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect.
* @throws { BusinessError } 103302 - Dialog content already exist. The ComponentContent has already been opened.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
openCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options?: promptAction.BaseDialogOptions): Promise<void>;
/**
* Opens a custom dialog box corresponding to **dialogContent**. This API uses a promise to return the result. A dialog box controller can be bound to the custom dialog box, allowing for subsequent control of the dialog box through the controller.
*
* The dialog box displayed through this API has its content fully following style settings of **dialogContent**. It is displayed in the same way where **customStyle** is set to **true**.
*
* @param { ComponentContent<T> } dialogContent - Content of the custom dialog box.
* @param { promptAction.DialogController } controller - Controller of the custom dialog box.
* @param { promptAction.BaseDialogOptions } options - Style of the custom dialog box.<br>
* Note: If both [isModal]{@link @ohos.promptAction:promptAction.BaseDialogOptions}
* and [showInSubWindow]{@link @ohos.promptAction:promptAction.BaseDialogOptions} in **BaseDialogOptions** are set to **true**,
* only **showInSubWindow** takes effect. In this case, the non-modal dialog box is displayed without mask in the subwindow.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect.
* @throws { BusinessError } 103302 - Dialog content already exist. The ComponentContent has already been opened.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
openCustomDialogWithController<T extends Object>(dialogContent: ComponentContent<T>, controller: promptAction.DialogController, options?: promptAction.BaseDialogOptions): Promise<void>;
/**
* Updates a custom dialog box corresponding to **dialogContent**. This API uses a promise to return the result.
*
* @param { ComponentContent<T> } dialogContent - Content of the custom dialog box.
* @param { promptAction.BaseDialogOptions } options - Dialog box style. Currently,
* only **alignment**, **offset**, **autoCancel**, and **maskColor** can be updated.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - Dialog content not found. The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
updateCustomDialog<T extends Object>(dialogContent: ComponentContent<T>, options: promptAction.BaseDialogOptions): Promise<void>;
/**
* Closes a custom dialog box corresponding to **dialogContent**. This API uses a promise to return the result.
*
* @param { ComponentContent<T> } dialogContent - Content of the custom dialog box.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - Dialog content error. The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - Dialog content not found. The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
closeCustomDialog<T extends Object>(dialogContent: ComponentContent<T>): Promise<void>;
/**
* Creates and displays a custom dialog box. This API uses a promise to return the dialog box ID for use with **closeCustomDialog**.
*
* @param { promptAction.CustomDialogOptions } options - Content of the custom dialog box.<br>
* Note: If both [isModal]{@link @ohos.promptAction:promptAction.BaseDialogOptions}
* and [showInSubWindow]{@link @ohos.promptAction:promptAction.BaseDialogOptions} in **BaseDialogOptions** are set to **true**,
* only **showInSubWindow** takes effect. In this case, the non-modal dialog box is displayed without mask in the subwindow.
* @returns { Promise<number> } Promise that returns the dialog box ID for use with **closeCustomDialog**.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
openCustomDialog(options: promptAction.CustomDialogOptions): Promise<number>;
/**
* Creates and displays a custom dialog box. This API uses a promise to return the dialog box ID for use with **closeCustomDialog**.
*
* The dialog box ID can be included in the dialog box content for related operations. A dialog box controller can be bound to the custom dialog box, allowing for subsequent control of the dialog box through the controller.
*
* @param { CustomBuilder | CustomBuilderWithId } builder - Content of the custom dialog box.
* @param { promptAction.DialogController } [controller] - Controller of the custom dialog box.
* @param { promptAction.DialogOptions } [options] - Style of the custom dialog box.<br>
* Note: If both [isModal]{@link @ohos.promptAction:promptAction.BaseDialogOptions}
* and [showInSubWindow]{@link @ohos.promptAction:promptAction.BaseDialogOptions} in **BaseDialogOptions** are set to **true**,
* only **showInSubWindow** takes effect. In this case, the non-modal dialog box is displayed without mask in the subwindow.
* @returns { Promise<number> } Promise Promise used to return the custom dialog box ID.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
presentCustomDialog(builder: CustomBuilder | CustomBuilderWithId, controller?: promptAction.DialogController, options?: promptAction.DialogOptions): Promise<number>;
/**
* Closes the specified custom dialog box.
*
* @param { number } dialogId - ID of the custom dialog box to close. It is returned from **openCustomDialog**.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal error.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
closeCustomDialog(dialogId: number): void;
/**
* Obtains the order of the topmost dialog box.
*
* This API returns the order of the dialog box currently at the top layer. This information can be used to specify
* the desired order for subsequent dialog boxes.
*
* @returns { LevelOrder } Order of the topmost dialog box.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
getTopOrder(): LevelOrder;
/**
* This API returns the order of the dialog box currently at the bottom layer. This information can be used to specify
* the desired order for subsequent dialog boxes.
*
* @returns { LevelOrder } Order of the topmost dialog box.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
getBottomOrder(): LevelOrder;
/**
* Creates and displays a popup with the specified content. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > - If an invalid **target** is provided, the popup will not be displayed.
* >
* > - You must maintain the provided **content**, on which [updatePopup]{@link PromptAction#updatePopup} and
* > [closePopup]{@link PromptAction#closePopup} rely to identify the target popup.
* >
* > - If your **wrapBuilder** includes other components (such as [Popup]{@link @ohos.arkui.advanced.Popup} or
* > [Chip]{@link @ohos.arkui.advanced.Chip}), the [ComponentContent]{@link ComponentContent:ComponentContent}
* > constructor must include four parameters, and the **options** parameter must be
* > **{ nestingBuilderSupported: true }**.
*
* @param { ComponentContent<T> } content - Content displayed in the popup.
* @param { TargetInfo } target - Information about the target component to bind.
* @param { PopupCommonOptions } [options] - Style of the popup.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103302 - The ComponentContent already exists.
* @throws { BusinessError } 103304 - The targetId does not exist.
* @throws { BusinessError } 103305 - The node of targetId is not in the component tree.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
openPopup<T extends Object>(content: ComponentContent<T>, target: TargetInfo, options?: PopupCommonOptions): Promise<void>;
/**
* Updates the style of the popup corresponding to the provided **content**. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > Updating the following properties is not supported: **showInSubWindow**, **focusable**, **onStateChange**, **onWillDismiss**, and **transition**.
*
* @param { ComponentContent<T> } content - Content displayed in the popup.
* @param { PopupCommonOptions } options - Style of the popup.<br>
* **NOTE**<br>
* Updating the following properties is not supported: **showInSubWindow**, **focusable**, **onStateChange**,
* **onWillDismiss**, and **transition**.
* @param { boolean } [partialUpdate] - Whether to update the popup in incremental mode.<br>
* Default value: **false**<br>
* **NOTE**<br>
* **true**: Incremental update. Only specified attributes in **options** are updated, and the other attributes retain
* their current values. If the attribute value passed in **options** is invalid or **undefined**, the attribute
* is not updated.<br>
* **false**: Full update. Specified attributes in **options** are updated, and the other attributes are restored to
* their default values.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
updatePopup<T extends Object>(content: ComponentContent<T>, options: PopupCommonOptions, partialUpdate?: boolean): Promise<void>;
/**
* Closes the popup corresponding to the provided **content**. This API uses a promise to return the result.
*
* @param { ComponentContent<T> } content - Content displayed in the popup.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
closePopup<T extends Object>(content: ComponentContent<T>): Promise<void>;
/**
* Opens a menu with the specified content. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > - If an invalid **target** is provided, the menu will not be displayed.
* >
* > - You must maintain the provided **content**, on which [updateMenu]{@link PromptAction#updateMenu} and
* > [closeMenu]{@link PromptAction#closeMenu} rely to identify the target menu.
* >
* > - If your **wrapBuilder** includes other components (such as [Popup]{@link @ohos.arkui.advanced.Popup} or
* > [Chip]{@link @ohos.arkui.advanced.Chip}), the [ComponentContent]{@link ComponentContent:ComponentContent}
* > constructor must include four parameters, and the **options** parameter must be
* > **{ nestingBuilderSupported: true }**.
* >
* > - Nested subwindow dialog boxes are not supported. For example, when [openMenu]{@link PromptAction#openMenu} has
* > **showInSubWindow** set to **true**, another dialog box with **showInSubWindow=true** cannot be displayed.
*
* @param { ComponentContent<T> } content - Content displayed in the menu.
* @param { TargetInfo } target - Information about the target component to bind.
* @param { MenuOptions } [options] - Style of the menu.<br>**NOTE**<br>The **title** property is not effective.<br>
* The **preview** parameter supports only the **MenuPreviewMode** type.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103302 - The ComponentContent already exists.
* @throws { BusinessError } 103304 - The targetId does not exist.
* @throws { BusinessError } 103305 - The node of targetId is not in the component tree.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
openMenu<T extends Object>(content: ComponentContent<T>, target: TargetInfo, options?: MenuOptions): Promise<void>;
/**
* Updates the style of the menu corresponding to the provided **content**. This API uses a promise to return the
* result.
*
* > **NOTE**
* >
* > - Updating for the following is not supported: **showInSubWindow**, **preview**, **previewAnimationOptions**,
* > **transition**, **onAppear**, **aboutToAppear**, **onDisappear**, **aboutToDisappear**, **onWillAppear**,
* > **onDidAppear**, **onWillDisappear**, and **onDidDisappear**.
* >
* > - The mask style can be updated by configuring [MenuMaskType]{@link MenuMaskType}. However, this API does not
* > support mask presence toggling (that is, switching the mask from non-existent to existent or vice versa) by
* > setting a boolean value.
*
* @param { ComponentContent<T> } content - Content displayed in the menu.
* @param { MenuOptions } options - Style of the menu.<br>**NOTE**<br>1. Updating for the following is not supported:
* **showInSubWindow**, **preview**, **previewAnimationOptions**, **transition**, **onAppear**, **aboutToAppear**,
* **onDisappear**, **aboutToDisappear**, **onWillAppear**, **onDidAppear**, **onWillDisappear**, and
* **onDidDisappear**.<br>2. The mask style can be updated by configuring [MenuMaskType]{@link MenuMaskType}.
* However, this API does not support mask presence toggling (that is, switching the mask from non-existent to
* existent or vice versa) by setting a boolean value.
* @param { boolean } [partialUpdate] - Whether to update the menu in incremental mode. Default value: **false**.<br>
* **NOTE**<br>1. **true**: incremental update, where the specified properties in **options** are updated, and
* other properties stay at their current value.<br>2. **false**: full update, where all properties except those
* specified in **options** are restored to default values.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
updateMenu<T extends Object>(content: ComponentContent<T>, options: MenuOptions, partialUpdate?: boolean): Promise<void>;
/**
* Closes the menu corresponding to the provided content. This API uses a promise to return the result.
*
* @param { ComponentContent<T> } content - Content displayed in the menu.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 103301 - The ComponentContent is incorrect.
* @throws { BusinessError } 103303 - The ComponentContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
closeMenu<T extends Object>(content: ComponentContent<T>): Promise<void>;
}
/**
* Defines the callback type for listening for click events in **UIObserver**.
*
* @param { ClickEvent } event - Information about the click event that triggers the callback.
* @param { FrameNode } [node] - Component bound to the click event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void;
/**
* Defines a callback for pan gesture events.
*
* @param { GestureEvent } event - Information about the gesture event that triggers the callback.
* @param { GestureRecognizer } current - Information about the gesture recognizer that detects the event.
* @param { FrameNode } [node] - Component bound to the gesture event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
declare type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void;
/**
* Defines the callback type for gesture event listeners in **UIObserver**.
*
* @param { GestureEvent } event - Information about the gesture event that triggers the callback.
* @param { FrameNode } [node] - Component bound to the gesture event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void;
/**
* Defines the type can be used for identiting the node, for the string type, it's the inspector id
* set through .[id]{@link CommonMethod#id} attribute, and for the number type, it's the unique ID got from the FrameNode by
* [getUniqueId]{@link FrameNode:FrameNode#getUniqueId} method.
*
* @unionmember { string }
* @unionmember { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type NodeIdentity = string | number;
/**
* Defines the callback type for listening for the rendering state of a specific node in **UIObserver**.
*
* @param { NodeRenderState } state - Information about the gesture event that triggers the callback.
* @param { FrameNode } [node] - Component bound to the gesture event that triggers the listener; returns **null** if
* the component has been released.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type NodeRenderStateChangeCallback = (state: NodeRenderState, node?: FrameNode) => void;
/**
* Defines the callback type for listening for specific gesture trigger information in **UIObserver**.
*
* @param { GestureTriggerInfo } info - Details of the gesture triggered by the interaction.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export declare type GestureListenerCallback = (info: GestureTriggerInfo) => void;
/**
* Defines the PageInfo type.
* The value of routerPageInfo indicates the information of the router page, or undefined if the
* frameNode does not have router page information. And the value of navDestinationInfo indicates
* the information of the navDestination, or undefined if the frameNode does not have navDestination
* information.
*
* @interface PageInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export interface PageInfo {
/**
* the property of router page information.
*
* @type { ?observer.RouterPageInfo }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
routerPageInfo?: observer.RouterPageInfo;
/**
* the property of navDestination information.
*
* @type { ?observer.NavDestinationInfo }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
navDestinationInfo?: observer.NavDestinationInfo;
}
/**
* Defines the callback type for intercepting a back-press event on an overlay.
*
* @returns { boolean } Whether to intercept the back-press event.
* If **true** is returned, the event is intercepted and is prevented from reaching the lower-layer component.
* If **false** is returned, the event is transparently transmitted to the lower-layer component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare type OnOverlayBackPressCallback = () => boolean;
/**
* Provides the parameters used for initializing [OverlayManager]{@link @ohos.arkui.UIContext}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
export interface OverlayManagerOptions {
/**
* Whether to render the overlay root node. The value **true** means to render the overlay root node,
* and **false** means the opposite. The default value is **true**.<br>
* **Atomic service API**: This API can be used in atomic services since API version 15.
*
* @default true
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
renderRootOverlay?: boolean;
/**
* hether to enable the swipe-to-dismiss gesture for **ComponentContent** under **OverlayManager**.
* The value **true** means to enable the swipe-to-dismiss gesture, and **false** means the opposite. Default value: **false**.<br>
* **Atomic service API**: This API can be used in atomic services since API version 19.
*
* @default false
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 20]
* @atomicservice
* @since 19
*/
enableBackPressedEvent?: boolean;
/**
* Callback for intercepting back-press events on an overlay.
*
* **NOTE**
* 1. When this callback is registered and **enableBackPressedEvent** is set to **true**,
* the back-press event will not close the overlay automatically. Instead, the overlay invokes this callback
* to decide whether the event should be propagated to the underlying components.
* 2. Return **true** to intercept the event (the event is consumed and will not be passed
* to lower layers), or **false** to allow the event to propagate through to the components
* below the overlay.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onBackPress?: OnOverlayBackPressCallback;
}
/**
* Options for opening an overlay with order.
*
* @interface OrderOverlayOptions
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export interface OrderOverlayOptions {
/**
* The display order of the overlay.
*
* @type { ?LevelOrder }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
levelOrder?: LevelOrder;
/**
* The display mode of the overlay.
*
* @type { ?LevelMode }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
levelMode?: LevelMode;
/**
* The uniqueId of any node in the router or navigation page.
* The value range is all integers.
*
* @type { ?number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
levelUniqueId?: number;
}
/**
* Provides APIs for listening for UI component behavior changes.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 11.
* >
* > - In the following API examples, you must first use [getUIObserver()]{@link UIContext#getUIObserver} in
* > **UIContext** to obtain a **UIObserver** instance, and then call the APIs using the obtained instance.
* >
* > - UIObserver can only listen for relevant information within the current process and does not support obtaining
* > information in cross-process scenarios<!--Del--> such as [UIExtensionComponent]{@link ui_extension_component}<!--
* > DelEnd-->.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
export class UIObserver {
/**
* Subscribes to status changes of this **NavDestination** component.
*
* @param { 'navDestinationUpdate' } type - Event type.
* The value is fixed at **'navDestinationUpdate'**, which indicates the state change event
* <br>of the **NavDestination** component.
* @param { object } options - ID of the target **NavDestination** component.
* @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current
* <br>state of the **NavDestination** component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
on(type: 'navDestinationUpdate', options: {
navigationId: ResourceStr;
}, callback: Callback<observer.NavDestinationInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
* @param { object } options - The options object.
* @param { Callback<observer.NavDestinationInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
* navigation ID will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
off(type: 'navDestinationUpdate', options: {
navigationId: ResourceStr;
}, callback?: Callback<observer.NavDestinationInfo>): void;
/**
* Subscribes to status changes of this **NavDestination** component.
*
* @param { 'navDestinationUpdate' } type - Event type.
* The value is fixed at **'navDestinationUpdate'**,
* <br>which indicates the state change event of the **NavDestination** component.
* @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return the current state of
* <br>the **NavDestination** component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
on(type: 'navDestinationUpdate', callback: Callback<observer.NavDestinationInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'navDestinationUpdate'} type - The type of event to remove the listener for. Must be 'navDestinationUpdate'.
* @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
* will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
off(type: 'navDestinationUpdate', callback?: Callback<observer.NavDestinationInfo>): void;
/**
* Registers a callback function to be called when the navigation destination is updated.
*
* @param { 'navDestinationUpdateByUniqueId' } type - The type of event to listen for. Must be 'navDestinationUpdateByUniqueId'.
* @param { number } navigationUniqueId - The uniqueId of the navigation.
* @param { Callback<observer.NavDestinationInfo> } callback - The callback function to be called when the navigation destination is updated.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
on(type: 'navDestinationUpdateByUniqueId', navigationUniqueId: number, callback: Callback<observer.NavDestinationInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'navDestinationUpdateByUniqueId'} type - The type of event to remove the listener for. Must be 'navDestinationUpdateByUniqueId'.
* @param { number } navigationUniqueId - The uniqueId of the navigation.
* @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
* will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
off(type: 'navDestinationUpdateByUniqueId', navigationUniqueId: number, callback?: Callback<observer.NavDestinationInfo>): void;
/**
* Registers a callback function to be called when the scroll event start or stop.
*
* @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
* @param { observer.ObserverOptions } options - The options object.
* @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback<observer.ScrollEventInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'scrollEvent' } type - The type of event to remove the listener for. Must be 'scrollEvent'.
* @param { observer.ObserverOptions } options - The options object.
* @param { Callback<observer.ScrollEventInfo> } callback - The callback function to remove. If not provided, all callbacks for the given event type and
* scroll ID will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback<observer.ScrollEventInfo>): void;
/**
* Registers a callback function to be called when the scroll event start or stop.
*
* @param { 'scrollEvent' } type - The type of event to listen for. Must be 'scrollEvent'.
* @param { Callback<observer.ScrollEventInfo> } callback - The callback function to be called when the scroll event start or stop.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'scrollEvent', callback: Callback<observer.ScrollEventInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'scrollEvent'} type - The type of event to remove the listener for. Must be 'scrollEvent'.
* @param { Callback<observer.ScrollEventInfo> } [callback] - The callback function to remove. If not provided, all callbacks for the given event type
* will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'scrollEvent', callback?: Callback<observer.ScrollEventInfo>): void;
/**
* Unsubscribes to state changes of the page in the router.
*
* @param { 'routerPageUpdate' } type - Event type.
* <br>The value is fixed at 'routerPageUpdate', which indicates the state change event of the page in the router.
* @param { Callback<observer.RouterPageInfo> } callback - Callback to be unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
on(type: 'routerPageUpdate', callback: Callback<observer.RouterPageInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'routerPageUpdate' } type - The type of event to remove the listener for. Must be 'routerPageUpdate'.
* @param { Callback<observer.RouterPageInfo> } [callback] - The callback function to remove. If not provided, all
* callbacks for the given event type
* will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
off(type: 'routerPageUpdate', callback?: Callback<observer.RouterPageInfo>): void;
/**
* Listens for screen pixel density changes.
*
* @param { 'densityUpdate' } type - Event type. The value **'densityUpdate'** indicates the pixel density changes of
* the screen.
* @param { Callback<observer.DensityInfo> } callback - Callback used to return the updated screen pixel density using
* a [DensityInfo]{@link @ohos.arkui.observer:uiObserver.DensityInfo} object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'densityUpdate', callback: Callback<observer.DensityInfo>): void;
/**
* Unregisters the listener for screen pixel density changes.
*
* @param { 'densityUpdate' } type - Event type. The value **'densityUpdate'** indicates the pixel density changes of
* the screen.
* @param { Callback<observer.DensityInfo> } [callback] - Target listener to unregister. If no parameter is provided,
* all screen pixel density change listeners for the current [UIContext]{@link @ohos.arkui.UIContext} are removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'densityUpdate', callback?: Callback<observer.DensityInfo>): void;
/**
* Listens for drawing instruction dispatch in each frame.
*
* @param { 'willDraw' } type - Event event. The value **'willDraw'** indicates whether drawing is about to occur.
* @param { Callback<void> } callback - Callback used to return the result.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'willDraw', callback: Callback<void>): void;
/**
* Unregisters the listener for drawing instruction dispatch in each frame.
*
* @param { 'willDraw' } type - Event event. The value **'willDraw'** indicates whether drawing is about to occur.
* @param { Callback<void> } [callback] - Target listener to unregister. If no parameter is provided, all drawing
* instruction dispatch listeners are unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'willDraw', callback?: Callback<void>): void;
/**
* Listens for layout completion status in each frame.
*
* @param { 'didLayout' } type - Event type. The value **'didLayout'** indicates whether the layout has been
* completed.
* @param { Callback<void> } callback - Callback used to return the result.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'didLayout', callback: Callback<void>): void;
/**
* Unregisters the listener for layout completion status in each frame.
*
* @param { 'didLayout' } type - Event type. The value **'didLayout'** indicates whether the layout has been
* completed.
* @param { Callback<void> } [callback] - Target listener to unregister. If no parameter is provided, all layout
* completion listeners are unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'didLayout', callback?: Callback<void>): void;
/**
* Registers a callback function to be called when the navigation switched to a new navDestination.
*
* @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
* @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when
* the navigation switched to a new navDestination.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'navDestinationSwitch', callback: Callback<observer.NavDestinationSwitchInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
* @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'navDestinationSwitch', callback?: Callback<observer.NavDestinationSwitchInfo>): void;
/**
* Registers a callback function to be called when the navigation switched to a new navDestination.
*
* @param { 'navDestinationSwitch' } type - The type of event to listen for. Must be 'navDestinationSwitch'.
* @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
* @param { Callback<observer.NavDestinationSwitchInfo> } callback - The callback function to be called when the
* navigation switched to a new navDestination.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'navDestinationSwitch', observerOptions: observer.NavDestinationSwitchObserverOptions, callback: Callback<observer.NavDestinationSwitchInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'navDestinationSwitch' } type - The type of event to remove the listener for. Must be 'navDestinationSwitch'.
* @param { observer.NavDestinationSwitchObserverOptions } observerOptions - Options.
* @param { Callback<observer.NavDestinationSwitchInfo> } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'navDestinationSwitch', observerOptions: observer.NavDestinationSwitchObserverOptions, callback?: Callback<observer.NavDestinationSwitchInfo>): void;
/**
* Registers a callback function to be called before clickEvent is called.
*
* @param { 'willClick' } type - The type of event to listen for.
* @param { ClickEventListenerCallback } callback - The callback function to be called
* when the clickEvent will be trigger or after.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'willClick', callback: ClickEventListenerCallback): void;
/**
* Removes a callback function to be called before clickEvent is called.
*
* @param { 'willClick' } type - The type of event to remove the listener for.
* @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'willClick', callback?: ClickEventListenerCallback): void;
/**
* Registers a callback function to be called after clickEvent is called.
*
* @param { 'didClick' } type - The type of event to listen for.
* @param { ClickEventListenerCallback } callback - The callback function to be called
* when the clickEvent will be trigger or after.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'didClick', callback: ClickEventListenerCallback): void;
/**
* Removes a callback function to be called after clickEvent is called.
*
* @param { 'didClick' } type - The type of event to remove the listener for.
* @param { ClickEventListenerCallback } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'didClick', callback?: ClickEventListenerCallback): void;
/**
* Registers a callback function to be called before tapGesture is called.
*
* @param { 'willClick' } type - The type of event to listen for.
* @param { GestureEventListenerCallback } callback - The callback function to be called
* when the clickEvent will be trigger or after.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'willClick', callback: GestureEventListenerCallback): void;
/**
* Removes a callback function to be called before tapGesture is called.
*
* @param { 'willClick' } type - The type of event to remove the listener for.
* @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'willClick', callback?: GestureEventListenerCallback): void;
/**
* Registers a callback function to be called after tapGesture is called.
*
* @param { 'didClick' } type - The type of event to listen for.
* @param { GestureEventListenerCallback } callback - The callback function to be called
* when the clickEvent will be trigger or after.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'didClick', callback: GestureEventListenerCallback): void;
/**
* Removes a callback function to be called after tapGesture is called.
*
* @param { 'didClick' } type - The type of event to remove the listener for.
* @param { GestureEventListenerCallback } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'didClick', callback?: GestureEventListenerCallback): void;
/**
* Listens for pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} pre-execution events, executing
* the callback before the actual [onActionStart]{@link PanGestureInterface.onActionStart} event. It works for finger
* swiping, mouse dragging, mouse wheel scrolling, and touchpad movements, but not for screen reader touch mode.
*
* @param { 'beforePanStart' } type - Event type. The value is fixed at **'beforePanStart'**, indicating command
* dispatch before the execution of the pan gesture [onActionStart]{@link PanGestureInterface.onActionStart}
* event. The registered callback is triggered before **onActionStart** is executed.
* @param { PanListenerCallback } callback - Callback used to return the result. It provides
* [GestureEvent]{@link GestureEvent}, [GestureRecognizer]{@link GestureRecognizer}, and the target component's
* [FrameNode]{@link FrameNode} information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
on(type: 'beforePanStart', callback: PanListenerCallback): void;
/**
* Unregisters the listener for pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} pre-execution
* events, canceling callbacks registered via
* [on('beforePanStart')]{@link UIObserver#on(type: 'beforePanStart', callback: PanListenerCallback)}.
*
* @param { 'beforePanStart' } type - Event type. The value is fixed at **'beforePanStart'**, indicating command
* dispatch before the execution of the pan gesture [onActionStart]{@link PanGestureInterface.onActionStart}
* event.
* @param { PanListenerCallback } [callback] - Target listener to unregister. If no parameter is provided, all
* callback listeners for command dispatch before the execution of the pan gesture
* [onActionStart]{@link PanGestureInterface.onActionStart} event will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
off(type: 'beforePanStart', callback?: PanListenerCallback): void;
/**
* Listens for pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} pre-execution events, executing the
* callback before the actual [onActionEnd]{@link PanGestureInterface.onActionEnd} event. It works for finger swiping,
* mouse dragging, mouse wheel scrolling, and touchpad movements, but not for screen reader touch mode.
*
* @param { 'beforePanEnd' } type - Event type. The value is fixed at **'beforePanEnd'**, indicating command dispatch
* before the execution of the pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} event. The
* registered callback is triggered before **onActionEnd** is executed.
* @param { PanListenerCallback } callback - Callback used to return the result. It provides
* [GestureEvent]{@link GestureEvent}, [GestureRecognizer]{@link GestureRecognizer}, and the target component's
* [FrameNode]{@link FrameNode} information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
on(type: 'beforePanEnd', callback: PanListenerCallback): void;
/**
* Unregisters the listener for pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} pre-execution events,
* canceling callbacks registered via
* [on('beforePanEnd')]{@link UIObserver#on(type: 'beforePanEnd', callback: PanListenerCallback)}.
*
* @param { 'beforePanEnd' } type - Event type. The value is fixed at **'beforePanEnd'**, indicating command dispatch
* before the execution of the pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} event.
* @param { PanListenerCallback } [callback] - Target listener to unregister. If no parameter is provided, all
* callback listeners for command dispatch before the execution of the pan gesture
* [onActionEnd]{@link PanGestureInterface.onActionEnd} event will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
off(type: 'beforePanEnd', callback?: PanListenerCallback): void;
/**
* Listens for pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} post-execution events, executing
* the callback after the actual [onActionStart]{@link PanGestureInterface.onActionStart} event. It works for finger
* swiping, mouse dragging, mouse wheel scrolling, and touchpad movements, but not for screen reader touch mode.
*
* @param { 'afterPanStart' } type - Event type. The value is fixed at **'afterPanStart'**, indicating command
* dispatch after the execution of the pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} event.
* The registered callback is triggered after **onActionStart** is executed.
* @param { PanListenerCallback } callback - Callback used to return the result. It provides
* [GestureEvent]{@link GestureEvent}, [GestureRecognizer]{@link GestureRecognizer}, and the target component's
* [FrameNode]{@link FrameNode} information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
on(type: 'afterPanStart', callback: PanListenerCallback): void;
/**
* Unregisters the listener for pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} post-execution
* events, canceling callbacks registered via
* [on('afterPanStart')]{@link UIObserver#on(type: 'afterPanStart', callback: PanListenerCallback)}.
*
* @param { 'afterPanStart' } type - Event type. The value is fixed at **'afterPanStart'**, indicating command
* dispatch after the execution of the pan gesture [onActionStart]{@link PanGestureInterface.onActionStart} event.
* @param { PanListenerCallback } [callback] - Target listener to unregister. If no parameter is provided, all
* callback listeners for command dispatch after the execution of the pan gesture
* [onActionStart]{@link PanGestureInterface.onActionStart} event will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
off(type: 'afterPanStart', callback?: PanListenerCallback): void;
/**
* Listens for pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} post-execution events, executing the
* callback after the actual [onActionEnd]{@link PanGestureInterface.onActionEnd} event. It works for finger swiping,
* mouse dragging, mouse wheel scrolling, and touchpad movements, but not for screen reader touch mode.
*
* @param { 'afterPanEnd' } type - Event type. The value is fixed at **'beforePanEnd'**, indicating command dispatch
* after the execution of the pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} event. The
* registered callback is triggered after **onActionEnd** is executed.
* @param { PanListenerCallback } callback - Callback used to return the result. It provides
* [GestureEvent]{@link GestureEvent}, [GestureRecognizer]{@link GestureRecognizer}, and the target component's
* [FrameNode]{@link FrameNode} information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
on(type: 'afterPanEnd', callback: PanListenerCallback): void;
/**
* Unregisters the listener for pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} post-execution
* events, canceling callbacks registered via
* [on('afterPanEnd')]{@link UIObserver#on(type: 'afterPanEnd', callback: PanListenerCallback)}.
*
* @param { 'afterPanEnd' } type - Event type. The value is fixed at **'afterPanEnd'**, indicating command dispatch
* after the execution of the pan gesture [onActionEnd]{@link PanGestureInterface.onActionEnd} event.
* @param { PanListenerCallback } [callback] - Target listener to unregister. If no parameter is provided, all
* callback listeners for command dispatch after the execution of the pan gesture
* [onActionEnd]{@link PanGestureInterface.onActionEnd} event will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 19
*/
off(type: 'afterPanEnd', callback?: PanListenerCallback): void;
/**
* Registers a callback function to be called when the tabContent is showed or hidden.
*
* @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
* @param { observer.ObserverOptions } options - The options object.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
* when the tabContent show or hide.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback<observer.TabContentInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'tabContentUpdate' } type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
* @param { observer.ObserverOptions } options - The options object.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
* all callbacks for the given event type and Tabs ID will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback<observer.TabContentInfo>): void;
/**
* Registers a callback function to be called when the tabContent is showed or hidden.
*
* @param { 'tabContentUpdate' } type - The type of event to listen for. Must be 'tabContentUpdate'.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
* when the tabContent is showed or hidden.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
on(type: 'tabContentUpdate', callback: Callback<observer.TabContentInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'tabContentUpdate'} type - The type of event to remove the listener for. Must be 'tabContentUpdate'.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to remove. If not provided,
* all callbacks for the given event type and Tabs ID will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
off(type: 'tabContentUpdate', callback?: Callback<observer.TabContentInfo>): void;
/**
* Registers a callback function to be called when the tabContent is showed or hidden.
* Include the cases when the first tab content shows and when the tab changes current index.
*
* @param { 'tabChange' } type - The type of event to listen for. Must be 'tabChange'.
* @param { observer.ObserverOptions } config - The options object. Includes the observed component id.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
* when when the tabContent is showed or hidden.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
on(type: 'tabChange', config: observer.ObserverOptions, callback: Callback<observer.TabContentInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'tabChange' } type - The type of event to remove the listener for. Must be 'tabChange'.
* @param { observer.ObserverOptions } config - The config object. Includes the observed component id.
* @param { Callback<observer.TabContentInfo> } [callback] - The callback function to remove.
* If not provided, all callbacks for the given event type and Tabs ID will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
off(type: 'tabChange', config: observer.ObserverOptions, callback?: Callback<observer.TabContentInfo>): void;
/**
* Registers a callback function to be called when the tabContent is showed or hidden.
* Include the cases when the first tab content shows and when the tab changes current index.
*
* @param { 'tabChange' } type - The type of event to listen for. Must be 'tabChange'.
* @param { Callback<observer.TabContentInfo> } callback - The callback function to be called
* when the tabContent is showed or hidden.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
on(type: 'tabChange', callback: Callback<observer.TabContentInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'tabChange' } type - The type of event to remove the listener for. Must be 'tabChange'.
* @param { Callback<observer.TabContentInfo> } [callback] - The callback function to remove.
* If not provided, all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
off(type: 'tabChange', callback?: Callback<observer.TabContentInfo>): void;
/**
* Registers a callback for window size layout breakpoint changes. This enables adaptive UI layout adjustments based
* on window size variations. This API uses an asynchronous callback to return the result.
*
* @param { 'windowSizeLayoutBreakpointChange' } type - Event type. The value is fixed at
* **'windowSizeLayoutBreakpointChange'**, indicating window size layout breakpoint changes.
* @param { Callback<observer.WindowSizeLayoutBreakpointInfo> } callback - Callback used to return the result. It
* provides window width and height layout breakpoint enumerations using a **WindowSizeLayoutBreakpointinfo**
* object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 22
*/
on(type: 'windowSizeLayoutBreakpointChange', callback: Callback<observer.WindowSizeLayoutBreakpointInfo>): void;
/**
* Unregisters previously registered window size layout breakpoint change listeners. If no callback is specified, all
* listeners for the current UI context are removed. This API uses an asynchronous callback to return the result.
*
* @param { 'windowSizeLayoutBreakpointChange' } type - Event type. The value is fixed at
* **'windowSizeLayoutBreakpointChange'**, indicating window size layout breakpoint changes.
* @param { Callback<observer.WindowSizeLayoutBreakpointInfo> } [callback] - Target listener to unregister. If no
* parameter is provided, all window size layout breakpoint change listeners for the current
* [UIContext]{@link @ohos.arkui.UIContext} are removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 22
*/
off(type: 'windowSizeLayoutBreakpointChange', callback?: Callback<observer.WindowSizeLayoutBreakpointInfo>): void;
/**
* Registers a callback to be invoked when the rendering state of a specific node changes. This callback is executed
* immediately once upon successful registration.
*
* Be mindful of node quantity limitations. For performance reasons, registering too many nodes within a single UI
* instance will throw an exception.
*
* Typically, a **RENDER_OUT** notification is received when a component moves off-screen. However, in certain
* scenarios, a **RENDER_OUT** notification might not be triggered even if a component has moved off-screen. For
* example, components with caching capabilities like [Swiper]{@link swiper} will not trigger **RENDER_OUT**
* notifications even when the **isShown** parameter in the
* [cachedCount]{@link SwiperAttribute#cachedCount(count: number, isShown: boolean)} attribute is set to **true**.
*
* @param { 'nodeRenderState' } type - Event type. The value is fixed at **'nodeRenderState'**, indicating rendering
* state changes.
* @param { NodeIdentity } nodeIdentity - Node ID.
* @param { NodeRenderStateChangeCallback } callback - Callback used to return the result. It provides the
* [NodeRenderState]{@link NodeRenderState} of the node rendering state change event and the component's
* [FrameNode]{@link FrameNode}.
* @throws { BusinessError } 161001 - The count of nodes monitoring render state is over the limitation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
on(type: 'nodeRenderState', nodeIdentity: NodeIdentity, callback: NodeRenderStateChangeCallback): void;
/**
* Unregisters the callback for listening for node rendering state changes.
*
* @param { 'nodeRenderState' } type - Event type. The value is fixed at **'nodeRenderState'**.
* @param { NodeIdentity } nodeIdentity - Node ID.
* @param { NodeRenderStateChangeCallback } [callback] - Target listener to unregister. If no parameter is provided,
* all node rendering state change listeners are unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
off(type: 'nodeRenderState', nodeIdentity: NodeIdentity, callback?: NodeRenderStateChangeCallback): void;
/**
* Registers a callback function to be called when text field's content is changed.
*
* @param { 'textChange' } type - The type of event to listen for. Must be 'textChange'.
* @param { Callback<observer.TextChangeEventInfo> } callback - The callback function to be called when
* text field's content is changed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
on(type: 'textChange', callback: Callback<observer.TextChangeEventInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'textChange' } type - The type of event to remove the listener for. Must be 'textChange'.
* @param { Callback<observer.TextChangeEventInfo> } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
off(type: 'textChange', callback?: Callback<observer.TextChangeEventInfo>): void;
/**
* Registers a callback function to be called when text field's content is changed.
*
* @param { 'textChange' } type - The type of event to listen for. Must be 'textChange'.
* @param { observer.ObserverOptions } identity - Identity options.
* @param { Callback<observer.TextChangeEventInfo> } callback - The callback function to be called when the
* text field's content is changed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
on(type: 'textChange', identity: observer.ObserverOptions, callback: Callback<observer.TextChangeEventInfo>): void;
/**
* Removes a callback function that was previously registered with `on()`.
*
* @param { 'textChange' } type - The type of event to remove the listener for. Must be 'textChange'.
* @param { observer.ObserverOptions } identity - Identity options.
* @param { Callback<observer.TextChangeEventInfo> } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
off(type: 'textChange', identity: observer.ObserverOptions, callback?: Callback<observer.TextChangeEventInfo>): void;
/**
* Registers a callback to listen for gesture triggering information.
*
* @param { GestureListenerType } type - Type of gesture to listen for.
* @param { GestureObserverConfigs } option - Configuration options for binding the global listener.
* @param { GestureListenerCallback } callback - Callback triggered when the gesture state updates.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
addGlobalGestureListener(type: GestureListenerType, option: GestureObserverConfigs, callback: GestureListenerCallback): void;
/**
* Unregisters the specified global gesture listener.
*
* @param { GestureListenerType } type - Event type.
* @param { GestureListenerCallback } [callback] - Callback to unregister. If this parameter is not specified, this
* API unregisters all callbacks for this gesture type.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
removeGlobalGestureListener(type: GestureListenerType, callback?: GestureListenerCallback): void;
/**
* Listens for content switching events of the **Swiper** component. This API uses an asynchronous callback to return
* the result.
*
* @param { Callback<SwiperContentInfo> } callback - Callback used to return the result. It provides the **Swiper**
* content switching information using a **SwiperContentInfo** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
onSwiperContentUpdate(callback: Callback<SwiperContentInfo>): void;
/**
* Unregister the listener for content switching events of the **Swiper** component.
*
* @param { Callback<SwiperContentInfo> } [callback] - Target listener to unregister. If no parameter is provided, all
* listeners for the **Swiper** component are unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
offSwiperContentUpdate(callback?: Callback<SwiperContentInfo>): void;
/**
* Listens for content switching events of a specific **Swiper** component identified by its ID. This API uses an
* asynchronous callback to return the result.
*
* @param { observer.ObserverOptions } config - Information about the target **Swiper** component.
* @param { Callback<SwiperContentInfo> } callback - Callback used to return the result. It provides the **Swiper**
* content switching information using a **SwiperContentInfo** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
onSwiperContentUpdate(config: observer.ObserverOptions, callback: Callback<SwiperContentInfo>): void;
/**
* Unregister the listener for content switching events of a specific **Swiper** component identified by its ID.
*
* @param { observer.ObserverOptions } config - Information about the target **Swiper** component.
* @param { Callback<SwiperContentInfo> } [callback] - Target listener to unregister. If no parameter is provided, all
* listeners for the **Swiper** component are unregistered.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
offSwiperContentUpdate(config: observer.ObserverOptions, callback?: Callback<SwiperContentInfo>): void;
/**
* Registers a callback that is triggered when the size of the visible router page changes. This API uses an
* asynchronous callback to return the result.
*
* @param { Callback<observer.RouterPageInfo> } callback - Callback used to return the information about the router
* page.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
onRouterPageSizeChange(callback: Callback<observer.RouterPageInfo>): void;
/**
* Removes the listener callback registered using the **onRouterPageSizeChange** API. This API uses an asynchronous
* callback to return the result.
*
* @param { Callback<observer.RouterPageInfo> } [callback] - Callback to be removed. If no parameter is passed, all
* callbacks are removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
offRouterPageSizeChange(callback?: Callback<observer.RouterPageInfo>): void;
/**
* Registers a callback that is triggered when the size of the visible navigation destination changes. This API uses
* an asynchronous callback to return the result.
*
* @param { Callback<observer.NavDestinationInfo> } callback - Callback used to return navigation destination
* information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
onNavDestinationSizeChange(callback: Callback<observer.NavDestinationInfo>): void;
/**
* Removes the listener callback registered using the **onNavDestinationSizeChange** API. This API uses an
* asynchronous callback to return the result.
*
* @param { Callback<observer.NavDestinationInfo> } [callback] - Callback to be removed. If no parameter is passed,
* all callbacks are removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
offNavDestinationSizeChange(callback?: Callback<observer.NavDestinationInfo>): void;
/**
* Removes the listener callback registered using the **onNavDestinationSizeChangeByUniqueId** API. This API uses an
* asynchronous callback to return the result.
*
* @param { number } navigationUniqueId - Unique ID of the **Navigation** component to which the **NavDestination**
* component to be listened belongs, which can be obtained through
* [queryNavigationInfo]{@link BaseCustomComponent#queryNavigationInfo}.
* @param { Callback<observer.NavDestinationInfo> } callback - Callback to be removed. If no parameter is passed,
* all callbacks with the same **navigationUniqueId** setting are removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
onNavDestinationSizeChangeByUniqueId(navigationUniqueId: number, callback: Callback<observer.NavDestinationInfo>): void;
/**
* Removes a callback function that was previously registered with 'onNavDestinationSizeChangeByUniqueId()'.
*
* @param { number } navigationUniqueId - The uniqueId of the Navigation to which NavDestination belongs.
* @param { Callback<observer.NavDestinationInfo> } [callback] - The callback function to remove. If not provided,
* all callbacks for the given event type will be removed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
offNavDestinationSizeChangeByUniqueId(navigationUniqueId: number, callback?: Callback<observer.NavDestinationInfo>): void;
}
/**
* The information returned when the Swiper content changes.
*
* @interface SwiperContentInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
export interface SwiperContentInfo {
/**
* Swiper id, set by the 'id' attribute.
*
* @type { string }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
id: string;
/**
* Swiper uniqueId, generated by the system.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
uniqueId: number;
/**
* The array of changed SwiperItemInfo.
*
* @type { Array<SwiperItemInfo> }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
swiperItemInfos: Array<SwiperItemInfo>;
}
/**
* The information of changed SwiperItem.
*
* @interface SwiperContentInfo
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
export interface SwiperItemInfo {
/**
* The uniqueId of SwiperItem.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
uniqueId: number;
/**
* The index of SwiperItem.
*
* @type { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
index: number;
}
/**
* Provides API for obtaining the coordinates and size of the drawing area of a component.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 10.
* >
* > - In the following API examples, you must first use [getComponentUtils()]{@link UIContext#getComponentUtils} in
* > **UIContext** to obtain a **ComponentUtils** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class ComponentUtils {
/**
* Obtains the size, position, translation, scaling, rotation, and affine matrix information of the specified
* component.
*
* > **NOTE**
* >
* > This API should be called after the target component's layout is complete to obtain its size information. It is
* > recommended that you use this API within [onAppear]{@link CommonMethod#onAppear}.
*
* @param { string } id - Unique component ID.
* @returns { componentUtils.ComponentInfo } Size, position, translation, scaling, rotation, and affine matrix
* information of the component.
* @throws { BusinessError } 100001 - UI execution context not found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 10
*/
getRectangleById(id: string): componentUtils.ComponentInfo;
}
/**
* Provides the capability to draw overlays.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 12.
* >
* > - In the following API examples, you must first use [getOverlayManager()]{@link UIContext#getOverlayManager} in
* > **UIContext** to obtain an **OverlayManager** instance, and then call the APIs using the obtained instance.
* >
* > - The nodes on **OverlayManager** are above the page level, but below such components as created through
* > **Dialog**, **Popup**, **Menu**, **BindSheet**, **BindContentCover**, and **Toast**.
* >
* > - The drawing method inside and outside the safe area of nodes on **OverlayManager** is consistent with that of the
* > page, and the keyboard avoidance method is also the same as that of the page.
* >
* > - For properties related to **OverlayManager**, you are advised to use AppStorage for global storage across the
* > application to prevent changes in property values when switching pages, which could lead to service errors.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export class OverlayManager {
/**
* Adds a specified **ComponentContent** node to the **OverlayManager**.
*
* @param { ComponentContent } content - Content to add to the target node on the **OverlayManager**.<br>
* **NOTE**<br>
* By default, the new node is centered on the page and stacked according to its stacking level.
* @param { number } [ index ] - Stacking level of the new node on the **OverlayManager**.<br>
* **NOTE**<br>
* If the value is greater than or equal to 0, a larger value means a higher layer for the **ComponentContent** node.
* If multiple **ComponentContent** nodes have the same index, the later-added ones appear above earlier ones.<br>
* If the value is less than 0, **null**, or **undefined**, the **ComponentContent** node is added at the highest level by default.<br>
* If the same **ComponentContent** node is added multiple times, only the last added one is retained.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
addComponentContent(content: ComponentContent, index?: number): void;
/**
* Creates an overlay node with the specified display order.
*
* This API allows you to define the stacking order of the nodes when they are created.
*
* @param { ComponentContent } content - Content to add to the target node on the **OverlayManager**.
* <br>**NOTE**<br>
* By default, the new node is centered on the page and stacked according to its stacking level.
* @param { LevelOrder } [ levelOrder ] - Display order of the new floating layer node.<br>
* **NOTE**<br>
* - Default value: **LevelOrder.clamp(0)**
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
addComponentContentWithOrder(content: ComponentContent, levelOrder?: LevelOrder): void;
/**
* Removes a specified node from the **OverlayManager**.
*
* @param { ComponentContent } content - Content to remove from the **OverlayManager**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
removeComponentContent(content: ComponentContent): void;
/**
* Shows a specified **ComponentContent** node on the **OverlayManager**.
*
* @param { ComponentContent } content - Content to show on the **OverlayManager**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
showComponentContent(content: ComponentContent): void;
/**
* Hides a specified **ComponentContent** node on the **OverlayManager**.
*
* @param { ComponentContent } content - Content to hide on the **OverlayManager**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
hideComponentContent(content: ComponentContent): void;
/**
* Shows all **ComponentContent** nodes on the **OverlayManager**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
showAllComponentContents(): void;
/**
* Hides all **ComponentContent** nodes on the **OverlayManager**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
hideAllComponentContents(): void;
/**
* Opens an overlay with the specified ComponentContent and options.
*
* @param { ComponentContent } content - Content to add to the new node on the OverlayManager.
* <p><strong>NOTE</strong>:
* <br>By default, the new node is centered on the page and stacked according to its stacking level.
* </p>
*
* @param { OrderOverlayOptions } [ options ] - Options for the overlay.
* @returns { Promise<void> } the promise returned by the function.
* @throws { BusinessError } 103307 - The overlay cannot be opened due to the system pop-up window.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
openOrderOverlay(content: ComponentContent, options?: OrderOverlayOptions): Promise<void>;
}
/**
* Provides the capability of displaying and hiding of the magnifier. The magnifier enlarges the component content for
* you to view the component details.
*
* > **NOTE**
* >
* > - In the following API examples, you must first use [getMagnifier()]{@link UIContext.getMagnifier} in **UIContext**
* > to obtain a **Magnifier** instance, and then call the APIs using the obtained instance.
* >
* > - The magnifier capability of this class does not affect that of text components. For text components, you are
* > advised to use the built-in magnifier capability.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
export class Magnifier {
/**
* Binds the magnifier to the component with the specified ID.
*
* > **NOTE**
* >
* > Obtain the Magnifier instance by using the getMagnifier() method in UIContext.
*
* @param { string } id - Component ID, which can be set through the universal attribute [id]{@link CommonMethod#id}
* or [key]{@link CommonMethod#key}. If the component ID is an empty string or no component is found based on the
* specified ID, the magnifier is not displayed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
bind(id: string): void;
/**
* Sets the position of the component content displayed by the magnifier relative to the upper left corner of the
* component. After the setting is successful, the magnifier displays the content centered at the coordinate point.
*
* > **NOTE**
* >
* > When the content of the component bound to the magnifier changes, the magnifier does not automatically update the
* > displayed content. You need to call the **show** API to update the displayed content of the magnifier.
*
* @param { number } x - Horizontal coordinate of the component content displayed by the magnifier, relative to the
* component itself, in vp. If the coordinate value is greater than the component width or less than 0, the
* magnifier is not displayed. If the value is **undefined**, the current display status of the magnifier is
* retained.
* @param { number } y - Vertical coordinate of the component content displayed by the magnifier, relative to the
* component itself, in vp. If the coordinate value is greater than the component height or less than 0, the
* magnifier is not displayed. If the value is **undefined**, the current display status of the magnifier is
* retained.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
show(x: number, y: number): void;
/**
* Unbinds the magnifier from the current component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
unbind(): void;
}
/**
* interface AtomicServiceBar
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
export interface AtomicServiceBar {
/**
* Set the visibility of the bar, except the icon.
*
* @param { boolean } visible - whether this bar is visible.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 11
*/
setVisible(visible: boolean): void;
/**
* Set the background color of the bar.
*
* @param { Nullable<Color | number | string> } color - the color to set, undefined indicates using default.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
setBackgroundColor(color: Nullable<Color | number | string>): void;
/**
* Set the title of the bar.
*
* @param { string } content - the content of the bar.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
setTitleContent(content: string): void;
/**
* Set the font style of the bar's title.
*
* @param { FontStyle } font - the font style of the bar's title.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
setTitleFontStyle(font: FontStyle): void;
/**
* Set the color of the icon on the bar.
*
* @param { Nullable<Color | number | string> } color - the color to set to icon, undefined indicates using default.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice [since 12]
* @since 11
*/
setIconColor(color: Nullable<Color | number | string>): void;
/**
* Get size and position of the bar.
*
* @returns { Frame } The size and position of bar in vp relative to window.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
getBarRect(): Frame;
/**
* When size and position of the bar changed, callback will be called.
*
* @param { Callback<Frame> } callback - Callback that param contains the Frame.
* The parameters of the callback function cannot be undefined or null.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
onBarRectChange(callback: Callback<Frame>): void;
}
/**
* Defines the information provided when a specific gesture callback is triggered.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export interface GestureTriggerInfo {
/**
* Gesture event object.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
event: GestureEvent;
/**
* Gesture recognizer object. Detailed gesture information can be obtained from this object. However, avoid retaining
* this object locally as it may become invalid after the node is released.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
current: GestureRecognizer;
/**
* Phase of the gesture action callback.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
currentPhase: GestureActionPhase;
/**
* Node that triggers the gesture. The default value is **null**, indicating that no specific node triggers the
* gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
node?: FrameNode;
}
/**
* Specifies the gesture callback phases to listen for (passing an empty array will be ineffective). Notifications are
* sent only when the gesture triggers the specified phases.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export interface GestureObserverConfigs {
/**
* Gesture event object.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
actionPhases: Array<GestureActionPhase>;
}
/**
* Represents a dynamic synchronization scene.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
export class DynamicSyncScene {
/**
* Sets the FrameRateRange of the DynamicSyncScene.
*
* @param { ExpectedFrameRateRange } range - The range of frameRate.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
setFrameRateRange(range: ExpectedFrameRateRange): void;
/**
* Gets the FrameRateRange of the DynamicSyncScene.
*
* @returns { ExpectedFrameRateRange } The range of frameRate.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
getFrameRateRange(): ExpectedFrameRateRange;
}
/**
* Provides frame rate configuration APIs for the **Swiper** component.
*
* > **NOTE**
*
* > - The initial APIs of this class are supported since API version 12.
* >
* > - **SwiperDynamicSyncScene** inherits from [DynamicSyncScene]{@link @ohos.arkui.UIContext} and represents the
* > dynamic sync scene of the **Swiper** component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
export class SwiperDynamicSyncScene extends DynamicSyncScene {
/**
* Dynamic sync scene of the **Swiper** component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
readonly type: SwiperDynamicSyncSceneType;
}
/**
* Represents a dynamic synchronization scene of Marquee.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 14
*/
export class MarqueeDynamicSyncScene extends DynamicSyncScene {
/**
* Type of the MarqueeDynamicSyncSceneType.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 14
*/
readonly type: MarqueeDynamicSyncSceneType;
}
/**
* Provides APIs for initiating drag actions. When receiving a gesture event, such as a touch or long-press event, an
* application can initiate a drag action and carry drag information therein.
*
* > **NOTE**
* >
* > In the following API examples, you must first use [getDragController()]{@link UIContext#getDragController} in
* > **UIContext** to obtain a **DragController** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
export class DragController {
/**
* Initiates a drag action, with the object to be dragged and the drag information passed in. This API uses a callback
* to return the drag event result.
*
* @param { CustomBuilder | DragItemInfo } custom - Object to be dragged.<br> **NOTE**<br>The global builder is not
* supported. If the [Image]{@link image} component is used in the builder, enable synchronous loading, that is,
* set the [syncLoad]{@link ImageAttribute#syncLoad} attribute of the component to **true**. The builder is used
* only to generate the image displayed during the current dragging. If the root component of the builder has zero
* width or height, it will cause failure in drag image generation, which in turn breaks the entire drag
* operation. Changes to the builder, if any, apply to the next dragging, but not to the current dragging.
* @param { dragController.DragInfo } dragInfo - Drag information.
* @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback used to return the result.<br>
* - **event**: drag event information that includes only the drag result.<br>- **extraParams**: extra
* information about the drag event. [since 11 - 11]
* @param { AsyncCallback<dragController.DragEventParam> } callback - Callback used to return the result.<br>-
* **event**: drag event information that includes only the drag result.<br>- **extraParams**: extra information
* about the drag event. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, callback: AsyncCallback<dragController.DragEventParam>): void;
/**
* Initiates a drag action, with the object to be dragged and the drag information passed in. This API uses a promise
* to return the drag event result.
*
* @param { CustomBuilder | DragItemInfo } custom - Object to be dragged.
* @param { dragController.DragInfo } dragInfo - Drag information.
* @returns { Promise<{ event: DragEvent, extraParams: string }> } Callback used to return the result.
* <br>- **event**: drag event information that includes only the drag result.
* <br>- **extraParams**: extra information about the drag event. [since 11 - 11]
* @returns { Promise<dragController.DragEventParam> } A Promise with the drag event information. [since 12]
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo): Promise<dragController.DragEventParam>;
/**
* Creates a drag action object for initiating drag and drop operations. You need to explicitly specify one or more
* drag previews, the drag data, and the drag handle point. If a drag operation initiated by an existing drag action
* object is not completed, no new object can be created, and calling the API will throw an exception. After the
* lifecycle of the drag action object ends, the callback functions registered on this object become invalid.
* Therefore, it is necessary to hold this object within a longer scope and replace the old value with a new object
* returned by **createDragAction** before each drag initiation.
*
* > **NOTE**
* >
* > For optimal drag and drop performance, limit the number of drag previews.
*
* @param { Array<CustomBuilder | DragItemInfo> } customArray - Object to be dragged.
* @param { dragController.DragInfo } dragInfo - Drag information.
* @returns { dragController.DragAction } **DragAction** object, which is used to subscribe to drag state changes and
* start the drag service.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Internal handling failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
createDragAction(customArray: Array<CustomBuilder | DragItemInfo>, dragInfo: dragController.DragInfo): dragController.DragAction;
/**
* Obtains the **DragPreview** object, which represents the preview displayed during a drag operation.
*
* @returns { dragController.DragPreview } **DragPreview** object. It provides the API for setting the preview style.
* It does not work in the **OnDrop** and **OnDragEnd** callbacks.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
getDragPreview(): dragController.DragPreview;
/**
* Sets whether the **onDragLeave** callback of the parent component is triggered when an item is dragged from the
* parent to the child component.
*
* @param { boolean } enable - Whether the **onDragLeave** callback of the parent component is triggered when an item
* is dragged from the parent to the child component. The value **true** means the **onDragLeave** callback of the
* parent component is triggered, and **false** means the opposite.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
setDragEventStrictReportingEnabled(enable: boolean): void;
/**
* Controls whether the application can initiate a drag operation.
*
* @param { dragController.DragStartRequestStatus } requestStatus - Whether the application can initiate a drag
* operation.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 18
*/
notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void;
/**
* Cancels the data loading initiated by the [startDataLoading]{@link DragEvent.startDataLoading}
* API. This API can be called only after the drag is released.
*
* @param { string } key - Identifier for the drag data. It is used to distinguish between different drag operations.
* The key can be obtained through the **startDataLoading** API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 190004 - Operation failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 15
*/
cancelDataLoading(key: string): void;
/**
* Specifies whether to enable the display of a disallowed badge when dragged content is incompatible with a component
* 's configured [allowDrop]{@link CommonMethod#allowDrop} types. When a component can accept or process dragged data
* or returns **DragBehavior.COPY** to indicate copy mode processing, the drag preview shows a plus icon with data
* count badge. When the component returns **DragBehavior.MOVE** to indicate cut mode processing, only the data count
* badge appears. When this feature is enabled, the system automatically displays a disallowed badge during drag
* operations if the dragged data types are incompatible with the target component's allowed drop types. This API
* currently does not support [UIExtension]{@link @ohos.arkui.uiExtension:uiExtension}.
*
* @param { boolean } enabled - Whether to enable the display of a disallowed badge when dragged content is
* incompatible with a component's configured [allowDrop]{@link CommonMethod#allowDrop} types. The value **true**
* means to enable the display of a disallowed badge, and **false** means the opposite. The default value is
* **false**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
enableDropDisallowedBadge(enabled: boolean): void;
}
/**
* Provides APIs for measuring text metrics, such as text height and width.
*
* > **NOTE**
* >
* > - In the following API examples, you must first use [getMeasureUtils()]{@link UIContext.getMeasureUtils} in
* > **UIContext** to obtain a **MeasureUtils** instance, and then call the APIs using the obtained instance.
* >
* > - To perform more complex text measurements, use the [Paragraph]{@link @ohos.graphics.text:text.Paragraph} API.
* >
* > - Avoid using
* > [ApplicationContext.setFontSizeScale]{@link ./application/ApplicationContext:ApplicationContext.setFontSizeScale}
* > during text measurement API calls. To ensure timing correctness and the accuracy of measurement results, manually
* > listen for font scale changes.
* >
* > - For measuring text after truncation, direct use of the string length for truncation may lead to inaccuracies.
* > This is because certain Unicode characters (for example, emojis) have code points with a length greater than 1, and
* > truncating by string length can split these multi-code-point characters, resulting in incorrect text display or
* > measurement errors. As such, you are advised to perform iterative truncation processing based on Unicode code
* > points. For details, see [Example 2 in measureTextSize]{@link MeasureUtils.measureTextSize}.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export class MeasureUtils {
/**
* Measures the single-line display width of the specified text. For multi-line text (separated by newline characters
* **\n**), this API returns the width of the longest line.
*
* > **NOTE**
* >
* > **measureText** always measures single-line text width. Layout constraints in **options** (**constraintWidth**,
* > **maxLines**, and more) do not affect results. For layout-constrained width measurement, use
* > [measureTextSize]{@link MeasureUtils.measureTextSize}.
*
* @param { MeasureOptions } options - Options of the target text.
* @returns { number } Text width.
* <br>**NOTE**
* <br>Floating-point results are rounded up.
* <br>Unit: px.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
measureText(options: MeasureOptions): number;
/**
* Measures the width and height of the given single-line text.
*
* > **NOTE**
* >
* > When calling this MPI, do not use [ApplicationContext.setFontSizeScale]{@link
* > ./application/ApplicationContext:ApplicationContext.setFontSizeScale} to set the font size scaling ratio. To
* > ensure the correctness of the time sequence, you are advised to monitor the font scaling changes by yourself to
* > ensure the accuracy of the calculation result.
*
* @param { MeasureOptions } options - Options of the target text.
* @returns { SizeOptions } Width and height of the text.
* <br>**NOTE**
* <br>If **constraintWidth** is not specified, the floating-point value of the text width will be rounded up.
* <br>The return values for text width and height are both in px.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
measureTextSize(options: MeasureOptions): SizeOptions;
/**
* Converts a styled string into an array of corresponding [Paragraph]{@link @ohos.graphics.text:text.Paragraph}
* objects based on text layout options.
*
* @param { StyledString } styledString - Styled string to be converted.
* @param { TextLayoutOptions } [options] - Text layout options.
* @returns { Array<Paragraph> } Array of [Paragraph]{@link @ohos.graphics.text:text.Paragraph} objects.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @since 20
*/
getParagraphs(styledString: StyledString, options?: TextLayoutOptions): Array<Paragraph>;
}
/**
* Provides capabilities to control focus, including features such as clearing, moving, and activating focus.
*
* > **NOTE**
* >
* > In the following API examples, you must first use [getFocusController()]{@link UIContext#getFocusController} in
* > **UIContext** to obtain a **FocusController** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
export class FocusController {
/**
* Clears the focus and forcibly moves the focus to the root container node of the page, causing other nodes in the
* focus chain to lose focus.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
clearFocus(): void;
/**
* Transfers focus to a component node by the component ID, which is effective immediately.
*
* @param { string } key - [Component ID]{@link common} of the target node.
* @throws { BusinessError } 150001 - the component cannot be focused.
* @throws { BusinessError } 150002 - This component has an unfocusable ancestor.
* @throws { BusinessError } 150003 - the component is not on tree or does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
requestFocus(key: string): void;
/**
* Sets the [focus activation state](docroot://ui/arkts-common-events-focus-event.md) of this page.
*
* @param { boolean } isActive - Whether to enter or exit the focus activation state.<br>The value **true** means to
* enter the focus activation state, and **false** means to exit the focus activation state.
* @param { boolean } [autoInactive] - Logic for exiting the focus activation state.<br>The value **true** means the
* focus activation state will be exited automatically when touch or mouse events are triggered, and **false**
* means the state is controlled solely by API calls.<br>Default value: **true**
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 14
*/
activate(isActive: boolean, autoInactive?: boolean): void;
/**
* Obtains the focus activation state of the UI instance.
*
* For details about the focus activation state, see
* [Basic Concepts](docroot://ui/arkts-common-events-focus-event.md#basic-concepts).
*
* @returns { boolean } Focus activation state of the UI instance. The value **true** means that the instance has
* entered the focus activation state, and **false** means that the instance has exited the focus activation
* state.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
isActive(): boolean;
/**
* Sets whether the new page automatically obtains focus during page switching.
*
* @param { boolean } isAutoFocusTransfer - Whether the new page automatically obtains focus during page switching
* using navigation components or APIs, such as [Router]{@link @ohos.router:router},
* [Navigation]{@link navigation}, [Menu]{@link menu}, [Dialog]{@link @ohos.arkui.advanced.Dialog}, and
* [Popup]{@link @ohos.arkui.advanced.Popup}. The value **true** means the new page automatically obtains focus,
* and **false** means the opposite. Default value: **true**.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 14
*/
setAutoFocusTransfer(isAutoFocusTransfer: boolean): void;
/**
* Sets the mode for processing key events.
*
* @param { KeyProcessingMode } mode - Mode for processing key events.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
setKeyProcessingMode(mode: KeyProcessingMode): void;
}
/**
* Defines the pointer style.
*
* @syscap SystemCapability.MultimodalInput.Input.Pointer
* @atomicservice
* @since 12
*/
export type PointerStyle = pointer.PointerStyle;
/**
* Provides the capability to set cursor styles.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 12.
* >
* > - In the following API examples, you must first use [getCursorController()]{@link UIContext#getCursorController} in
* > **UIContext** to obtain a **CursorController** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export class CursorController {
/**
* Restores the default cursor style.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
restoreDefault(): void;
/**
* Sets the cursor style.
*
* > **NOTE**
* >
* > This API does not take effect immediately. The cursor style will be updated in the next rendering frame.
*
* @param { PointerStyle } value - Pointer style.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
setCursor(value: PointerStyle): void;
/**
* Sets the custom cursor style.
*
* > **NOTE**
* >
* > This API does not take effect immediately. The cursor style will be updated in the next rendering frame.
*
* @param { image.PixelMap } value - Pixel map of the custom mouse cursor style.
* @param { number } [focusX] - X coordinate of the custom cursor's hotspot. The hotspot refers to the actual location
* where the click occurs.<br>Default value: **0**<br>Unit: px<br>Value range: [0, +∞)
* @param { number } [focusY] - Y coordinate of the custom cursor's hotspot.<br>Default value: **0**<br>Unit: px<br>Value
* range: [0, +∞)
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
setCustomCursor(value: image.PixelMap, focusX?: number, focusY?: number): void;
}
/**
* Provides the capability to control the closing of context menus.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 12.
* >
* > - In the following API examples, you must first use
* > [getContextMenuController()]{@link UIContext#getContextMenuController} in **UIContext** to obtain a
* > **ContextMenuController** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
export declare class ContextMenuController {
/**
* Closes this context menu.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
close(): void;
}
/**
* Implements the API for setting the task that needs to be executed during the next frame rendering.
*
* > **NOTE**
* >
* > - The following APIs must be used in conjunction with [postFrameCallback]{@link UIContext#postFrameCallback} and
* > [postDelayedFrameCallback]{@link UIContext#postDelayedFrameCallback} from [UIContext]{@link @ohos.arkui.UIContext}.
* > Extend this class and override either the [onFrame]{@link FrameCallback#onFrame} or
* > [onIdle]{@link FrameCallback#onIdle} method to implement specific service logic.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @FaAndStageModel
* @crossplatform
* @atomicservice
* @since 12
*/
export abstract class FrameCallback {
/**
* Called when the next frame is rendered.
*
* @param { number } frameTimeInNano - Time when the rendering of the next frame starts, in nanoseconds.<br>Value
* range: [0, +∞)
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onFrame(frameTimeInNano: number): void;
/**
* Called after the rendering of the subsequent frame has finished and there is more than 1 millisecond left before
* the next VSync signal. If the time left is not more than 1 millisecond, the execution of this API will be deferred
* to a later frame.
*
* @param { number } timeLeftInNano - Remaining idle time for the current frame, in nanoseconds.<br>Value range:
* [0, +∞)
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
onIdle(timeLeftInNano: number): void;
}
/**
* The base context of an ability or an application. It allows access to
* application-specific resources.
*
* @typedef { common.Context } Context
* @syscap SystemCapability.Ability.AbilityRuntime.Core
* @StageModelOnly
* @crossplatform
* @atomicservice
* @since 12
*/
export type Context = common.Context;
/**
* Provides APIs for obtaining component snapshots, including snapshots of components that have been loaded and
* snapshots of components that have not been loaded yet.
*
* > **NOTE**
* >
* > - The initial APIs of this class are supported since API version 12.
* >
* > - In the following API examples, you must first use [getComponentSnapshot()]{@link UIContext#getComponentSnapshot}
* > in **UIContext** to obtain a **ComponentSnapshot** instance, and then call the APIs using the obtained instance.
* >
* > - Transformation properties such as scaling, translation, and rotation only apply to the child components of the
* > target component. Applying these transformation properties directly to the target component itself has no effect;
* > the snapshot will still display the component as it appears before any transformations are applied.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
export class ComponentSnapshot {
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.<br>Note: Off-screen or cached components not
* mounted in the component tree are not supported.
* @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the result. If the snapshot capture is
* successful, **err** is **undefined**, and **data** contains the resulting
* [PixelMap]{@link @ohos.multimedia.image:image.PixelMap}. Otherwise, **err** provides detailed error
* information.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
get(id: string, callback: AsyncCallback<image.PixelMap>, options?: componentSnapshot.SnapshotOptions): void;
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API uses a promise to return the result.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.<br>Note: Off-screen or cached components not
* mounted in the component tree are not supported.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { Promise<image.PixelMap> } Promise used to return the snapshot object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
get(id: string, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
/**
* Captures a snapshot of an offscreen-rendered component created from a [CustomBuilder]{@link common:CustomBuilder}.
* This API uses an asynchronous callback to return the result.
*
* > **NOTE**
* >
* > - Due to the need to wait for the component to be built and rendered, there is a delay of not more than 500 ms in
* > the callback for off-screen snapshot capturing. Therefore, this API is not recommended for performance-sensitive
* > scenarios.
* >
* > - If a component is on a time-consuming task, for example, an [Image]{@link image} or [Web]{@link web} component
* > that is loading online images, its loading may be still in progress when this API is called. In this case, the
* > output snapshot does not represent the component in the way it looks when the loading is successfully completed.
*
* @param { CustomBuilder } builder - Builder of the custom component.<br>Note: The global builder is not supported.<
* br>If the root component of the builder has a width or height of zero, the snapshot operation will fail with
* error code 100001.
* @param { AsyncCallback<image.PixelMap> } callback - Callback used to return the result. If the snapshot capture is
* successful, **err** is **undefined**, and **data** contains the resulting
* [PixelMap]{@link @ohos.multimedia.image:image.PixelMap}. Otherwise, **err** provides detailed error
* information. The coordinates and size of the offscreen component's drawing area can be obtained through the
* callback.
* @param { number } [delay] - Delay time for triggering the screenshot command. When the layout includes an image
* component, it is necessary to set a delay time to allow the system to decode the image resources. The decoding
* time is subject to the resource size. In light of this, whenever possible, use pixel map resources that do not
* require decoding.<br> When PixelMap resources are used or when [syncLoad]{@link ImageAttribute#syncLoad} is set
* to **true** for the **Image** component, you can set **delay** to **0** to forcibly capture snapshots without
* waiting. This delay time does not refer to the time from the API call to the return: As the system needs to
* temporarily construct the passed-in **builder** offscreen, the return time is usually longer than this delay.<
* br>Note: In the **builder** passed in, state variables should not be used to control the construction of child
* components. If they are used, they should not change when the API is called, so as to avoid unexpected snapshot
* results.<br> Default value: **300**<br> Unit: ms<br> Value range:
* [0, +∞). If the value is less than 0, the default value is used.
* @param { boolean } [checkImageStatus] - Whether to verify the image decoding status before taking a snapshot. If
* the value is **true**, the system checks whether all **Image** components have been decoded before taking the
* snapshot. If the check is not completed, the system aborts the snapshot and returns an exception.<br>Default
* value: **false**.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The builder is not a valid build function.
* @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
* the ready state is required when the checkImageStatus option is enabled.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @throws { BusinessError } 160004 - isAuto(true) is not supported for offscreen node snapshots. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
createFromBuilder(builder: CustomBuilder, callback: AsyncCallback<image.PixelMap>, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void;
/**
* Captures a snapshot of an offscreen-rendered component created from a [CustomBuilder]{@link common:CustomBuilder}.
* This API uses a promise to return the result.
*
* > **NOTE**
* >
* > - Due to the need to wait for the component to be built and rendered, there is a delay of not more than 500 ms in
* > the callback for off-screen snapshot capturing. Therefore, this API is not recommended for performance-sensitive
* > scenarios.
* >
* > - If a component is on a time-consuming task, for example, an [Image]{@link image} or [Web]{@link web} component
* > that is loading online images, its loading may be still in progress when this API is called. In this case, the
* > output snapshot does not represent the component in the way it looks when the loading is successfully completed.
*
* @param { CustomBuilder } builder - Builder of the custom component.<br>Note: The global builder is not supported.<
* br>If the root component of the builder has a width or height of zero, the snapshot operation will fail with
* error code 100001.
* @param { number } [delay] - Delay time for triggering the screenshot command. When the layout includes an image
* component, it is necessary to set a delay time to allow the system to decode the image resources. The decoding
* time is subject to the resource size. In light of this, whenever possible, use pixel map resources that do not
* require decoding.<br> When PixelMap resources are used or when [syncLoad]{@link ImageAttribute#syncLoad} is set
* to **true** for the **Image** component, you can set **delay** to **0** to forcibly capture snapshots without
* waiting. This delay time does not refer to the time from the API call to the return: As the system needs to
* temporarily construct the passed-in **builder** offscreen, the return time is usually longer than this delay.<
* br>Note: In the **builder** passed in, state variables should not be used to control the construction of child
* components. If they are used, they should not change when the API is called, so as to avoid unexpected snapshot
* results.<br> Default value: **300**<br> Unit: ms<br> Value range:
* [0, +∞). If the value is less than 0, the default value is used.
* @param { boolean } [checkImageStatus] - Whether to verify the image decoding status before taking a snapshot. If
* the value is **true**, the system checks whether all **Image** components have been decoded before taking the
* snapshot. If the check is not completed, the system aborts the snapshot and returns an exception.<br>Default
* value: **false**.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { Promise<image.PixelMap> } Promise used to return the snapshot object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The builder is not a valid build function.
* @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
* the ready state is required when the checkImageStatus option is enabled.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @throws { BusinessError } 160004 - isAuto(true) is not supported for offscreen node snapshots. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
/**
* Obtains the snapshot of a component that has been loaded based on the provided [component ID]{@link common}. This
* API synchronously returns a [PixelMap]{@link @ohos.multimedia.image:image.PixelMap} after completing the capture.
* Note that this API blocks the main thread and has a 3-second timeout. If the operation exceeds this limit, it
* throws an exception. Use with caution in performance-critical scenarios.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { string } id - [ID]{@link common} of the target component.<br>Note: Off-screen or cached components not
* mounted in the component tree are not supported.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { image.PixelMap } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160002 - Timeout.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
/**
* Obtains the snapshot of a component that has been loaded based on the provided **uniqueId**. This API uses a
* promise to return the result.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { number } uniqueId - Unique ID of the target component. The unique ID of the **FrameNode** can be obtained
* via the [getUniqueId]{@link FrameNode:FrameNode#getUniqueId} API.<br>Note: Off-screen or cached components not
* mounted in the component tree are not supported.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { Promise<image.PixelMap> } Promise used to return the snapshot object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
getWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
/**
* Obtains the snapshot of a component that has been loaded based on the provided **uniqueId**. This API synchronously
* waits for the snapshot to complete and returns a [PixelMap]{@link @ohos.multimedia.image:image.PixelMap} object.
*
* > **NOTE**
* >
* > The snapshot captures content rendered in the last frame. If this API is called when the component triggers an
* > update, the re-rendered content will not be included in the obtained snapshot.
*
* @param { number } uniqueId - Unique ID of the target component. The unique ID of the **FrameNode** can be obtained
* via the [getUniqueId]{@link FrameNode:FrameNode#getUniqueId} API.<br>Note: Off-screen or cached components not
* mounted in the component tree are not supported.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot.
* @returns { image.PixelMap } Promise used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - Invalid ID.
* @throws { BusinessError } 160002 - Timeout.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap;
/**
* Captures a snapshot of the provided component content. This API uses a promise to return the result.
*
* @param { ComponentContent<T> } content - Component content to be captured. This is the content currently displayed
* in the **UIContext**.
* @param { number } [delay] - Delay time for triggering the screenshot command. When the layout includes an image
* component, it is necessary to set a delay time to allow the system to decode the image resources. The decoding
* time is subject to the resource size. In light of this, whenever possible, use pixel map resources that do not
* require decoding.<br> When PixelMap resources are used or when [syncLoad]{@link ImageAttribute#syncLoad} is set
* to **true** for the **Image** component, you can set **delay** to **0** to forcibly capture snapshots without
* waiting. This delay time does not refer to the time from the API call to the return: As the system needs to
* temporarily construct the passed-in **builder** offscreen, the return time is usually longer than this delay.<
* br>Note: In the **builder** passed in, state variables should not be used to control the construction of child
* components. If they are used, they should not change when the API is called, so as to avoid unexpected snapshot
* results.<br> Value range:
* [0, +∞). If the value is less than 0, the default value is used.<br>Default value: **300**<br> Unit: ms
* @param { boolean } [checkImageStatus] - Whether to verify the image decoding status before taking a snapshot. If
* the value is **true**, the system checks whether all **Image** components have been decoded before taking the
* snapshot. If the check is not completed, the system aborts the snapshot and returns an exception.<br>Default
* value: **false**.
* @param { componentSnapshot.SnapshotOptions } [options] - Custom settings of the snapshot. You can specify the scale
* ratio for the pixelmap during rendering and whether to force the system to complete all rendering commands
* before taking the snapshot.
* @returns { Promise<image.PixelMap> } Promise used to return the snapshot object.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 100001 - The builder is not a valid build function.
* @throws { BusinessError } 160001 - An image component in builder is not ready for taking a snapshot. The check for
* the ready state is required when the checkImageStatus option is enabled.
* @throws { BusinessError } 160003 - Unsupported color space or dynamic range mode in snapshot options. [since 23]
* @throws { BusinessError } 160004 - isAuto(true) is not supported for offscreen node snapshots. [since 23]
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
createFromComponent<T extends Object>(content: ComponentContent<T>, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise<image.PixelMap>;
/**
* Obtains the size limit of a component screenshot.
*
* @returns { componentSnapshot.SnapshotSizeLimitation } Size limit of a component screenshot.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
getSizeLimitation(): componentSnapshot.SnapshotSizeLimitation;
}
/**
* Base class for smart gesture handling. When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, the callback parameter type is an instance of a
* specific subclass type.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export abstract class BaseGestureHandlingProposal {
/**
* Final action of the smart gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
action: SmartGestureAction;
/**
* Underlying operation intention of the smart gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
operateIntention: OperateIntention;
}
/**
* Base class for smart gesture handling with a target node.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export abstract class TargetedGestureProposal extends BaseGestureHandlingProposal {
/**
* Target node that handles the current smart gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
node: FrameNode;
}
/**
* Smart gesture click action handling. When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type
* triggers a click operation on the target component.
*
* > **NOTE**
* >
* > - This action handling follows the "select first, then click" processing semantics.
* >
* > - If the target node is not yet selected, this handling first establishes the selected state without immediately
* > triggering the click.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class ClickActionProposal extends TargetedGestureProposal {
/**
* Constructor for the smart gesture click action handling.
*
* @param { FrameNode } node - Target node that responds to the click action.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(node: FrameNode);
}
/**
* Smart gesture selection action handling. When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type causes
* the target component to be selected.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class SelectActionProposal extends TargetedGestureProposal {
/**
* Constructor for the smart gesture selection action handling.
*
* @param { FrameNode } node - Target node that responds to the selection action.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(node: FrameNode);
}
/**
* Smart gesture no-op action handling. When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type
* triggers no action.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class NoneActionProposal extends BaseGestureHandlingProposal {
/**
* Constructor for the smart gesture no-op action handling.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor();
}
/**
* Smart gesture back press action handling. When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type
* navigates back to the previous page.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class BackPressActionProposal extends BaseGestureHandlingProposal {
/**
* Constructor for the smart gesture back press action handling.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor();
}
/**
* Smart gesture page switch action handling. The default direction is forward page switching, including right and down.
* When dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type
* triggers a page switching operation on the target component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class PageSwitchActionProposal extends TargetedGestureProposal {
/**
* Constructor for the smart gesture page switch action handling.
*
* @param { FrameNode } node - Target node that responds to the page switch action.
* @param { number } pageCount - Number of pages to switch.<br/>Value range:
* [0, +∞). Values less than 0 are treated as 0.<br/>Unit: pages.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(node: FrameNode, pageCount: number);
/**
* Number of pages to switch in the smart gesture.
*
* Value range: [0, +∞). Values less than 0 are treated as 0.
*
* Unit: pages.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
pageCount: number;
}
/**
* Smart gesture scroll action handling. The default direction is forward scrolling, including right and down. When
* dynamically customizing smart gesture behavior through the
* [registerMonitor]{@link SmartGestureController#registerMonitor} API, setting the return value
* [GestureHandlingResolution]{@link GestureHandlingResolution}'s **selectedProposal** to an object of this type
* triggers a scroll operation on the target component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class ScrollActionProposal extends TargetedGestureProposal {
/**
* Constructor for the smart gesture scroll action handling.
*
* @param { FrameNode } node - Target node that responds to the scroll action.
* @param { number } distance - Scroll distance.<br/>Value range:
* [0, +∞). Values less than 0 are treated as 0.<br/>Unit: vp.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(node: FrameNode, distance: number);
/**
* Scroll distance of the smart gesture.
*
* Value range: [0, +∞). Values less than 0 are treated as 0.
*
* Unit: vp.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
distance?: number;
}
/**
* Class for declaring the result of smart gesture handling.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class GestureHandlingResolution {
/**
* Constructor for the smart gesture handling result.
*
* @param { boolean } isConsumed - Whether to consume the current smart gesture.<br/>**true**: The smart gesture is
* consumed. If [selectedProposal]{@link GestureHandlingResolution#selectedProposal}
* is not set, the system default action handling is used. If **selectedProposal** is set, the custom action
* handling is used.<br/>**false**: The smart gesture is not consumed, and the system treats it as unhandled.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
constructor(isConsumed: boolean);
/**
* Whether to consume the current smart gesture.
*
* **true**: The smart gesture is consumed. If **selectedProposal** is not set, the system default action handling is
* used. If **selectedProposal** is set, the custom action handling is used.
*
* **false**: The smart gesture is not consumed, and the system treats it as unhandled.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
isConsumed: boolean;
/**
* The smart gesture handling behavior specified by the user.
*
* When **isConsumed** is **true**: If **selectedProposal** is not set, the system default action handling is used. If
* **selectedProposal** is set, the custom action handling is used.
*
* When **isConsumed** is **false**, the **selectedProposal** setting does not take effect.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
selectedProposal?: BaseGestureHandlingProposal;
}
/**
* Provides the capability to enable smart gestures, monitor them, control the selection state, and dynamically
* determine smart gesture behavior.
*
* > **NOTE**
* >
* > The following APIs must be called using a **SmartGestureController** instance obtained via
* > [getSmartGestureController()]{@link UIContext#getSmartGestureController} in **UIContext**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
export class SmartGestureController {
/**
* Sets whether to enable the tap and slide operations of smart gestures.
*
* > **NOTE**
* >
* > - This API affects only the tap and slide smart gestures, not the wrist-turn gesture.
* >
* > - When disabled, the [smartGestureShortcut]{@link CommonMethod#smartGestureShortcut}
* > attribute on the component side is retained, but the tap and slide smart gestures will not be responded to.
*
* @param { boolean } enabled - Whether to enable the tap and slide smart gesture handling. The value **true** means
* to enable it, and **false** means to disable it.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
enableSmartTapAndSlideGestures(enabled: boolean): void;
/**
* Registers a smart gesture monitoring callback. Before the system processes the current smart gesture, the
* application can receive the default action handling of the current gesture and apply custom intervention. The
* callback is used for asynchronous callbacks.
*
* > **NOTE**
* >
* > - This API enables the application to receive the system's handling intent for the current smart gesture event
* > before it is processed by the system and apply custom intervention.
* >
* > - Users can customize the behavior of the current smart gesture through this callback.
* >
* > - Multiple monitoring callbacks can be registered. They are triggered in the reverse order of registration (the
* > last registered one is executed first). When a monitoring callback consumes the smart gesture event, that is,
* > when the return value [GestureHandlingResolution]{@link GestureHandlingResolution}.isConsumed is **true**,
* > subsequent monitoring callbacks will not be executed.
* >
* > - If the same callback is registered repeatedly, only the first registration takes effect; duplicate
* > registrations are ignored.
* >
* > - The return value of the callback must be a valid [GestureHandlingResolution]{@link GestureHandlingResolution}
* > instance; otherwise, the modification will not take effect.
*
* @param { Callback<BaseGestureHandlingProposal, GestureHandlingResolution> } monitorCallback - Smart gesture
* monitoring callback. The callback parameter is the default action handling provided by the system, and the
* return value is used to declare whether to consume the current smart gesture and whether to replace the default
* action handling.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
registerMonitor(monitorCallback: Callback<BaseGestureHandlingProposal, GestureHandlingResolution>): void;
/**
* Unregisters a smart gesture monitoring callback.
*
* @param { Callback<BaseGestureHandlingProposal, GestureHandlingResolution> } monitorCallback - The smart gesture
* monitoring callback to unregister.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
unregisterMonitor(monitorCallback: Callback<BaseGestureHandlingProposal, GestureHandlingResolution>): void;
/**
* Clears all monitoring callbacks registered for the current **UIContext**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
clearMonitors(): void;
/**
* Requests to set the specified component as the current smart gesture selected node. After successful selection, a
* selection prompt box is displayed. The style of the selection box varies by device.
*
* > **NOTE**
* >
* > - The request takes effect only when all the following conditions are met: the target component can respond to
* > smart gestures, the component is visible on the screen, and the component has an
* > [onClick]{@link CommonMethod#onClick(event: Callback<ClickEvent>, distanceThreshold: number)} event bound or a
* > [TapGesture]{@link TapGesture} gesture bound.
* >
* > - Whether a component can respond to smart gestures is determined by **enabled** in
* > [smartGestureShortcut]{@link CommonMethod#smartGestureShortcut}.
*
* @param { string } id - Component [id]{@link CommonMethod#id}.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
requestSelected(id: string): void;
/**
* Clears the currently selected node of smart gestures.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
clearSelected(): void;
}
/**
* Enumerates resolution strategies for **UIContext** objects.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
export const enum ResolveStrategy {
/**
* Obtain the UIContext of the current calling scope.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
CALLING_SCOPE = 0,
/**
* Obtain the UIContext of the instance that most recently switched to the focused state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
LAST_FOCUS = 1,
/**
* Obtain the UIContext of the instance with the largest instance ID.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
MAX_INSTANCE_ID = 2,
/**
* Obtain the UIContext of the unique UI instance (when only one UI instance exists).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
UNIQUE = 3,
/**
* Obtain the UIContext of the instance that most recently switched to the foreground.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
LAST_FOREGROUND = 4,
/**
* Obtain a UIContext with an ambiguous calling scope.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
UNDEFINED = 5
}
/**
* **ResolvedUIContext** instance object.
*
* > **NOTE**
* >
* > - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
* >
* > - **ResolvedUIContext** is inherited from [UIContext]{@link @ohos.arkui.UIContext}. Objects of this class contain
* > the [UIContext]{@link @ohos.arkui.UIContext} instance and its parsing policy.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
export class ResolvedUIContext extends UIContext {
/**
* Resolving strategy of the UIContext.
* @type { ResolveStrategy }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
strategy: ResolveStrategy;
}
/**
* Implements a **UIContext** instance.
*
* > **NOTE**
* >
* > - You can preview how this component looks on a real device, but not in DevEco Studio Previewer.
* >
* > - The following APIs must be called through a corresponding UIContext instance. There are three ways to obtain a
* > **UIContext** instance: (1) using the
* > [getUIContext()](docroot://reference/apis-arkui/arkts-apis-window-Window.md#getuicontext10) method from
* > ohos.window; (2) using the built-in method
* > [getUIContext()](docroot://reference/apis-arkui/arkui-ts/ts-custom-component-api.md#getuicontext) of a custom
* > component; (3) using static methods of the UIContext class such as
* > [getCallingScopeUIContext]{@link UIContext#getCallingScopeUIContext}. In this document, the **UIContext** instance
* > is represented by **uiContext**.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
export class UIContext {
/**
* Construct a **UIContext** object.
*
* > **NOTE**
* >
* > A **UIContext** object created using the constructor points to an ambiguous UI context, meaning it is not bound
* > to any specific UI instance. The unique ID of such a UIContext instance is -1.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
constructor();
/**
* Obtains the UIContext of this [calling scope](docroot://ui/arkts-global-interface.md#basic-concepts). This API
* returns **undefined** if the calling scope is ambiguous.
*
* > **NOTE**
* >
* > The returned UIContext object may point to a destroyed UI instance, which usually occurs when an asynchronous
* > task is dispatched from an instance that has already been destroyed. As such, you are advised to verify its
* > validity via the [isAvailable]{@link UIContext#isAvailable} API.
*
* @returns { UIContext | undefined } UIContext of the current
* [calling scope](docroot://ui/arkts-global-interface.md#basic-concepts). Returns **undefined** if the calling
* scope is ambiguous.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static getCallingScopeUIContext(): UIContext | undefined;
/**
* Obtains the UIContext of the UI instance that most recently switched to the focused state.
*
* @returns { UIContext | undefined } UIContext of the UI instance that most recently switched to the focused state.
* Returns **undefined** if the most recently focused instance has been destroyed or if no instance has ever been
* focused.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static getLastFocusedUIContext(): UIContext | undefined;
/**
* Obtains the UIContext of the UI instance that most recently switched to the foreground state.
*
* @returns { UIContext | undefined } UIContext of the UI instance that most recently switched to the foreground
* state. Returns **undefined** if the most recently foreground UI instance has been destroyed or if no UI
* instance has ever been in the foreground.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static getLastForegroundUIContext(): UIContext | undefined;
/**
* Obtains all currently valid UIContext instances.
*
* @returns { UIContext[] } Array of all currently valid UIContext instances. Returns an empty array if no valid
* UIContext instance exists.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static getAllUIContexts(): UIContext[];
/**
* Obtains a UIContext instance along with its resolution strategy using a predefined priority order.
*
* > **NOTE**
* >
* > This API resolves and returns a UIContext instance together with the strategy used to determine it,
* >
* > based on the following priority rules (in order):
* >
* > 1. UIContext in the current calling scope.
* >
* > 2. If only one UI instance exists, its UIContext is returned.
* >
* > 3. If a UI instance has switched to the focused state, and the most recently focused UI instance has not been
* > destroyed, the UIContext of that most recently focused instance is returned.
* >
* > 4. If a UI instance has switched to the foreground state, and the most recently foreground UI instance has not
* > been destroyed, the UIContext of that most recently foreground instance is returned.
* >
* > 5. If multiple UI instances exist, the UIContext with the largest unique instance ID is returned.
* >
* > 6. If none of the above conditions are met, an invalid UIContext instance is returned.
*
* @returns { ResolvedUIContext } UIContext instance along with its resolution strategy.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
static resolveUIContext(): ResolvedUIContext;
/**
* Checks whether the UI instance corresponding to this **UIContext** object is valid. The **UIContext** object can be
* obtained using the [getUIContext](docroot://reference/apis-arkui/arkts-apis-window-Window.md#getuicontext10) API. A
* UI instance is considered valid when the backend UI instance exists. UIContext objects created using
* **new UIContext()** have no corresponding UI instance. After multiple
* [loadContent](docroot://reference/apis-arkui/arkts-apis-window-Window.md#loadcontent9) operations, old UI instances
* become invalid. In multi-window scenarios, when a window is closed, its UI instance becomes invalid. In summary, a
* UIContext object is invalid when it has no corresponding backend UI instance.
*
* @returns { boolean } Whether the UI instance corresponding to the current **UIContext** object is valid. The value
* **true** indicates yes, and the value **false** indicates no.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
isAvailable(): boolean;
/**
* Obtains a **Font** object.
*
* @returns { Font } **Font** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getFont(): Font;
/**
* get object mediaQuery.
*
* @returns { MediaQuery } object MediaQuery.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getMediaQuery(): MediaQuery;
/**
* Obtains the **UIInspector** object.
* @returns { UIInspector } **UIInspector** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getUIInspector(): UIInspector;
/**
* Obtains the component tree and component attributes. This API has a long processing time and is intended for
* <br>testing scenarios only.
* @param { Array<string> } [filters] - List of component attributes used for filtering. Currently, only the following
* filter fields are supported:
* <br>**"id"**: unique ID of the component.
* <br>**"src"**: source of the resource.
* <br>**"content"**: information or data contained in the element, component, or object.
* <br>**"editable"**: whether the component is editable.
* <br>**"scrollable"**: whether the component is scrollable.
* <br>**"selectable"**: whether the component is selectable.
* <br>**"focusable"**: whether the component is focusable.
* <br>**"focused"**: whether the component is currently focused.
* <br>If **filters** includes one or more fields, unspecified fields will be filtered out from the results.
* <br>If **filters** is not provided or is an empty array, none of the aforementioned fields
* <br>will be filtered out.
* <br>The following filter field is supported since API version 20:
* <br>**"isLayoutInspector"**: whether the component tree contains custom components.
* <br>If **filters** is omitted or
* <br>does not contain **"isLayoutInspector"**, the returned component tree
* <br>will not include custom component details.
* <br>Other filter fields are used only in testing scenarios.
* @returns { string } JSON string of the component tree and component attributes. For details about each field in
* the component, see the return value description of [getInspectorInfo]{@link FrameNode#getInspectorInfo}.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getFilteredInspectorTree(filters?: Array<string>): string;
/**
* Obtains the attributes of the specified component and its child components. This API has a long processing time
* <br>and is intended for testing scenarios only.
* @param { string } id - [ID]{@link CommonMethod#id} of the target component.
* @param { number } depth - Number of layers of child components. If the value is **0**, the attributes of the
* specified component and all its child components are obtained. If the value is **1**, only the attributes of
* <br>the specified component are obtained. If the value is **2**, the attributes of
* <br>the specified component and its
* <br>level-1 child components are obtained. The rest can be deduced by analogy.
* @param { Array<string> } [filters] - List of component attributes used for filtering. Currently, only the following
* filter fields are supported:
* <br>**"id"**: unique ID of the component.
* <br>**"src"**: source of the resource.
* <br>**"content"**: information or data contained in the element, component, or object.
* <br>**"editable"**: whether the component is editable.
* <br>**"scrollable"**: whether the component is scrollable.
* <br>**"selectable"**: whether the component is selectable.
* <br>**"focusable"**: whether the component is focusable.
* <br>**"focused"**: whether the component is currently focused.
* <br>If **filters** includes one or more fields, unspecified fields will be filtered out from the results.
* <br>If **filters** is not provided or is an empty array, none of the aforementioned fields
* <br>will be filtered out.
* <br>Other filter fields are used only in testing scenarios.
* @returns { string } JSON string of the attributes of the specified component and its child components. For details
* about each field in the component, see the return value
* <br>description of [getInspectorInfo]{@link FrameNode#getInspectorInfo}.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getFilteredInspectorTreeById(id: string, depth: number, filters?: Array<string>): string;
/**
* Obtains a Router object.
*
* @returns { Router } Router object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getRouter(): Router;
/**
* Obtains a PromptAction object.
*
* @returns { PromptAction } PromptAction object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getPromptAction(): PromptAction;
/**
* get object ComponentUtils.
*
* @returns { ComponentUtils } object ComponentUtils.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
getComponentUtils(): ComponentUtils;
/**
* Obtains the **UIObserver** object.
*
* @returns { UIObserver } **UIObserver** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
getUIObserver(): UIObserver;
/**
* Obtains the OverlayManager object.
*
* @returns { OverlayManager } OverlayManager instance obtained.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getOverlayManager(): OverlayManager;
/**
* Obtains a [Magnifier]{@link Magnifier} object, which can be used to control the display and hiding of a magnifier.
*
* @returns { Magnifier } **Magnifier** object, which can be used to control the display and hiding of a magnifier.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
getMagnifier(): Magnifier;
/**
* Init OverlayManager.
*
* @param { OverlayManagerOptions } options - Options.
* @returns { boolean } Returns true if it is called first and before getting an OverlayManager instance; returns false otherwise.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
setOverlayManagerOptions(options: OverlayManagerOptions): boolean;
/**
* Get object OverlayManagerOptions.
*
* @returns { OverlayManagerOptions } object OverlayManagerOptions.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
getOverlayManagerOptions(): OverlayManagerOptions;
/**
* Creates an **Animator** object.
*
* @param { AnimatorOptions } options - Animator options.
* @returns { AnimatorResult } Animator result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
createAnimator(options: AnimatorOptions): AnimatorResult;
/**
* Creates an **AnimatorResult** object for animations. Compared to the previous
* [createAnimator]{@link UIContext#createAnimator(options: AnimatorOptions)} API, this API adds support for the
* [SimpleAnimatorOptions]{@link @ohos.animator:SimpleAnimatorOptions} type.
*
* @param { AnimatorOptions | SimpleAnimatorOptions } options - Animator options.
* @returns { AnimatorResult } Animator result.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
createAnimator(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult;
/**
* Adds transition animations for state changes in closure code.
*
* > **NOTE**
* >
* > - Avoid using **animateTo** in **aboutToAppear** or **aboutToDisappear**.
* >
* > - When **animateTo** is called in
* > [aboutToAppear](docroot://reference/apis-arkui/arkui-ts/ts-custom-component-lifecycle.md#abouttoappear), the
* > component's build method is not executed yet, and internal components are not created. This means the animation
* > has no initial values to work with and will not function as expected.
* >
* > - During execution of
* > [aboutToDisappear](docroot://reference/apis-arkui/arkui-ts/ts-custom-component-lifecycle.md#abouttodisappear),
* > the component is being destroyed, so animations should not be used.
* >
* > - When a component appears or disappears, animation effects can be added through
* > [component transition]{@link common}.
* >
* > - For properties that component transitions do not support, refer to
* > [Example 2: Enabling Component Disappearance After Animation Completion](docroot://reference/apis-arkui/arkui-ts/ts-explicit-animation.md#example-2-enabling-component-disappearance-after-animation-completion),
* > which uses **animateTo** to achieve the effect of the component disappearing after the animation finishes.
* >
* > - In certain scenarios, using animateTo with
* > [state management V2](docroot://ui/state-management/arkts-state-management-overview.md#state-management-v2) may
* > produce unexpected results. For details, see
* > [Using animateTo Failed in State Management V2](docroot://ui/state-management/arkts-new-local.md#using-animateto-failed-in-state-management-v2).
* >
* >
* > - When a UIAbility switches from the foreground to the background, any limited iteration animations that are
* > currently running will end immediately, thereby triggering the
* > [onFinish animation completion callback]{@link AnimateParam}.
* >
* > - If transition animations are turned off in Developer options, animations end on the current frame, and the
* > **onFinish** callback is executed immediately. Avoid placing timing-dependent functional logic inside this
* > callback.
*
* @param { AnimateParam } value - Animation settings.
* @param { function } event - Closure function that displays the animation. The system automatically inserts the
* transition animation if the state changes in the closure function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
animateTo(value: AnimateParam, event: () => void): void;
/**
* Shows an alert dialog box.
*
* @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - Shows
* an AlertDialog component in the given settings.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void;
/**
* Shows an action sheet in the given settings.
*
* @param { ActionSheetOptions } value - Parameters of the action sheet.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showActionSheet(value: ActionSheetOptions): void;
/**
* datePickerDialog display.
*
* @param { DatePickerDialogOptions } options - Options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showDatePickerDialog(options: DatePickerDialogOptions): void;
/**
* timePickerDialog display.
*
* @param { TimePickerDialogOptions } options - Options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showTimePickerDialog(options: TimePickerDialogOptions): void;
/**
* textPickerDialog display.
*
* @param { TextPickerDialogOptions } options - Options.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
showTextPickerDialog(options: TextPickerDialogOptions): void;
/**
* textPickerDialog display.
*
* @param { TextPickerDialogOptions | TextPickerDialogOptionsExt } style - Dialog style.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
showTextPickerDialog(style: TextPickerDialogOptions | TextPickerDialogOptionsExt): void;
/**
* Set image cache capacity of decoded image count.
* if not set, the application will not cache any decoded image.
*
* @param { number } value - capacity of decoded image count.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
setImageCacheCount(value: number): void;
/**
* Set image cache capacity of raw image data size in bytes before decode.
* if not set, the application will not cache any raw image data.
*
* @param { number } value - capacity of raw image data size in bytes.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
setImageRawDataCacheSize(value: number): void;
/**
* Run custom functions inside the UIContext scope.
*
* @param { function } callback - The function called through UIContext.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 11]
* @since 10
*/
runScopedTask(callback: () => void): void;
/**
* Sets the avoidance mode for the virtual keyboard.
*
* > **NOTE**
* >
* > With **KeyboardAvoidMode.RESIZE**, the page is resized to prevent the virtual keyboard from obstructing the
* > view. Regarding components on the page, those whose width and height are set in percentage are resized with the
* > page, and those whose width and height are set to specific values are laid out according to their settings.
* > With **KeyboardAvoidMode.RESIZE**, **expandSafeArea([SafeAreaType.KEYBOARD],[SafeAreaEdge.BOTTOM])** does not
* > take effect.
* >
* > With **KeyboardAvoidMode.NONE**, keyboard avoidance is disabled, and the page will be covered by the displayed
* > keyboard.
* >
* > **setKeyboardAvoidMode** only affects page layouts. It does not apply to popup components, including the
* > following: **Dialog**, **Popup**, **Menu**, **BindSheet**, **BindContentCover**, **Toast**, **OverlayManager**.
* > For details about the avoidance mode of popup components, see
* > [CustomDialogControllerOptions](docroot://reference/arkui-ts/ts-methods-custom-dialog-box.md).
*
* @param { KeyboardAvoidMode } value - Avoidance mode of the virtual keyboard.<br>Default value:
* **KeyboardAvoidMode.OFFSET**, which means that the page moves up when the keyboard is displayed.<br>When
* **setKeyboardAvoidMode** is set to an invalid value, this attribute does not take effect.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
setKeyboardAvoidMode(value: KeyboardAvoidMode): void;
/**
* Obtains the avoidance mode of the virtual keyboard.
*
* @returns { KeyboardAvoidMode } Avoidance mode of the virtual keyboard.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
getKeyboardAvoidMode(): KeyboardAvoidMode;
/**
* Sets the pixel rounding mode for this page.
*
* @param { PixelRoundMode } mode - Pixel rounding mode.
* Default value:**PixelRoundMode.PIXEL_ROUND_ON_LAYOUT_FINISH**.<br>If this parameter is set to an invalid value,
* the default value will be used.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
setPixelRoundMode(mode: PixelRoundMode): void;
/**
* Obtains the pixel rounding mode for this page.
*
* @returns { PixelRoundMode } Pixel rounding mode of the current page.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 18
*/
getPixelRoundMode(): PixelRoundMode;
/**
* Dispach keyboard event to the frameNode with inspector key.
*
* @param { number | string } node - The uniqueId or inspector key of the target FrameNode.
* @param { KeyEvent } event - The key event to be sent.
* @returns { boolean } Returns whether the key event is consumed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 15
*/
dispatchKeyEvent(node: number | string, event: KeyEvent): boolean;
/**
* Get AtomicServiceBar.
* @returns { Nullable<AtomicServiceBar> } The atomic service bar.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
getAtomicServiceBar(): Nullable<AtomicServiceBar>;
/**
* Get DragController.
*
* @returns { DragController } the DragController
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 18]
* @atomicservice [since 12]
* @since 11
*/
getDragController(): DragController;
/**
* Obtains a **MeasureUtils** object for text calculation.
*
* @returns { MeasureUtils } Text metrics, such as text height and width.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getMeasureUtils(): MeasureUtils;
/**
* Generates a key frame animation. For details about how to use this API, see [keyframeAnimateTo]{@link common}.
*
* @param { KeyframeAnimateParam } param - Overall animation parameter of the keyframe animation.
* @param { Array<KeyframeState> } keyframes - List of all keyframe states.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice [since 12]
* @since 11
*/
keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array<KeyframeState>): void;
/**
* Get FocusController.
*
* @returns { FocusController } - the FocusController
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
getFocusController(): FocusController;
/**
* Specifies a clear animation host instance context via the UIContext object and triggers the explicit animation to
* be dispatched immediately. This avoids issues where animations are not executed or animation end callbacks are not
* triggered due to inability to locate the instance or using an incorrect instance. This API uses an asynchronous
* callback to return the result.
*
* @param { AnimateParam } param - Animation settings.
* @param { Callback<void> } processor - Callback function. It specifies the closure function that displays the
* animation. The system automatically inserts the transition animation if the state changes in the closure
* function.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
animateToImmediately(param: AnimateParam, processor: Callback<void>): void;
/**
* Get FrameNode by id.
*
* @param { string } id - The id of FrameNode.
* @returns { FrameNode | null } The instance of FrameNode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getFrameNodeById(id: string): FrameNode | null;
/**
* Get the FrameNode attached to current window by id.
*
* @param { string } id - The id of FrameNode.
* @returns { FrameNode | null } The instance of FrameNode.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getAttachedFrameNodeById(id: string): FrameNode | null;
/**
* Get FrameNode by uniqueId.
* Obtains the entity node, FrameNode, of a component on the component tree using its uniqueId.
* The return value depends on the type of component associated with the uniqueId.
*
* 1. If the uniqueId corresponds to a built-in component, the associated FrameNode is returned.
* 2. If the uniqueId corresponds to a custom component: If the component has rendered content, its root node is
* returned, with the type __Common__; if the component has no rendered content, the FrameNode of its first child
* component is returned.
* 3. If the uniqueId does not correspond to any component, null is returned.
*
* @param { number } id - The uniqueId of the FrameNode.
* @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getFrameNodeByUniqueId(id: number): FrameNode | null;
/**
* Get page information of the frameNode with uniqueId.
*
* @param { number } id - The uniqueId of the target FrameNode.
* @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes
* navDestination and router page information. If the frame node does not have navDestination and
* router page information, it will return an empty object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getPageInfoByUniqueId(id: number): PageInfo;
/**
* Get navigation information of the frameNode with uniqueId.
*
* @param { number } id - The uniqueId of the target FrameNode.
* @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the
* target uniqueId, or undefined if the frameNode is not existed or does not have navigation information.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined;
/**
* Get object cursor controller.
*
* @returns { CursorController } object cursor controller.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getCursorController(): CursorController;
/**
* Registers a local input event monitor.
* The "Local" in the interface name indicates that the monitor is only valid within the current UIContext,
* and does not affect other UIContext instances. Each UIContext maintains its own independent list of monitors.
* > **NOTE**
* > Performance Warning: Do not perform time-consuming operations in the callback!
* > Monitor Object Notes:
* > - The returned Monitor object is a unique identifier created by the system.
* > - Developers cannot actively construct or forge this object.
* > - Must save the returned monitor object reference for subsequent cancellation.
* > - It is recommended to use a variable to save it to avoid losing the reference.
* > Usage Examples:
* > ```typescript
* > // Monitor a single event type
* > const monitor1 = uiContext.addLocalInputEventMonitor(
* > InputEventSubTypeMask.LEFT_MOUSE_DOWN,
* > (wrapper: RawInputEventWrapper) => {
* > if (wrapper.isMouseEvent()) {
* > const mouseEvent = wrapper.asMouseEvent();
* > console.log(`Mouse: (${mouseEvent.windowX}, ${mouseEvent.windowY})`);
* > return { action: InputEventInterceptAction.CONTINUE }; // Allow event to continue
* > }
* > return { action: InputEventInterceptAction.BLOCK }; // Block event
* > }
* > );
* > // Monitor multiple event types (using bitwise operations)
* > const monitor2 = uiContext.addLocalInputEventMonitor(
* > InputEventSubTypeMask.LEFT_MOUSE_DOWN | InputEventSubTypeMask.RIGHT_MOUSE_DOWN,
* > (wrapper: RawInputEventWrapper) => {
* > if (wrapper.isMouseEvent()) {
* > const mouseEvent = wrapper.asMouseEvent()!;
* > console.log(`Mouse button: ${mouseEvent.button}`);
* > return { action: InputEventInterceptAction.BLOCK };
* > }
* > return { action: InputEventInterceptAction.CONTINUE };
* > }
* > );
* > // When unregistering the monitor, use the returned Monitor object
* > uiContext.removeLocalInputEventMonitor(monitor1);
* > uiContext.removeLocalInputEventMonitor(monitor2);
* > ```.
*
* @param { number } eventMask - Event type mask, specifying the types of events to monitor through
* bitwise operations.
* The value should be an integer.
* @param { InputEventListener } listener - Event listener callback function.
* @returns { InputEventMonitor } Unique identifier object for the monitor, used for subsequent
* cancellation of registration.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
addLocalInputEventMonitor(eventMask: number, listener: InputEventListener): InputEventMonitor;
/**
* Removes a local input event monitor.
*
* **Important Notes**:
* - Only Monitor objects returned by addLocalInputEventMonitor can be removed.
* - Cannot unregister a monitor by manually constructing an object.
* - If an invalid object is passed, the system silently ignores it.
*
* @param { InputEventMonitor } monitor - Monitor identifier object (returned by addLocalInputEventMonitor).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
removeLocalInputEventMonitor(monitor: InputEventMonitor): void;
/**
* Get object context menu controller.
*
* @returns { ContextMenuController } object context menu controller.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getContextMenuController(): ContextMenuController;
/**
* Get ComponentSnapshot.
*
* @returns { ComponentSnapshot } the ComponentSnapshot
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
getComponentSnapshot(): ComponentSnapshot;
/**
* Converts a value in vp units to a value in px.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
vp2px(value: number): number;
/**
* Converts a value in px units to a value in vp.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
px2vp(value: number): number;
/**
* Converts a value in fp units to a value in px.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
fp2px(value: number): number;
/**
* Converts a value in px units to a value in fp.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
px2fp(value: number): number;
/**
* Converts a value in lpx units to a value in px.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
lpx2px(value: number): number;
/**
* Converts a value in px units to a value in lpx.
*
* @param { number } value
* @returns { number }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 12
*/
px2lpx(value: number): number;
/**
* Obtains the **LocalStorage** instance shared by this stage.
*
* @returns { LocalStorage | undefined } **LocalStorage** instance if it exists; **undefined** if it does not exist.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getSharedLocalStorage(): LocalStorage | undefined;
/**
* Obtains the context of this ability.
*
* @returns { Context | undefined } Context of the ability. The context type depends on the ability type. For example,
* if this API is called in a page within a UIAbility window, the returned context type is
* [UIAbilityContext]{@link UIAbilityContext:UIAbilityContext}. If this API is called in a page within an
* ExtensionAbility window, the returned context type is
* [ExtensionContext]{@link ExtensionContext:ExtensionContext}. If the ability context does not exist,
* **undefined** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getHostContext(): Context | undefined;
/**
* Obtains the name of the window where this instance is located.
*
* @returns { string | undefined } Name of the window where the current instance is located. If the window does not
* exist, **undefined** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
getWindowName(): string | undefined;
/**
* Obtains the ID of the window to which the current application instance belongs.
*
* > **NOTE**
* >
* > If the UIContext resides inside a
* > [UIExtensionAbility]{@link @ohos.app.ability.UIExtensionAbility:UIExtensionAbility} that runs in the main
* > application process, the top-level window ID of the main application is returned.
*
* @returns { number | undefined } ID of the window to which the current application instance belongs. If the window
* does not exist, **undefined** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 23
*/
getWindowId(): number | undefined;
/**
* Obtains the width breakpoint value of the window where this instance is located. The specific value is determined
* by the vp value of the window width. For details, see [WidthBreakpoint]{@link WidthBreakpoint}.
*
* @returns { WidthBreakpoint } Width breakpoint value of the window where the current instance is located. If the
* window width is 0 vp, **WIDTH_XS** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 13
*/
getWindowWidthBreakpoint(): WidthBreakpoint;
/**
* Obtains the height breakpoint value of the window where this instance is located. The specific value is determined
* based on the window aspect ratio. For details, see [HeightBreakpoint]{@link HeightBreakpoint}.
*
* @returns { HeightBreakpoint } Height breakpoint value of the window where the current instance is located. If the
* window aspect ratio is 0, **HEIGHT_SM** is returned.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 22]
* @atomicservice
* @since 13
*/
getWindowHeightBreakpoint(): HeightBreakpoint;
/**
* Creates a sheet whose content is as defined in **bindSheetContent** and displays the sheet. This API uses a promise
* to return the result.
*
* > **NOTE**
* >
* > 1. When calling this API, if no valid value is provided for **targetId**, you won't be able to set
* > **SheetOptions.preferType** to **POPUP** or **SheetOptions.mode** to **EMBEDDED**.
* >
* > 2. Since [updateBindSheet]{@link UIContext#updateBindSheet} and [closeBindSheet]{@link UIContext#closeBindSheet}
* > depend on **bindSheetContent**, you need to maintain the passed **bindSheetContent** yourself.
* >
* > 3. Setting **SheetOptions.UIContext** is not supported.
*
* @param { ComponentContent<T> } bindSheetContent - Content to display on the sheet.
* @param { SheetOptions } sheetOptions - Style of the sheet.<br>**NOTE**<br>1. **SheetOptions.uiContext** cannot be
* set. Its value is fixed to the **UIContext** object of the current instance.<br>2. If **targetId** is not
* passed in, **SheetOptions.preferType** cannot be set to **POPUP**; if **POPUP** is set, it will be replaced
* with **CENTER**.<br>3. If **targetId** is not passed in, **SheetOptions.mode** cannot be set to **EMBEDDED**;
* the default mode is **OVERLAY**.<br>4. For the default values of other attributes, see
* [SheetOptions]{@link SheetOptions}.
* @param { number } targetId - ID of the component to be bound. If this parameter is not set, no component is bound.
* If the ID does not exist, the error code 120004 is returned. Returns error code 401 if **undefined** is passed
* in.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
* @throws { BusinessError } 120002 - The bindSheetContent already exists.
* @throws { BusinessError } 120004 - The targetId does not exist.
* @throws { BusinessError } 120005 - The node of targetId is not in the component tree.
* @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
openBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions?: SheetOptions, targetId?: number): Promise<void>;
/**
* Updates the style of the sheet corresponding to the provided **bindSheetContent**. This API uses a promise to
* return the result.
*
* > **NOTE**
* >
* > **SheetOptions.UIContext**, **SheetOptions.mode**, and callback functions cannot be updated.
*
* @param { ComponentContent<T> } bindSheetContent - Content to display on the sheet.
* @param { SheetOptions } sheetOptions - Style of the sheet.<br>**NOTE**<br>**SheetOptions.UIContext** and
* **SheetOptions.mode** cannot be updated.
* @param { boolean } partialUpdate - Whether to update the sheet in incremental mode.<br>Default value: **false**<br>
* **NOTE**<br>1. **true**: incremental update, where the specified properties in **SheetOptions** are updated,
* and other properties stay at their current value.<br>2. **false**: full update, where all properties except
* those specified in **SheetOptions** are restored to default values.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
* @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
updateBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise<void>;
/**
* Closes the sheet corresponding to **bindSheetContent**. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > Closing a sheet using this API will not invoke the **shouldDismiss** callback.
*
* @param { ComponentContent<T> } bindSheetContent - Content to display on the sheet.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. Mandatory parameters are left unspecified.
* <br> 2. Incorrect parameters types.
* <br> 3. Parameter verification failed.
* @throws { BusinessError } 120001 - The bindSheetContent is incorrect.
* @throws { BusinessError } 120003 - The bindSheetContent cannot be found.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
closeBindSheet<T extends Object>(bindSheetContent: ComponentContent<T>): Promise<void>;
/**
* Post a frame callback to run on the next frame.
*
* @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
postFrameCallback(frameCallback: FrameCallback): void;
/**
* Post a frame callback to run on the next frame after the specified delay.
*
* @param { FrameCallback } frameCallback - The frame callback to run on the next frame.
* @param { number } delayTime - The delay time in milliseconds,
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 12
*/
postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void;
/**
* Require DynamicSyncScene by id.
*
* @param { string } id - The id of DynamicSyncScene.
* @returns { Array<DynamicSyncScene>} The instance of SwiperDynamicSyncScene.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
requireDynamicSyncScene(id: string): Array<DynamicSyncScene>;
/**
* Checks whether current font scale follows the system.
*
* @returns { boolean } Returns true if current font scale follows the system; returns false otherwise.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
isFollowingSystemFontScale(): boolean;
/**
* Get the max font scale.
*
* @returns { number } The max font scale.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
getMaxFontScale(): number;
/**
* Bind tabs to scrollable container component to automatically hide tab bar.
*
* @param { TabsController } tabsController - The controller of the tabs.
* @param { Scroller } scroller - The controller of the scrollable container component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void;
/**
* Unbind tabs from scrollable container component.
*
* @param { TabsController } tabsController - The controller of the tabs.
* @param { Scroller } scroller - The controller of the scrollable container component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void;
/**
* Bind tabs to nested scrollable container components to automatically hide tab bar.
*
* @param { TabsController } tabsController - The controller of the tabs.
* @param { Scroller } parentScroller - The controller of the parent scrollable container component.
* @param { Scroller } childScroller - The controller of the child scrollable container component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
/**
* Unbind tabs from nested scrollable container components.
*
* @param { TabsController } tabsController - The controller of the tabs.
* @param { Scroller } parentScroller - The controller of the parent scrollable container component.
* @param { Scroller } childScroller - The controller of the child scrollable container component.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 13
*/
unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void;
/**
* whether to enable or disable swipe to back event.
*
* @param { Optional<boolean> } enabled - enable or disable swipe to back event.
* @syscap SystemCapability.ArkUI.ArkUI.Circle
* @atomicservice
* @since 18
*/
enableSwipeBack(enabled: Optional<boolean>): void;
/**
* Obtains a [TextMenuController]{@link TextMenuController} object, which can be used to control the context menu on
* selection.
*
* @returns { TextMenuController } Obtained **TextMenuController** object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 16
*/
getTextMenuController(): TextMenuController;
/**
* Creates a UI instance that does not depend on a window and returns its UI context. The created UI instance is a
* singleton.
*
* > **NOTE**
* >
* > The returned UI context can only be used to create [custom nodes](docroot://ui/arkts-user-defined-node.md). It
* > cannot be used for other UI operations.
*
* @param { common.UIAbilityContext | common.ExtensionContext } context - Context corresponding to
* [UIAbility]{@link @ohos.app.ability.UIAbility} or
* [ExtensionAbility]{@link @ohos.app.ability.ExtensionAbility:ExtensionAbility}.
* @returns { UIContext | undefined } Context of the created UI instance, or **undefined** if creation fails.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* <br> 1. The number of parameters is incorrect.
* <br> 2. Invalid parameter type of context.
* @throws { BusinessError } 100001 - Internal error.
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 17
*/
static createUIContextWithoutWindow(context: common.UIAbilityContext | common.ExtensionContext): UIContext | undefined;
/**
* Destroys the UI instance created using
* [createUIContextWithoutWindow]{@link UIContext#createUIContextWithoutWindow}.
*
* @static
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 17
*/
static destroyUIContextWithoutWindow(): void;
/**
* Set the upper limit for the cache count of HSP resource management objects.
*
* If the upper limit of the cache is set too high, there is a risk of excessive memory overhead.
* It is recommended to configure it according to actual needs.
*
* @param { number } count - The cache limit of resource manager for HSP, must be non negative integers.
* @throws { BusinessError } 100101 - The parameter is less than 0.
* @throws { BusinessError } 100102 - The parameter value cannot be a floating point number.
* @throws { BusinessError } 100103 - The function cannot be called from a non main thread.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform [since 23]
* @atomicservice
* @since 21
*/
static setResourceManagerCacheMaxCountForHSP(count: number): void;
/**
* Obtains the unique ID of a UI instance object. In multi-instance scenarios, you can use this unique ID to
* distinguish between different UI instance objects for easier management.
*
* @returns { number } Unique ID of the backend instance. The value range is [-1, +∞).
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 22
*/
getId(): number;
/**
* Set custom keyboard continue feature.
*
* @param { CustomKeyboardContinueFeature } feature - The custom keyboard continue feature.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
setCustomKeyboardContinueFeature(feature: CustomKeyboardContinueFeature): void;
/**
* Obtains the root node of the page corresponding to the UIContext.
*
* @returns { FrameNode | null } FrameNode of the root node of the page or **null**.
* <br>If no valid FrameNode is available, **null** is returned.
* <br>If no page is loaded in the window, **null** is returned.
* @throws { BusinessError } 120007 - The UIContext is not available.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @FaAndStageModel
* @crossplatform
* @atomicservice
* @since 24
*/
getPageRootNode(): FrameNode | null;
/**
* Checks whether the current UI instance is in easy split mode.
*
* @returns { boolean } Returns true if the current UI instance is in easy split mode; returns false otherwise.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 24
*/
isEasySplit(): boolean;
/**
* Whether to enable or disable event passthrough.
*
* @param { boolean } enabled - enable or disable event passthrough. The default value is false.
* @param { RawInputEventType } eventType - the type of raw input event.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservicet
* @since 26.0.0
*/
enableEventPassthrough(enabled: boolean, eventType: RawInputEventType): void;
/**
* Sets the text selection clear policy for text component.
* Default policy: **TextSelectionClearPolicy.KEEP_SELECTED_TEXT_ON_EXTERNAL_TOUCH**
*
* @param { TextSelectionClearPolicy } policy - The text selection clear policy.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
setTextSelectionClearPolicy(policy: TextSelectionClearPolicy): void;
/**
* Get object smart gesture controller.
*
* @returns { SmartGestureController } object smart gesture controller.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 26.0.0
*/
getSmartGestureController(): SmartGestureController;
}
/**
* Enumerates the modes in which the layout responds when the keyboard is displayed.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
export const enum KeyboardAvoidMode {
/**
* Offset Type, the layout moves up.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
OFFSET = 0,
/**
* Resize Type, the layout is resized.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 11
*/
RESIZE = 1,
/**
* Offset Type, the layout moves up, and this adjustment also occurs if the caret position in the text box changes.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 14
*/
OFFSET_WITH_CARET = 2,
/**
* Resize Type, the layout moves up, and this adjustment also occurs if the caret position in the text box changes.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 14
*/
RESIZE_WITH_CARET = 3,
/**
* None Type, the layout is not adjusted to avoid the keyboard.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 14
*/
NONE = 4
}
/**
* Enum of TextSelectionClearPolicy
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export const enum TextSelectionClearPolicy {
/**
* Keep the selected text when touch outside of text component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
KEEP_SELECTED_TEXT_ON_EXTERNAL_TOUCH = 0,
/**
* Clear the selected text when touch outside of text component.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
CLEAR_SELECTED_TEXT_ON_EXTERNAL_TOUCH = 1
}
/**
* Enum of SwiperDynamicSyncSceneType
*
* @enum { number } SwiperDynamicSyncSceneType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
export const enum SwiperDynamicSyncSceneType {
/**
* Scene type is GESTURE.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
GESTURE = 0,
/**
* Scene type is ANIMATION.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 12
*/
ANIMATION = 1
}
/**
* Enum of scene type for Marquee
*
* @enum { number } MarqueeDynamicSyncSceneType
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 14
*/
export const enum MarqueeDynamicSyncSceneType {
/**
* Scene type is ANIMATION.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @atomicservice
* @since 14
*/
ANIMATION = 1
}
/**
* Provides the capability to control text menus.
*
* > **NOTE**
* >
* > - In the following non-static API examples, you must first use
* > [getTextMenuController()]{@link UIContext.getTextMenuController} in **UIContext** to obtain a
* > **TextMenuController** instance, and then call the APIs using the obtained instance.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 16
*/
export class TextMenuController {
/**
* Sets menu options.
*
* @param { TextMenuOptions } options - Menu options.
* <br>Default value: {showMode: TextMenuShowMode.DEFAULT}.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 16
*/
setMenuOptions(options: TextMenuOptions): void;
/**
* Disables all system service menu items in the text selection menu.
*
* > **NOTE**
* >
* > - This API takes effect globally for the entire application process after being called.
* >
* > - This API can be used in [UIAbility]{@link @ohos.app.ability.UIAbility}.
* >
* > - After this API is called, the [editMenuOptions]{@link TextAttribute#editMenuOptions} API of text components
* > will be affected. The parameter list of its [onCreateMenu]{@link EditMenuOptions.onCreateMenu} callback will not
* > include the disabled menu options.
* >
* > - Components involving text selection menus include the following: [Text]{@link ./@internal/component/ets/text},
* > [TextArea]{@link ./@internal/component/ets/text_area}, [TextInput]{@link ./@internal/component/ets/text_input},
* > [Search]{@link ./@internal/component/ets/search}, [RichEditor]{@link ./@internal/component/ets/rich_editor}, and
* > [Web]{@link ./@internal/component/ets/web}.
* >
* > - System service menu items refer to menu items other than copy, cut, select all, and paste in
* > [TextMenuItemId]{@link TextMenuItemId}.
* >
* > - When both **disableSystemServiceMenuItems** and **disableMenuItems** are set, the earlier-set
* > **disableSystemServiceMenuItems** takes precedence.
* >
* > - This API takes effect globally, and multiple calls are subject to the last call.
* >
* > - Disabled menus can be restored in the following ways:
* >
* > - If only **disableSystemServiceMenuItems(true)** is used to disable menus, set it to **false** to restore.
* >
* > - If only **disableMenuItems** is used to disable menus, set it to an empty array to restore.
* >
* > - If both **disableSystemServiceMenuItems** and **disableMenuItems** are used, set the former to **false** and
* > the latter to an empty array to restore.
*
* @param { boolean } disable - Whether to disable system service menu items. The value **true** means to disable
* system service menu items, and **false** means the opposite.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static disableSystemServiceMenuItems(disable: boolean): void;
/**
* Disables specified system service menu items in the text selection menu.
*
* > **NOTE**
* >
* > - This API takes effect globally for the entire application process after being called.
* >
* > - This API can be used in [UIAbility]{@link @ohos.app.ability.UIAbility}.
* >
* > - After this API is called, the [editMenuOptions]{@link TextAttribute#editMenuOptions} API of text components
* > will be affected. The parameter list of its [onCreateMenu]{@link EditMenuOptions.onCreateMenu} callback will not
* > include the disabled menu options.
* >
* > - Components involving text selection menus include the following: [Text]{@link ./@internal/component/ets/text},
* > [TextArea]{@link ./@internal/component/ets/text_area}, [TextInput]{@link ./@internal/component/ets/text_input},
* > [Search]{@link ./@internal/component/ets/search}, [RichEditor]{@link ./@internal/component/ets/rich_editor}, and
* > [Web]{@link ./@internal/component/ets/web}.
* >
* > - System service menu items refer to menu items other than copy, cut, select all, and paste in
* > [TextMenuItemId]{@link TextMenuItemId}.
* >
* > - When both **disableSystemServiceMenuItems** and **disableMenuItems** are set, the earlier-set
* > **disableSystemServiceMenuItems** takes precedence.
* >
* > - This API takes effect globally, and multiple calls are subject to the last call.
* >
* > - Disabling a first-level menu item will also disable all its second-level menu items. For example, disabling the
* > first-level menu item **autoFill** (parent item) in [TextMenuItemId]{@link TextMenuItemId} will simultaneously
* > disable the second-level menu item **passwordVault** (child item) in **TextMenuItemId**.
* >
* > - Disabling individual second-level menu items is not supported. If required, this can be achieved by disabling
* > the corresponding first-level menu item.
* >
* > - Disabled menus can be restored in the following ways:
* >
* > - If only **disableSystemServiceMenuItems(true)** is used to disable menus, set it to **false** to restore.
* >
* > - If only **disableMenuItems** is used to disable menus, set it to an empty array to restore.
* >
* > - If both **disableSystemServiceMenuItems** and **disableMenuItems** are used, set the former to **false** and
* > the latter to an empty array to restore.
*
* @param { Array<TextMenuItemId> } items - List of menu items to disable.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
static disableMenuItems(items: Array<TextMenuItemId>): void;
}
/**
* An enumeration type that identifies the current node's rendering state. The UI components used in
* the application are automatically managed by the system and controlled for participation in graphical
* rendering by either mounting them onto the render tree or removing them from it. Only nodes that
* participate in graphical rendering have the potential to be displayed. However, participating in
* rendering does not equal to the node's visibility, as there may be many occlusion scenarios in the
* actual implementation of the application. Nevertheless, if a node does not participate in rendering,
* it will definitely not be visible.
*
* @enum { number } NodeRenderState
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export const enum NodeRenderState {
/**
* The node has been mount on to the render tree and will soon be rendered. Generally, after the next frame,
* the user will be able to see this node. However, this is not always the case, as in reality, the node may be
* occluded by other nodes, meaning it is rendered but not be visible.
* When registering a listener for the render state using the UIObserver interface, the system will immediately
* trigger the callback once, and the state notified at this time typically represents the current state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
ABOUT_TO_RENDER_IN = 0,
/**
* The node has been removed from the render tree and will no longer be rendered shortly. Generally speaking,
* after the next frame, the user will no longer be able to see this node.
* When registering a listener for the render state using the UIObserver interface, the system will immediately
* trigger the callback once, and the state notified at this time typically represents the current state.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
ABOUT_TO_RENDER_OUT = 1
}
/**
* Enumerates triggering phases of gesture callbacks, corresponding to the action callbacks defined in **gesture.d.ts**.
* However, different gesture types support different phases (for example, **SwipeGesture** only includes the
* **WILL_START** enumerated value).
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export const enum GestureActionPhase {
/**
* The gesture has been successfully recognized by the system, and the action-start/action callback will be
* executed immediately.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
WILL_START = 0,
/**
* This indicates the gesture has been determined to be an end, which usually happens when the user lifts their
* fingers, ending the entire interaction, and the action-end callback will be executed immediately.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
WILL_END = 1
}
/**
* Enumerates the types of gestures to be listened for.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
export const enum GestureListenerType {
/**
* The tap gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
TAP = 0,
/**
* The long press gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
LONG_PRESS = 1,
/**
* The pan gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
PAN = 2,
/**
* The pinch gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
PINCH = 3,
/**
* The swipe gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
SWIPE = 4,
/**
* The rotation gesture.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 20
*/
ROTATION = 5
}
/**
* Enum of CustomKeyboardContinueFeature
*
* @enum { number } CustomKeyboardContinueFeature
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
export const enum CustomKeyboardContinueFeature {
/**
* Enable custom keyboard continuation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
ENABLED = 0,
/**
* Disable custom keyboard continuation.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 23
*/
DISABLED = 1
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.arkui.WithEnv.d.ts.md
# @ohos.arkui.WithEnv.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"),
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Define the WithEnv component that allows setting environment properties for child components.
* @kit ArkUI
*/
/**
* Define the WithEnv attribute functions.
*
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare class WithEnvAttribute {
/**
* Defining System Environment Variables
*
* @param { WritableSystemEnvKey<T> } key - Key for system environment variables.
* @param { T } value - Value of system environment variables.
* @returns { WithEnvAttribute } WithEnvAttribute object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
env<T>(key: WritableSystemEnvKey<T>, value: T): WithEnvAttribute;
/**
* Defining Custom Environment Variables
*
* @param { CustomEnvKey<T> } key - Key for custom environment variables.
* @param { T } value - Value of custom environment variables.
* @returns { WithEnvAttribute } WithEnvAttribute object.
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
customEnv<T>(key: CustomEnvKey<T>, value: T): WithEnvAttribute;
}
/**
* Define the WithEnv component's type.
*
* @typedef { function }
* @returns { WithEnvAttribute } WithEnvAttribute object
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @since 26.0.0
*/
export declare type WithEnvInterface = () => WithEnvAttribute;
/**
* Define the WithEnv component that allows setting environment properties for child components.
*
* @type { WithEnvInterface }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const WithEnv: WithEnvInterface;
/**
* Define WithEnv Logic Component Instance.
*
* @type { WithEnvAttribute }
* @syscap SystemCapability.ArkUI.ArkUI.Full
* @stagemodelonly
* @crossplatform
* @atomicservice
* @uicomponent
* @since 26.0.0
*/
export declare const WithEnvInstance: WithEnvAttribute;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.partnerAgent.d.ts.md
# @ohos.FusionConnectivity.partnerAgent.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ConnectivityKit
*/
import type common from './@ohos.bluetooth.common';
/**
* Provides APIs for managing partner agents.
*
* @namespace partnerAgent
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
declare namespace partnerAgent {
/**
* Checks whether the current device supports the partner agent feature.
*
* @returns { boolean } Check result for the support of the partner agent feature.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function isPartnerAgentSupported(): boolean;
/**
* Bind the partner device.
* After successfully binding the device, if the device meets the discovery requirements,
* the {@link PartnerAgentExtensionAbility} of the application will be launched.
* - If the {@link DeviceCapability.supportBR} in the capability variable is set to true,
* the application's ability will be launched when the device is connected via Bluetooth.
* - If the {@link DeviceCapability.supportBleAdvertiser} in the capability variable is set to true,
* the application's ability will be launched when the device is detected via Bluetooth scanning.
*
* Note: The device must be paired first.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @param { PartnerDeviceAddress } deviceAddress - The address of partner device.
* @param { DeviceCapability } deviceCapability - The capability of partner device.
* @param { BusinessCapability } businessCapability - The business capability of application.
* @param { string } partnerAgentExtensionAbilityName - The name of PartnerAgentExtensionAbility.
* @returns { Promise<void> } Promise used to return the result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900003 - The device is not paired.
* @throws { BusinessError } 34900004 - The device has already been bound to the PartnerAgentExtensionAbility.
* @throws { BusinessError } 34900005 - Bluetooth disabled.
* @throws { BusinessError } 34900099 - Internal error.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function bindDevice(deviceAddress: PartnerDeviceAddress, deviceCapability: DeviceCapability, businessCapability: BusinessCapability, partnerAgentExtensionAbilityName: string): Promise<void>;
/**
* Unbinds a partner device.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @param { PartnerDeviceAddress } deviceAddress - The address of partner device.
* @returns { Promise<void> } Promise used to return the result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900001 - The device is not bound.
* @throws { BusinessError } 34900099 - Internal error.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function unbindDevice(deviceAddress: PartnerDeviceAddress): Promise<void>;
/**
* Checks whether a device is bound to this application.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @param { PartnerDeviceAddress } deviceAddress - The address of partner device.
* @returns { boolean } Returns whether the device is bound.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900099 - Internal error.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function isDeviceBound(deviceAddress: PartnerDeviceAddress): boolean;
/**
* Gets the list of addresses of the bound partner device for this application.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @returns { PartnerDeviceAddress[] } Returns the list of addresses of partner device.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900099 - Internal error.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function getBoundDevices(): PartnerDeviceAddress[];
/**
* Checks whether device control is enabled.
*
* @permission ohos.permission.ACCESS_BLUETOOTH
* @param { PartnerDeviceAddress } deviceAddress - The address of partner device.
* @returns { boolean } Returns whether the device control is enabled.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900099 - Internal error.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
function isDeviceControlEnabled(deviceAddress: PartnerDeviceAddress): boolean;
/**
* Describes the capability of a partner device.
*
* @typedef DeviceCapability
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
interface DeviceCapability {
/**
* Whether the partner device supports the Bluetooth Basic Rate (BR) capability.
*
* @type { ?boolean }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
supportBR?: boolean;
/**
* Whether the partner device supports the Bluetooth Low Energy (BLE) advertiser capability.
*
* @type { ?boolean }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
supportBleAdvertiser?: boolean;
}
/**
* Describes the business capabilities of the application.
*
* @typedef BusinessCapability
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
interface BusinessCapability {
/**
* Indicates whether the application supports media control capability.
*
* @type { ?boolean }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
supportMediaControl?: boolean;
/**
* Indicates whether the application supports telephony control capability.
*
* @type { ?boolean }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
supportTelephonyControl?: boolean;
}
/**
* Describes the partner device address.
*
* @typedef PartnerDeviceAddress
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
export interface PartnerDeviceAddress {
/**
* Bluetooth address of the partner device.
*
* @type { ?common.BluetoothAddress }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
bluetoothAddress?: common.BluetoothAddress;
}
/**
* The enum of reasons for destroying partner agent extension ability.
*
* @enum { number }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
export enum PartnerAgentExtensionAbilityDestroyReason {
/**
* Unknown reason.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
UNKNOWN_REASON = 0,
/**
* The user actively disables this ability feature.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
USER_CLOSED_ABILITY = 1,
/**
* The device is unpaired.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
DEVICE_UNPAIRED = 2,
/**
* The device is lost.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
DEVICE_LOST = 3,
/**
* Bluetooth is disabled.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
BLUETOOTH_DISABLED = 4
}
}
export default partnerAgent;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionAbility.d.ts.md
# @ohos.FusionConnectivity.PartnerAgentExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ConnectivityKit
*/
import type PartnerAgentExtensionContext from './@ohos.FusionConnectivity.PartnerAgentExtensionContext';
import ExtensionAbility from './@ohos.app.ability.ExtensionAbility';
/**
* Partner device address.
*
* @typedef { partnerAgent.PartnerDeviceAddress } PartnerDeviceAddress
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
type PartnerDeviceAddress = partnerAgent.PartnerDeviceAddress;
/**
* The reasons for destroying partner agent extension ability.
*
* @typedef { partnerAgent.PartnerAgentExtensionAbilityDestroyReason } PartnerAgentExtensionAbilityDestroyReason
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
type PartnerAgentExtensionAbilityDestroyReason = partnerAgent.PartnerAgentExtensionAbilityDestroyReason;
/**
* Class for the PartnerAgentExtensionAbility.
* Applications can use this ability to discover devices.
*
* @extends ExtensionAbility
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
export default class PartnerAgentExtensionAbility extends ExtensionAbility {
/**
* Context of the PartnerAgentExtensionAbility.
*
* @type { PartnerAgentExtensionContext }
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
context: PartnerAgentExtensionContext;
/**
* Called when the PartnerAgentExtensionAbility is to be destroyed.
* Applications can clean up resources in this callback function.
*
* @param { PartnerAgentExtensionAbilityDestroyReason } reason - The reason for Ability destruction.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
onDestroyWithReason(reason: PartnerAgentExtensionAbilityDestroyReason): void;
/**
* Called when a device is discovered.
*
* @param { PartnerDeviceAddress } deviceAddress Address of the discovered device.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
onDeviceDiscovered(deviceAddress: PartnerDeviceAddress): void;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionContext.d.ts.md
# @ohos.FusionConnectivity.PartnerAgentExtensionContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ConnectivityKit
*/
import type ExtensionContext from './application/ExtensionContext';
/**
* Class for the context of the PartnerAgentExtensionAbility.
*
* @extends ExtensionContext
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 23
*/
export default class PartnerAgentExtensionContext extends ExtensionContext {
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.FusionConnectivity.ranging.d.ts.md
# @ohos.FusionConnectivity.ranging.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file Ranging Module
* @kit ConnectivityKit
*/
import type { Callback } from './@ohos.base';
/**
* Provides APIs for Fusion Connectivity ranging.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
declare namespace ranging {
/**
* Checks whether the current device supports the ranging feature.
*
* @returns { boolean } true indicates that the device supports the ranging capability,
* and false indicates that the device does not support the ranging capability.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function isRangingSupported(): boolean;
/**
* Queries whether the current device supports ranging capability.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @returns { Promise<RangingCapabilitySupported> } Promise used to return the result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900053 - The ranging service is disabled.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function getRangingCapability(): Promise<RangingCapabilitySupported>;
/**
* Initiates ranging with a specified device.
* If the link to the target device is already established, ranging starts directly.
* If not connected, this interface will:
* 1. Attempt to establish connection and perform pairing/encryption.
* 2. Query service to verify the device supports ranging. Initiate ranging upon confirmation.
* Ranging state updates are notified via onRangingStateChange callback.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { RangingParams } params - Parameters for ranging.
* @param { Callback<RangingResult> } callback - Indicates the callback for reporting the ranging result.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900051 - The device has already initiated ranging.
* @throws { BusinessError } 34900052 - The specified type of ranging service is not supported.
* @throws { BusinessError } 34900053 - The ranging service is disabled.
* @throws { BusinessError } 34900054 - The parameter value does not meet specifications.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function startRanging(params: RangingParams, callback: Callback<RangingResult>): void;
/**
* Stops ongoing ranging operations.
* If no target device is specified, stops ranging for all devices associated with the callback.
* If a target device is specified, only stops ranging for that specific device.
* This method also releases all occupied resources. For proper resource management,
* stopRanging must be called after startRanging to avoid resource leaks.
* State changes are notified via the onRangingStateChange callback.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { Callback<RangingResult> } callback - Callback used to return the ranging result.
* @param { RangingParams } [params] - Parameters for ranging include deviceId and ranging types.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900050 - The device has not initiated ranging.
* @throws { BusinessError } 34900052 - The specified type of ranging service is not supported.
* @throws { BusinessError } 34900054 - The parameter value does not meet specifications.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function stopRanging(callback: Callback<RangingResult>, params?: RangingParams): void;
/**
* Starts passive ranging mode.
*
* Upon successful startup, returns a handle identifier for the passive ranging session
* and begins broadcasting ranging packets.
*
* The returned handle can be used to stop the passive ranging broadcast via stopPassiveRanging.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { RangingTypes } capabilityType - Indicates the capability type for ranging.
* @returns { Promise<number> } Promise used to return the handle for starts ranging listening.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900052 - The specified type of ranging service is not supported.
* @throws { BusinessError } 34900053 - The ranging service is disabled.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function startPassiveRanging(capabilityType: RangingTypes): Promise<number>;
/**
* Stops passive ranging mode.
*
* Stops the passive ranging broadcast and cleans up associated resources
* based on the specified handle and ranging capability type.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { number } handle - Indicates the handle number of ranging monitoring.
* @param { RangingTypes } capabilityType - Indicates the capability type for ranging.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900052 - The specified type of ranging service is not supported.
* @throws { BusinessError } 34900054 - The parameter value does not meet specifications.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function stopPassiveRanging(handle: number, capabilityType: RangingTypes): void;
/**
* Registers a callback to receive ranging state change notifications.
*
* Notifies state changes for both active ranging and passive ranging operations.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { Callback<RangingStateChangeInfo> } callback - Callback used to listen for the ranging state.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function onRangingStateChange(callback: Callback<RangingStateChangeInfo>): void;
/**
* Unsubscribe from ranging state change events.
*
* @permission ohos.permission.ACCESS_NEARLINK
* @param { Callback<RangingStateChangeInfo> } [callback] - Callback used to listen to the ranging state.
* @throws { BusinessError } 201 - Permission denied.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 34900099 - Internal system error. For example, Internal object is invalid.
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
function offRangingStateChange(callback?: Callback<RangingStateChangeInfo>): void;
/**
* Parameters for ranging operation.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
interface RangingParams {
/**
* Address of the ranging device.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
deviceId: string;
/**
* Indicates the capability type for ranging.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
capabilityType: RangingTypes;
}
/**
* Describes the ranging state change information.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
interface RangingStateChangeInfo {
/**
* Ranging state.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
state: RangingState;
/**
* Cause of ranging stop.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
cause: RangingStoppedCause;
/**
* Address of the ranging device.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
deviceId?: string;
/**
* Indicates the handle number of ranging monitoring.
* The value should be an integer.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
handle?: number;
}
/**
* Describes the contents of the ranging results.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
interface RangingResult {
/**
* Address of the ranging device.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
deviceId: string;
/**
* The distance measured by the ranging output.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
distance: RangingMeasurement;
/**
* Azimuth angle output from ranging.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
angle: RangingMeasurement;
/**
* Received signal strength.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
rssi: number;
}
/**
* Describes the contents of the ranging support types.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
interface RangingCapabilitySupported {
/**
* Indicates whether the Nearlink HADM ranging type supported.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
nearlinkHadm: boolean;
}
/**
* Describes the measurement result.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
interface RangingMeasurement {
/**
* Measurement result value. The value is expressed in centimeters.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
value: number;
/**
* Confidence level of measurement results.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
confidence: RangingConfidence;
}
/**
* The enumeration of ranging capability types.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
enum RangingTypes {
/**
* Nearlink HADM ranging type. This process will trigger automatic link establishment.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
NEARLINK_HADM = 1
}
/**
* The enum of ranging state.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
enum RangingState {
/**
* The current ranging state is stopped.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
RANGING_STOPPED = 0,
/**
* The current ranging state is started.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
RANGING_STARTED = 1
}
/**
* The enum of ranging stopped causes.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
enum RangingStoppedCause {
/**
* No error.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
NO_ERROR = 0,
/**
* An internal error occurred.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
INTERNAL_ERROR = 1,
/**
* A service conflict occurs.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
BUSINESS_CONFLICT = 2,
/**
* Ranging is stopped when the app goes to background.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
BACKGROUND_PAUSED = 3
}
/**
* The enum of ranging measurement confidence.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
enum RangingConfidence {
/**
* High confidence measurement.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
HIGH = 0,
/**
* Medium confidence measurement.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
MEDIUM = 1,
/**
* low confidence measurement.
*
* @syscap SystemCapability.Communication.FusionConnectivity.Core
* @stagemodelonly
* @since 26.0.0
*/
LOW = 2
}
}
export default ranging;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodExtensionAbility.d.ts.md
# @ohos.InputMethodExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit IMEKit
*/
import Want from './@ohos.app.ability.Want';
import type InputMethodExtensionContext from './@ohos.InputMethodExtensionContext';
/**
* The **InputMethodExtensionAbility** module provides APIs for developing input methods and managing the lifecycle of
* input method extensions.
*
* > **NOTE**
* >
* > - The APIs of this module can be used only in the stage model.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
declare class InputMethodExtensionAbility {
/**
* Context of the **InputMethodExtension**, which is inherited from **ExtensionContext**.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
context: InputMethodExtensionContext;
/**
* Called when the **InputMethodExtensionAbility** is started to implement initialization.
*
* @param { Want } want - Information related to the **InputMethodExtensionAbility**, including the ability name and
* bundle name.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
onCreate(want: Want): void;
/**
* Called when this **InputMethodExtensionAbility** is destroyed to clear resources.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
onDestroy(): void;
}
export default InputMethodExtensionAbility;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodExtensionContext.d.ts.md
# @ohos.InputMethodExtensionContext.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit IMEKit
*/
import { AsyncCallback } from './@ohos.base';
import Want from './@ohos.app.ability.Want';
import ExtensionContext from './application/ExtensionContext';
/**
* The **InputMethodExtensionContext** module, inherited from **ExtensionContext**, provides context for
* **InputMethodExtension** abilities. You can use the APIs of this module to start, terminate, connect, and disconnect
* abilities.
*
* > **NOTE**
* >
* > - The APIs of this module can be used only in the stage model.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
declare class InputMethodExtensionContext extends ExtensionContext {
/**
* Destroys this input method. This API uses an asynchronous callback to return the result.
*
* @param { AsyncCallback<void> } callback - Callback used to return the result. If the operation is successful,
* **err** is **undefined**. Otherwise, **err** is an error object.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
destroy(callback: AsyncCallback<void>): void;
/**
* Destroys this input method. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 9
*/
destroy(): Promise<void>;
/**
* Starts an ability. This API uses a promise to return the result.
*
* @param { Want } want - Want information, including the ability name and bundle name of the target application.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes:
* 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed.
* @throws { BusinessError } 16000001 - The specified ability does not exist.
* @throws { BusinessError } 16000002 - Incorrect ability type.
* @throws { BusinessError } 16000004 - Cannot start an invisible component.
* @throws { BusinessError } 16000005 - The specified process does not have the permission.
* @throws { BusinessError } 16000006 - Cross-user operations are not allowed.
* @throws { BusinessError } 16000008 - The crowdtesting application expires.
* @throws { BusinessError } 16000009 - An ability cannot be started or stopped in Wukong mode.
* @throws { BusinessError } 16000010 - The call with the continuation and prepare continuation flag is forbidden.
* @throws { BusinessError } 16000011 - The context does not exist.
* @throws { BusinessError } 16000012 - The application is controlled.
* @throws { BusinessError } 16000013 - The application is controlled by EDM.
* @throws { BusinessError } 16000019 - No matching ability is found.
* @throws { BusinessError } 16000050 - Internal error.
* @throws { BusinessError } 16000053 - The ability is not on the top of the UI.
* @throws { BusinessError } 16000055 - Installation-free timed out.
* @throws { BusinessError } 16000061 - Operation not supported.
* @throws { BusinessError } 16000069 - The extension cannot start the third party application.
* @throws { BusinessError } 16000070 - The extension cannot start the service.
* @throws { BusinessError } 16200001 - The caller has been released.
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @stagemodelonly
* @since 12
*/
startAbility(want: Want): Promise<void>;
}
export default InputMethodExtensionContext;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.InputMethodSubtype.d.ts.md
# @ohos.InputMethodSubtype.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2025 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit IMEKit
*/
/**
* The **InputMethodSubtype** module provides APIs for managing the attributes of input method subtypes. The input
* method subtype allows the input method to switch to a specific mode or language, for example, the Chinese or English
* keyboard.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
export default interface InputMethodSubtype {
/**
* Optional. Label of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly label?: string;
/**
* Optional. Label ID of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 10
*/
readonly labelId?: number;
/**
* Mandatory. Bundle name of the application to which the input method subtype belongs.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly name: string;
/**
* Mandatory. ID of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly id: string;
/**
* Optional. Mode of the input method subtype, including **upper** (uppercase) and **lower** (lowercase).
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly mode?: 'upper' | 'lower';
/**
* Mandatory. Locale of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly locale: string;
/**
* Mandatory. Language of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly language: string;
/**
* Optional. Icon of the input method subtype. It can be obtained by using **iconId**. This parameter is reserved.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly icon?: string;
/**
* Optional. Icon ID of the input method subtype.
*
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
readonly iconId?: number;
/**
* Mandatory. Extra information of the input method subtype.
*
* **NOTE**
*
* - This parameter is optional since API version 10.
* - This parameter is reserved and currently has no specific meaning.
*
* @type { object } [since 9 - 9]
* @type { ?object } [since 10]
* @syscap SystemCapability.MiscServices.InputMethodFramework
* @since 9
*/
extra?: object;
}
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.PiPWindow.d.ts.md
# @ohos.PiPWindow.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @file
* @kit ArkUI
*/
import type BaseContext from './application/BaseContext';
import type { Callback } from './@ohos.base';
import { NodeController } from './arkui/NodeController';
import { typeNode } from './arkui/FrameNode';
/**
* The module provides basic APIs for manipulating Picture in Picture (PiP). For example, you can use the APIs to check
* whether the PiP feature is supported and create a PiP controller to start or stop a PiP window. PiP is mainly used in
* video playback, video calls, or video meetings.
*
* > **NOTE**
* >
* > - Before <!--RP2-->OpenHarmony 6.0<!--RP2End-->, the PiP feature was supported only on phones and tablets. Starting
* > from <!--RP2-->OpenHarmony 6.0<!--RP2End-->, the PiP feature is supported on phones, PCs/2-in-1 devices, tablets,
* > but is unavailable on all other devices.
* >
* > - For the system capability SystemCapability.Window.SessionManager, use
* > [canIUse()]{@link canIUse} to check whether the device supports this system
* > capability and the corresponding APIs.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
declare namespace PiPWindow {
/**
* Checks whether the current device supports the PiP feature.
*
* @returns { boolean } Check result for whether the PiP feature is supported. **true** if supported, **false**
* otherwise.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
function isPiPEnabled(): boolean;
/**
* Creates a PiP controller. This API uses a promise to return the result.
*
* @param { PiPConfiguration } config - Options for creating the PiP controller. This parameter cannot be empty, and
* **context** and **componentController** that are used to construct this parameter cannot be empty. When
* constructing this parameter, **templateType** (if specified) must be a value defined in
* [PiPTemplateType]{@link PiPWindow.PiPTemplateType}, and **controlGroups** (if specified) must match the value
* of **templateType**. For details, see [PiPControlGroup]{@link PiPWindow.PiPControlGroup}.
* @returns { Promise<PiPController> } Promise used to return the PiP controller.
* @throws { BusinessError } 401 - Params error. Possible causes:
* <br>1. Mandatory parameters are left unspecified.
* <br>2. Incorrect parameter types.
* <br>3. Parameter verification failed
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
function create(config: PiPConfiguration): Promise<PiPController>;
/**
* Creates a PiP controller. This API uses **typeNode** to add a custom UI node for PiP. This API uses a promise to
* return the result.
*
* @param { PiPConfiguration } config - Options for creating the PiP controller. This parameter cannot be empty, and
* **context** that is used to construct this parameter cannot be empty. When constructing this parameter,
* **templateType** (if specified) must be a value defined in [PiPTemplateType]{@link PiPWindow.PiPTemplateType},
* and **controlGroups** (if specified) must match the value of **templateType**. For details, see
* [PiPControlGroup]{@link PiPWindow.PiPControlGroup}.
* @param { typeNode.XComponent } contentNode - Content to be rendered in the PiP window. The parameter value cannot
* be empty.
* @returns { Promise<PiPController> } Promise used to return the PiP controller.
* @throws { BusinessError } 401 - Params error. Possible causes:
* <br>1. Mandatory parameters are left unspecified.
* <br>2. Incorrect parameter types.
* <br>3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
function create(config: PiPConfiguration, contentNode: typeNode.XComponent): Promise<PiPController>;
/**
* Defines the parameters for creating a PiP controller.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
interface PiPConfiguration {
/**
* Context environment.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
context: BaseContext;
/**
* Original [XComponent]{@link XComponent} controller.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
componentController: XComponentController;
/**
* ID of the **Navigation** component. If no value is passed, the page does not need to be cached.
*
* 1. When the UIAbility uses [Navigation]{@link Navigation} to manage pages,
* set the ID of the **Navigation** component for the PiP controller.
* This ensures that the original page can be restored from the PiP window.
* 2. When the UIAbility uses [Router]{@link @ohos.router:router} to manage pages,
* you do not need to set the ID of the **Navigation** component for the PiP controller.
* 3. If the UIAbility has only one page, you do not need to set the navigation ID.
* The original page can be restored from the PiP window.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
navigationId?: string;
/**
* ID of the subpage under the **Navigation** component. After the Full-screen Window button is touched,
* the specified page is restored. This parameter applies only in scenarios where the UIAbility
* uses [Navigation]{@link Navigation} to manage pages. It can be set to any subpage ID
* within the Navigation hierarchy. The default value is **-1**, indicating that the topmost page in the Navigation
* stack is restored. You are advised to use [getUniqueId()]{@link BaseCustomComponent#getUniqueId} to obtain the
* page ID. When you use page routing provided by [Navigation]{@link Navigation}, you are
* advised to use the [system routing table](docroot://ui/arkts-navigation-cross-package.md#system-routing-table).
* Otherwise, the page ID obtained by calling [getUniqueId()]{@link BaseCustomComponent#getUniqueId}
* may be incorrect.
*
* @default -1
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 22
*/
handleId?: number;
/**
* Template type, which is used to distinguish video playback, video call, video meeting, and live broadcast
* scenarios. If no value is passed, the video playback template is used by default.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
templateType?: PiPTemplateType;
/**
* Width of the original content, in px. It is used to determine the aspect ratio of the PiP window. When the PiP
* controller is created in
* [typeNode mode]{@link PiPWindow.create(config: PiPConfiguration, contentNode: typeNode.XComponent)}, the default
* value is 1920. When the PiP controller is created
* [not in typeNode mode]{@link PiPWindow.create(config: PiPConfiguration)}, the default value is the width of the
* [XComponent]{@link XComponent}.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
contentWidth?: number;
/**
* Height of the original content, in px. It is used to determine the aspect ratio of the PiP window. When the PiP
* controller is created in
* [typeNode mode]{@link PiPWindow.create(config: PiPConfiguration, contentNode: typeNode.XComponent)}, the default
* value is 1080. When the PiP controller is created
* [not in typeNode mode]{@link PiPWindow.create(config: PiPConfiguration)}, the default value is the height of the
* [XComponent]{@link XComponent}.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
contentHeight?: number;
/**
* A list of optional component groups of the PiP controller. An application can configure whether to display these
* optional components. If this parameter is not set for the application, the panel displays basic components (such
* as the play/pause component of the video playback component group). If this parameter is set for the application,
* a maximum of three components can be selected. If more than three controls are selected, error code 401 is
* reported by the API.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
controlGroups?: Array<PiPControlGroup>;
/**
* Custom UI controller, which is used to implement the custom UI features on the PiP page. If this parameter is
* left empty, the custom UI features are not used by default.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
customUIController?: NodeController;
/**
* A page-level UI state storage unit. In multi-instance scenarios, it can be used to track the UI state storage
* object of the main window instance. If no value is passed, you cannot retrieve the main window's UI storage
* object through the PiP window.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 17
*/
localStorage?: LocalStorage;
/**
* Size of the PiP window that the current app starts for the first time.
*
* **0**: no size is set. The PiP window is started based on the size before the PiP window of the previous
* application is closed.
*
* **1**: small window.
*
* **2**: large window.
*
* If no value is passed, **0** is used.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 19
*/
defaultWindowSizeType?: number;
/**
* Whether the PiP window automatically snaps to screen corners. When this feature is enabled, the screen is divided
* into four hot zones (top-left, top-right, bottom-left, and bottom-right). When users lift their finger while
* dragging the PiP window within a hot zone, the PiP window is automatically snapped to the nearest corner.
*
* **true**: enables corner snapping.
*
* **false**: disables corner snapping.
*
* The default value is **true**.
*
* This API can be properly called on phones and tablets. If it is called on other device types, it has no effect.
*
* @default true
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 22
*/
cornerAdsorptionEnabled?: boolean;
}
/**
* Describes the size of a PiP window.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
interface PiPWindowSize {
/**
* Window width, in px. The value must be a positive integer and cannot be greater than the screen width.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
width: number;
/**
* Window height, in px. The value must be a positive integer and cannot be greater than the screen height.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
height: number;
/**
* Scale factor of the window, representing the display size relative to the width and height. The value is a
* floating-point number in the range (0.0, 1.0]. The value **1** means that the window matches the specified width
* and height.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
scale: number;
}
/**
* Describes the PiP window information.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
interface PiPWindowInfo {
/**
* ID of the PiP window.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
windowId: number;
/**
* Size of the PiP window.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
size: PiPWindowSize;
}
/**
* Enumerates the PiP template types.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
enum PiPTemplateType {
/**
* Video playback template. A PiP window will be started during video playback, and the video playback template will
* be loaded. The template contains the play/pause component by default.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
VIDEO_PLAY = 0,
/**
* Video call template. A PiP window will be started during a video call, and the video call template will be
* loaded.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
VIDEO_CALL = 1,
/**
* Video meeting template. A PiP window will be started during a video meeting, and the video meeting template will
* be loaded.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
VIDEO_MEETING = 2,
/**
* Live template. A PiP window will be started during a live, and the live template is loaded.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
VIDEO_LIVE = 3
}
/**
* Enumerates the PiP states.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
enum PiPState {
/**
* PiP is about to start.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
ABOUT_TO_START = 1,
/**
* PiP is started.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
STARTED = 2,
/**
* PiP is about to stop.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
ABOUT_TO_STOP = 3,
/**
* PiP is stopped.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
STOPPED = 4,
/**
* The original page is about to restore.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
ABOUT_TO_RESTORE = 5,
/**
* An error occurs during the execution of the PiP lifecycle.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
ERROR = 6
}
/**
* Describes the optional component groups of the PiP controller. An application can configure whether to display
* these optional components. This API must match [PiPTemplateType]{@link PiPWindow.PiPTemplateType} when being used.
* Otherwise, the [create]{@link PiPWindow.create(config: PiPConfiguration)} API returns error code 401.
*
* @unionmember { VideoPlayControlGroup } Video playback component group.
* @unionmember { VideoCallControlGroup } Video call component group.
* @unionmember { VideoMeetingControlGroup } Video meeting component group.
* @unionmember { VideoLiveControlGroup } Live video component group.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
type PiPControlGroup = VideoPlayControlGroup | VideoCallControlGroup | VideoMeetingControlGroup | VideoLiveControlGroup;
/**
* Enumerates the video playback component groups. They are used only when
* [PiPTemplateType]{@link PiPWindow.PiPTemplateType} is set to **VIDEO_PLAY**.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum VideoPlayControlGroup {
/**
* Previous/Next component group for video playback.
*
* This component group is mutually exclusive with the fast-forward/rewind component group. It cannot be added if
* the fast-forward/rewind component group is added.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
VIDEO_PREVIOUS_NEXT = 101,
/**
* Fast-forward/Rewind component group for video playback.
*
* This component group is mutually exclusive with the previous/next component group. It cannot be added if the
* previous/next component group is added.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
FAST_FORWARD_BACKWARD = 102
}
/**
* Enumerates the video call component groups. They are used only when
* [PiPTemplateType]{@link PiPWindow.PiPTemplateType} is set to **VIDEO_CALL**.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum VideoCallControlGroup {
/**
* Microphone on/off component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MICROPHONE_SWITCH = 201,
/**
* Hang-up component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
HANG_UP_BUTTON = 202,
/**
* Camera on/off component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
CAMERA_SWITCH = 203,
/**
* Mute/Unmute component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MUTE_SWITCH = 204
}
/**
* Enumerates the video meeting component groups. They are used only when
* [PiPTemplateType]{@link PiPWindow.PiPTemplateType} is set to **VIDEO_MEETING**.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum VideoMeetingControlGroup {
/**
* Hang-up component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
HANG_UP_BUTTON = 301,
/**
* Camera on/off component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
CAMERA_SWITCH = 302,
/**
* Mute/Unmute component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MUTE_SWITCH = 303,
/**
* Microphone on/off component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MICROPHONE_SWITCH = 304
}
/**
* Enumerates the live video component groups. They are used only when
* [PiPTemplateType]{@link PiPWindow.PiPTemplateType} is set to **VIDEO_LIVE**.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum VideoLiveControlGroup {
/**
* Play/Pause component group for live video.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
VIDEO_PLAY_PAUSE = 401,
/**
* Mute/Unmute component group.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MUTE_SWITCH = 402
}
/**
* Enumerates the statuses of components displayed on the PiP controller.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum PiPControlStatus {
/**
* Play.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
PLAY = 1,
/**
* Pause.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
PAUSE = 0,
/**
* Open.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
OPEN = 1,
/**
* Close.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
CLOSE = 0
}
/**
* Enumerates the types of components displayed on the PiP controller.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
enum PiPControlType {
/**
* Play/Pause component group for live video.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
VIDEO_PLAY_PAUSE = 0,
/**
* Previous component in video scenarios.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
VIDEO_PREVIOUS = 1,
/**
* Next component in video scenarios.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
VIDEO_NEXT = 2,
/**
* Fast-forward component in video scenarios.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
FAST_FORWARD = 3,
/**
* Rewind component in video scenarios.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
FAST_BACKWARD = 4,
/**
* Hang-up component.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
HANG_UP_BUTTON = 5,
/**
* Microphone on/off component.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MICROPHONE_SWITCH = 6,
/**
* Camera on/off component.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
CAMERA_SWITCH = 7,
/**
* Mute/Unmute component.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
MUTE_SWITCH = 8
}
/**
* Enumerates the types of action events of the PiP controller.
*
* @unionmember { PiPVideoActionEvent } Action event for components displayed on the video playback controller.
* @unionmember { PiPCallActionEvent } Action event for components displayed on the video call controller.
* @unionmember { PiPMeetingActionEvent } Action event for components displayed on the video meeting controller.
* @unionmember { PiPLiveActionEvent } Action event for components displayed on the live video controller.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
type PiPActionEventType = PiPVideoActionEvent | PiPCallActionEvent | PiPMeetingActionEvent | PiPLiveActionEvent;
/**
* Defines the PiP action event during video playback.
*
* @unionmember { 'playbackStateChanged' } The playback status changes.
* @unionmember { 'nextVideo' } Plays the next video.
* @unionmember { 'previousVideo' } Plays the previous video.
* @unionmember { 'fastForward' } Fast forwards the video. This value is supported since API version 12. [since 12]
* @unionmember { 'fastBackward' } Rewinds the video. This value is supported since API version 12. [since 12]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
type PiPVideoActionEvent = 'playbackStateChanged' | 'nextVideo' | 'previousVideo' | 'fastForward' | 'fastBackward';
/**
* Defines the PiP action event in a video call.
*
* @unionmember { 'hangUp' } The video call is hung up.
* @unionmember { 'micStateChanged' } The microphone is muted or unmuted.
* @unionmember { 'videoStateChanged' } The camera is turned on or off.
* @unionmember { 'voiceStateChanged' } The speaker is muted or unmuted. [since 12]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
type PiPCallActionEvent = 'hangUp' | 'micStateChanged' | 'videoStateChanged' | 'voiceStateChanged';
/**
* Defines the PiP action event in a video meeting.
*
* @unionmember { 'hangUp' } The video meeting is hung up.
* @unionmember { 'voiceStateChanged' } The speaker is muted or unmuted.
* @unionmember { 'videoStateChanged' } The camera is turned on or off.
* @unionmember { 'micStateChanged' } The microphone is muted or unmuted. [since 12]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
type PiPMeetingActionEvent = 'hangUp' | 'voiceStateChanged' | 'videoStateChanged' | 'micStateChanged';
/**
* Defines the PiP action event in a live.
*
* @unionmember { 'playbackStateChanged' } The live is played or paused.
* @unionmember { 'voiceStateChanged' } The speaker is muted or unmuted. [since 12]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
type PiPLiveActionEvent = 'playbackStateChanged' | 'voiceStateChanged';
/**
* Describes the action event callback of the PiP controller.
*
* @param { PiPActionEventType } event - Type of the action event of the PiP controller.
* <br>The application performs processing based on the action event. For example,
* if the **'playbackStateChanged'** event is triggered, the application starts or stops the video.
* @param { number } [status] - Status of a component that can be switched. For example, for a microphone on/off
* component group, a camera on/off component group, and a mute/unmute component group, the value **1** means that
* the component is enabled and **0** means that the component is disabled. For other components, the default
* value **-1** is used.
* The value should be an integer.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
type ControlPanelActionEventCallback = (event: PiPActionEventType, status?: number) => void;
/**
* Describes the parameters in the callback of the action event of the PiP controller.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
interface ControlEventParam {
/**
* Type of the action event of the PiP controller. The application performs processing based on the component type.
* For example, if the video play/pause component is touched, the application starts or stops the video.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
controlType: PiPControlType;
/**
* Status of a component that can be switched. For example, for a microphone on/off component group, a camera on/off
* component group, and a mute/unmute component group, the value **PiPControlStatus.PLAY** means that the component
* is enabled and **PiPControlStatus.PAUSE** means that the component is disabled. For the hang-up component, the
* default value is **-1**.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
status?: PiPControlStatus;
}
/**
* Implements a PiP controller that starts, stops, or updates a PiP window and registers callbacks.
*
* Before calling any of the following APIs, you must use
* [PiPWindow.create()]{@link PiPWindow.create(config: PiPConfiguration)} to create a PiPController instance.
*
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
interface PiPController {
/**
* Starts a PiP window. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 1300012 - The PiP window state is abnormal.
* @throws { BusinessError } 1300013 - Failed to create the PiP window.
* @throws { BusinessError } 1300014 - PiP internal error.
* @throws { BusinessError } 1300015 - Repeated PiP operation.
* @throws { BusinessError } 1300034 - This operation conflicts with other floating windows. Possible cause:
* App has already started float view. [since 26.0.0]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
startPiP(): Promise<void>;
/**
* Stops a PiP window. This API uses a promise to return the result.
*
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 1300011 - Failed to destroy the PiP window.
* @throws { BusinessError } 1300012 - The PiP window state is abnormal.
* @throws { BusinessError } 1300015 - Repeated PiP operation.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
stopPiP(): Promise<void>;
/**
* Sets whether to automatically start the PiP window when the application's main window which can start the
* PiP window transitions to the background. By default, the PiP window is not automatically started.
*
* If the XComponent approach is used to implement PiP and the **Navigation** component is used for route management
* , the system caches the top stack information with the specified navigation ID upon the first call of
* **setAutoStartEnabled(true)**.
*
* @param { boolean } enable - If the PiP window needs to be automatically started when the application's
* main window transitions to the background, set this parameter to **true**. Otherwise,
* set this parameter to **false**. If the PiP feature under **Settings** > **System** > **Multi-window**
* is disabled, the PiP window will not be automatically started when the application's main window transitions
* to the background even if this parameter is set to **true**.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
setAutoStartEnabled(enable: boolean): void;
/**
* Updates the media content size when the media content changes.
*
* @param { number } width - Width of the media content, in px. The value must be an integer greater than 0. It is used
* to update the aspect ratio of the PiP window.
* @param { number } height - Height of the media content, in px. The value must be an integer greater than 0. It is
* used to update the aspect ratio of the PiP window.
* @throws { BusinessError } 401 - Params error. Possible causes: The PiPController is not created or destroyed.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
updateContentSize(width: number, height: number): void;
/**
* Updates the PiP controller status.
*
* @param { PiPControlType } controlType - Type of the component displayed on the PiP controller. Currently, only
* the **VIDEO_PLAY_PAUSE**, **MICROPHONE_SWITCH**, **CAMERA_SWITCH**, and **MUTE_SWITCH** component types are
* supported. If other component types are passed, they do not take effect and no error is reported.
* @param { PiPControlStatus } status - Status of the component displayed on the PiP controller.
* @throws { BusinessError } 401 - Params error. Possible causes: The PiPController is not created or destroyed.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
updatePiPControlStatus(controlType: PiPControlType, status: PiPControlStatus): void;
/**
* Updates the PiP node content. This API uses a promise to return the result.
*
* @param { typeNode.XComponent } contentNode - Content to be rendered in the PiP window. The parameter value cannot
* be empty.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 401 - Params error. Possible causes:
* <br>1. Mandatory parameters are left unspecified.
* <br>2. Incorrect parameter types.
* <br>3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @throws { BusinessError } 1300014 - PiP internal error.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 18
*/
updateContentNode(contentNode: typeNode.XComponent): Promise<void>;
/**
* Sets the enabled status for a component displayed on the PiP controller.
*
* @param { PiPControlType } controlType - Type of the component displayed on the PiP controller.
* @param { boolean } enabled - Enabled status of the component displayed on the PiP controller. **true** if enabled
* , **false** otherwise.
* @throws { BusinessError } 401 - Params error. Possible causes: The PiPController is not created or destroyed.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
setPiPControlEnabled(controlType: PiPControlType, enabled: boolean): void;
/**
* Obtains the PIP window information. This API uses a promise to return the result.
*
* @returns { Promise<PiPWindowInfo> } Promise used to return the information about the current PIP window.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @throws { BusinessError } 1300014 - PiP internal error.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
getPiPWindowInfo(): Promise<PiPWindowInfo>;
/**
* Obtains the status of the auto-start PiP switch in Settings. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the auto-start PiP switch status. **true** if enabled,
* **false** otherwise.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @throws { BusinessError } 1300014 - PiP internal error.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 20
*/
getPiPSettingSwitch(): Promise<boolean>;
/**
* Check whether the PiP window is active. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } Promise used to return the PiP window status. **true** is returned if the PiP
* window is visible, and **false** is returned if the PiP window is invisible (hidden in the sidebar). If this
* API is called when the PiP lifecycle is not [STARTED]{@link PiPWindow.PiPState}, **false** is always
* returned.
* @throws { BusinessError } 1300014 - PiP internal error.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 23
*/
isPiPActive(): Promise<boolean>;
/**
* Subscribes to PiP state events. To avoid potential memory leaks, you are advised to stop listening when it is no
* longer needed.
*
* @param { 'stateChange' } type - Event type. The value is fixed at **'stateChange'**, indicating that the PiP
* state changes.
* @param { function } callback - Callback used to return the result, which includes the following information:<br>-
* **state**: [PiPState]{@link PiPWindow.PiPState}, indicating the new PiP state.
* <br>- **reason**: a string indicating the reason for the state change.
* <br>Before <!--RP1-->OpenHarmony 6.1<!--RP1End-->, the value of **reason** is always **0**,
* which can be ignored.<br>Since <!--RP1-->OpenHarmony 6.1<!--RP1End-->, **reason**
* indicates the reason for switching the current lifecycle. The options are as follows:
* <br>**"requestStart"**: An application calls the **startPip** API.
* <br>**"autoStart"**: The application is automatically started in PiP mode
* when it is switched to the background.
* <br>**"requestDelete"**: The application calls the **stopPip** API.
* <br>**"panelActionDelete"**: The user taps the close button in the PiP window.
* <br>**"dragDelete"**: The user drags the PiP window to delete.
* <br>**"panelActionRestore"**: The user taps the restore button in the PiP
* window (or taps the PiP window if there is no restore button) to restore the PiP window.
* <br>**"other"**: Other reasons, such as the current window or application's main window being closed
* due to the startup of a new PiP window.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
on(type: 'stateChange', callback: (state: PiPState, reason: string) => void): void;
/**
* Unsubscribes from PiP state events.
*
* @param { 'stateChange' } type - Event type. The value is fixed at **'stateChange'**, indicating that the PiP
* state changes.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
off(type: 'stateChange'): void;
/**
* Subscribes to PiP action events. To avoid potential memory leaks, you are advised to stop listening when it is no
* longer needed. The
* [on('controlEvent')]{@link PiPWindow.PiPController.on(type: 'controlEvent', callback: Callback<ControlEventParam>)}
* API is preferred.
*
* @param { 'controlPanelActionEvent' } type - Event type. The value is fixed at **'controlPanelActionEvent'**,
* indicating the action event of the PiP controller.
* @param { function } callback - Action event callback of the PiP controller. [since 11 - 11]
* @param { ControlPanelActionEventCallback } callback - Action event callback of the PiP controller. [since 12]
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
on(type: 'controlPanelActionEvent', callback: ControlPanelActionEventCallback): void;
/**
* Unsubscribes from PiP action events. The
* **[off('controlEvent')]{@link PiPWindow.PiPController.off(type: 'controlEvent', callback?: Callback<ControlEventParam>)}**
* API is preferred.
*
* @param { 'controlPanelActionEvent' } type - Event type. The value is fixed at **'controlPanelActionEvent'**,
* indicating the action event of the PiP controller.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice [since 12]
* @since 11
*/
off(type: 'controlPanelActionEvent'): void;
/**
* Subscribes to PiP action events. To avoid potential memory leaks, you are advised to stop listening when it is no
* longer needed.
*
* @param { 'controlEvent' } type - Event type. The value is fixed at **'controlEvent'**, indicating the action
* event of the PiP controller.
* @param { Callback<ControlEventParam> } callback - Action event callback of the PiP controller.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
on(type: 'controlEvent', callback: Callback<ControlEventParam>): void;
/**
* Unsubscribes from PiP action events.
*
* @param { 'controlEvent' } type - Event type. The value is fixed at **'controlEvent'**, indicating the action
* event of the PiP controller.
* @param { Callback<ControlEventParam> } callback - Describes the action event callback of the PiP controller. If
* no value is passed in, all subscriptions to the specified event are canceled.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 12
*/
off(type: 'controlEvent', callback?: Callback<ControlEventParam>): void;
/**
* Subscribes to PiP window size change events. To avoid potential memory leaks, you are advised to stop listening
* when it is no longer needed.
*
* @param { 'pipWindowSizeChange' } type - Event type. The value is fixed at **'pipWindowSizeChange'**, indicating
* that the PiP window size changes.
* @param { Callback<PiPWindowSize> } callback - Callback used to return the size of the current PiP window.
* @throws { BusinessError } 401 - Params error. Possible causes: Callback is already registered.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @throws { BusinessError } 1300014 - PiP internal error.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
on(type: 'pipWindowSizeChange', callback: Callback<PiPWindowSize>): void;
/**
* Unsubscribes from the PiP window size change event.
*
* @param { 'pipWindowSizeChange' } type - Event type. The value is fixed at **'pipWindowSizeChange'**, indicating
* that the PiP window size changes.
* @param { Callback<PiPWindowSize> } callback - Callback used to return the size of the current PiP window. If a
* value is passed in, the corresponding subscription is canceled. If no value is passed in, all subscriptions
* to the specified event are canceled.
* @throws { BusinessError } 401 - Params error. Possible causes:
* <br>1. Mandatory parameters are left unspecified.
* <br>2. Incorrect parameter types.
* <br>3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device
* capabilities.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 15
*/
off(type: 'pipWindowSizeChange', callback?: Callback<PiPWindowSize>): void;
/**
* Subscribes to PiP window active status change events. To avoid potential memory leaks, you are advised to stop
* listening when it is no longer needed.
*
* @param { 'activeStatusChange' } type - Event type. The value is fixed at **'activeStatusChange'**, indicating
* that the PiP window active status changes.
* @param { Callback<boolean> } callback - PiP window active status. **true** is returned if the PiP window is
* visible, and **false** is returned if the PiP window is invisible (hidden in the sidebar).
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 22
*/
on(type: 'activeStatusChange', callback: Callback<boolean>): void;
/**
* Unsubscribes from PiP window active status change events.
*
* @param { 'activeStatusChange' } type - Event type. The value is fixed at **'activeStatusChange'**, indicating
* that the PiP window active status changes.
* @param { Callback<boolean> } [callback] - PiP window active status. **true** is returned if the PiP window is
* visible, and **false** is returned if the PiP window is invisible (hidden in the sidebar). If no value is
* passed in, all subscriptions to the specified event are canceled.
* @syscap SystemCapability.Window.SessionManager
* @atomicservice
* @since 22
*/
off(type: 'activeStatusChange', callback?: Callback<boolean>): void;
}
}
export default PiPWindow;
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.UiTest.d.ts.md
# @ohos.UiTest.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License,Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,software
* distributed under the License is distributed on an "ASIS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **UiTest** module provides APIs that you can use to simulate UI actions during testing, such as clicks, double-
* clicks, long-clicks, and swipes.
* This module provides the following functions:
*
* - [On<sup>9+</sup>]{@link On}: provides UI component feature description APIs for component filtering and matching.
* - [Component<sup>9+</sup>]{@link Component}: represents a component on the UI and provides APIs for obtaining
* component attributes, clicking a component, scrolling to search for a component, and text injection.
* - [Driver<sup>9+</sup>]{@link Driver}: works as the entry class and provides APIs for features such as component
* matching/search, key injection, coordinate clicking/sliding, and screenshot.
* - [UiWindow<sup>9+</sup>]{@link UiWindow}: works as the entry class and provides APIs for obtaining window attributes,
* dragging windows, and adjusting window sizes.
* - [By<sup>(deprecated)</sup>]{@link BY}: provides UI component feature description APIs for component filtering and
* matching. This API is supported since API version 8 and deprecated since API version 9.
* You are advised to use {@link On} instead.
* - [UiComponent<sup>(deprecated)</sup>]{@link UiComponent}: represents a component on the UI and provides APIs for
* obtaining component attributes, clicking a component, scrolling to search for a component, and text injection.
* This API is supported since API version 8 and deprecated since API version 9.
* You are advised to use [Component<sup>9+</sup>]{@link Component} instead.
* - [UiDriver<sup>(deprecated)</sup>]{@link UiDriver}: works as the entry class and provides APIs for features such as
* component matching/search, key injection, coordinate clicking/sliding, and screenshot.
* This API is supported since API version 8 and deprecated since API version 9.
* You are advised to use [Driver<sup>9+</sup>]{@link Driver} instead.
*
* > **NOTE**
* >
* > - The APIs of this module can be used only in <!--RP1-->[UITest](docroot://application-test/uitest-guidelines.md)<!--RP1End-->.
* >
* > - The APIs of this module do not support concurrent calls.
*
* @file
* @kit TestKit
*
*/
import { Callback } from './@ohos.base';
/**
* Enumerates the match patterns supported for component attributes.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
*/
declare enum MatchPattern {
/**
* Equals the given value.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
* @test
*/
EQUALS = 0,
/**
* Contains the given value.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
* @test
*/
CONTAINS = 1,
/**
* Starts with the given value.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
* @test
*/
STARTS_WITH = 2,
/**
* Ends with the given value.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 8
* @test
*/
ENDS_WITH = 3,
/**
* Uses regular expression matching.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
REG_EXP = 4,
/**
* Uses case-insensitive regular expression matching.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
REG_EXP_ICASE = 5
}
/**
* The UiTest framework provides a wide range of UI component feature description APIs in the **By** class to filter and
* match components.
*
* The APIs provided by the **By** class exhibit the following features:
*
* 1. Allow one or more attributes as the match conditions.
* For example, you can specify both the **text** and **id** attributes to find the target component.
* 2. Provide multiple match patterns for component attributes.
* 3. Support absolute positioning and relative positioning for components.
* APIs such as [By.isBefore<sup>(deprecated)</sup>]{@link By#isBefore} and [By.isAfter<sup>(deprecated)</sup>]{@link By#isAfter}
* can be used to specify the features of adjacent components to assist positioning.
*
* All APIs provided in the **By** class are synchronous. You are advised to use the static constructor **BY** to create
* a **By** object in chain mode.
*
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On
*/
declare class By {
/**
* Specifies the text attribute of the target component. Multiple match patterns are supported.
*
* @param { string } txt - Component text, used to match the target component.
* @param { MatchPattern } pattern - Match pattern {@link MatchPattern}.
* <br>Default value: {@link MatchPattern.EQUALS}
* @returns { By } - **By** object that matches the text attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#text
* @test
*/
text(txt: string, pattern?: MatchPattern): By;
/**
* Specifies the key attribute of the target component.
*
* @param { string } key - Component key.
* @returns { By } - **By** object that matches the key attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#id(id: string)
* @test
*/
key(key: string): By;
/**
* Specifies the ID attribute of the target component.
*
* @param { number } id - Component ID.
* @returns { By } - **By** object that matches the ID attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#id(id: string)
* @test
*/
id(id: number): By;
/**
* Specifies the type attribute of the target component.
*
* @param { string } tp - Component type.
* @returns { By } - **By** object that matches the type attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#type(tp: string)
* @test
*/
type(tp: string): By;
/**
* Specifies the clickable attribute of the target component.
*
* @param { boolean } b - Clickable status of the component. The value **true** indicates that the component is clickable,
* and **false** indicates the opposite. Default value: **true**
* @returns { By } - **By** object that matches the clickable attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#clickable
* @test
*/
clickable(b?: boolean): By;
/**
* Specifies the scrollable attribute of the target component.
*
* @param { boolean } b - Scrollable status of the component. The value **true** indicates that the component is scrollable
* , and **false** indicates the opposite. Default value: **true**
* @returns { By } - **By** object that matches the scrollable attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#scrollable
* @test
*/
scrollable(b?: boolean): By;
/**
* Specifies the enabled attribute of the target component.
*
* @param { boolean } b - Enabled status of the component. The value **true** indicates that the component is enabled, and
* **false** indicates the opposite. Default value: **true**
* @returns { By } - **By** object that matches the enabled attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#enabled
* @test
*/
enabled(b?: boolean): By;
/**
* Specifies the focused attribute of the target component.
*
* @param { boolean } b - Focused status of the component. The value **true** indicates that the component is focused, and
* **false** indicates the opposite. Default value: **true**
* @returns { By } - **By** object that matches the focused attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#focused
* @test
*/
focused(b?: boolean): By;
/**
* Specifies the selected status of the target component.
*
* @param { boolean } b - Selected status of the component. The value **true** indicates that the component is selected,
* and **false** indicates the opposite. Default value: **true**
* @returns { By } - **By** object that matches the selected attribute of the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#selected
* @test
*/
selected(b?: boolean): By;
/**
* Specifies that the target component is located before the given attribute component.
*
* @param { By } by - Information about the attribute component.
* @returns { By } - **By** object.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#isBefore(on: On)
* @test
*/
isBefore(by: By): By;
/**
* Specifies that the target component is located after the given attribute component.
*
* @param { By } by - Information about the attribute component.
* @returns { By } - **By** object.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead On#isAfter(on: On)
* @test
*/
isAfter(by: By): By;
}
/**
* In **UiTest**, the **UiComponent** class represents a component on the UI and provides APIs for obtaining component
* attributes, clicking a component, scrolling to search for a component, and text injection.
* All APIs provided in this class use a promise to return the result and must be invoked using **await**.
*
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component
* @test
*/
declare class UiComponent {
/**
* Clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#click
* @test
*/
click(): Promise<void>;
/**
* Double-clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#doubleClick
* @test
*/
doubleClick(): Promise<void>;
/**
* Long-clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#longClick
* @test
*/
longClick(): Promise<void>;
/**
* Obtains the ID of this component. This API uses a promise to return the result.
*
* @returns { Promise<number> } - Promise used to return the component ID.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#getId
* @test
*/
getId(): Promise<number>;
/**
* Obtains the key of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the key value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#getId
* @test
*/
getKey(): Promise<string>;
/**
* Obtains the text information of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the text information of the component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#getText
* @test
*/
getText(): Promise<string>;
/**
* Obtains the type of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the component type.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#getType
* @test
*/
getType(): Promise<string>;
/**
* Obtains the clickable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is clickable. The value **true** indicates
* that the component is clickable, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#isClickable
* @test
*/
isClickable(): Promise<boolean>;
/**
* Obtains the scrollable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is scrollable. The value **true** indicates
* that the component is scrollable, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#isScrollable
* @test
*/
isScrollable(): Promise<boolean>;
/**
* Obtains the enabled status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is enabled. The value **true** indicates
* that the component is enabled, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#isEnabled
* @test
*/
isEnabled(): Promise<boolean>;
/**
* Obtains the focused status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is focused. The value **true** indicates
* that the component is focused, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#isFocused
* @test
*/
isFocused(): Promise<boolean>;
/**
* Obtains the selected status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is selected. The value **true** indicates
* that the component is selected, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#isSelected
* @test
*/
isSelected(): Promise<boolean>;
/**
* Inputs text to a component. This API takes effect only for editable text components. This API uses a promise to
* return the result.
*
* @param { string } text - Text to enter.
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#inputText(text: string)
* @test
*/
inputText(text: string): Promise<void>;
/**
* Scrolls on this component to search for the target component (applicable to components that support scrolling, such
* as **List**). This API uses a promise to return the result.
*
* @param { By } by - Attributes of the target component.
* @returns { Promise<UiComponent> } - Promise used to return the target component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#scrollSearch(on: On)
* @test
*/
scrollSearch(by: By): Promise<UiComponent>;
}
/**
* The **UiDriver** class is the main entry to the UiTest framework. It provides APIs for features such as component
* matching/search, key injection, coordinate clicking/sliding, and screenshot.
* All APIs provided by this class, except **UiDriver.create()**, use a promise to return the result and must be invoked
* using **await**.
*
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver
* @test
*/
declare class UiDriver {
/**
* Creates a **UiDriver** object and returns the object created. This API is a static API.
*
* > **NOTE**
* >
* > This method is supported since API version 8 and deprecated since API version 9. You are advised to use
* > [create<sup>9+</sup>]{@link Driver#create} instead.
*
* @returns { UiDriver } - **UiDriver** object created.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#create
* @test
*/
static create(): UiDriver;
/**
* Delays this **UiDriver** object within the specified duration. This API uses a promise to return the result.
*
* @param { number } duration - Duration of time.
* <br>Unit: ms
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#delayMs
* @test
*/
delayMs(duration: number): Promise<void>;
/**
* Searches this **UiDriver** object for the target component that matches the given attributes. This API uses a
* promise to return the result.
*
* @param { By } by - Attributes of the target component.
* @returns { Promise<UiComponent> } - Promise used to return the component.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#findComponent(on: On)
* @test
*/
findComponent(by: By): Promise<UiComponent>;
/**
* Searches this **UiDriver** object for all components that match the given attributes. This API uses a promise to
* return the result.
*
* @param { By } by - Attributes of the target component.
* @returns { Promise<Array<UiComponent>> } - Promise used to return the list of components.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#findComponents(on: On)
* @test
*/
findComponents(by: By): Promise<Array<UiComponent>>;
/**
* Asserts that a component that matches the given attributes exists on the current page. If the component does not
* exist, the API throws a JS exception, causing the current test case to fail. This API uses a promise to return the
* result.
*
* @param { By } by - Attributes of the target component.
* @returns { Promise<void> } - Promise that returns no value.
* @throws {BusinessError} 401 - if the input parameters are invalid.
* @throws {BusinessError} 17000002 - The API does not support concurrent calls.
* @throws {BusinessError} 17000003 - if the assertion failed.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#assertComponentExist
* @test
*/
assertComponentExist(by: By): Promise<void>;
/**
* Presses the Back button on this **UiDriver** object. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#pressBack()
* @test
*/
pressBack(): Promise<void>;
/**
* Triggers the key of this **UiDriver** object that matches the given key code. This API uses a promise to return the
* result.
*
* @param { number } keyCode - Key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#triggerKey(keyCode: int)
* @test
*/
triggerKey(keyCode: number): Promise<void>;
/**
* Clicks a specific point of this **UiDriver** object based on the given coordinates. This API uses a promise to
* return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#click
* @test
*/
click(x: number, y: number): Promise<void>;
/**
* Double-clicks a specific point of this **UiDriver** object based on the given coordinates. This API uses a promise
* to return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#doubleClick
* @test
*/
doubleClick(x: number, y: number): Promise<void>;
/**
* Long-clicks a specific point of this **UiDriver** object based on the given coordinates. This API uses a promise to
* return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Component#longClick
* @test
*/
longClick(x: number, y: number): Promise<void>;
/**
* Swipes on this **UiDriver** object from the start point to the end point based on the given coordinates. This API
* uses a promise to return the result.
*
* @param { number } startx - Number, which indicates the horizontal coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } starty - Number, which indicates the vertical coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endx - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endy - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#swipe
* @test
*/
swipe(startx: number, starty: number, endx: number, endy: number): Promise<void>;
/**
* Captures the current screen of this **UiDriver** object and saves it as a PNG image to the given save path. This
* API uses a promise to return the result.
*
* @param { string } savePath - File save path.
* @returns { Promise<boolean> } - Promise used to return whether the screenshot operation is successful. The value **true*
* The value **true** indicates the screenshot operation is successful, and **false** indicates the opposite.
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead Driver#screenCap(savePath: string)
* @test
*/
screenCap(savePath: string): Promise<boolean>;
}
/**
* Enumerates the window modes.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
declare enum WindowMode {
/**
* Full-screen mode.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
FULLSCREEN = 0,
/**
* Primary window mode.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
PRIMARY = 1,
/**
* Secondary window mode.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
SECONDARY = 2,
/**
* Floating window mode.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
FLOATING = 3
}
/**
* Enumerates the directions in which a window can be resized.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
declare enum ResizeDirection {
/**
* Left.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
LEFT = 0,
/**
* Right.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
RIGHT = 1,
/**
* Up.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
UP = 2,
/**
* Down.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
DOWN = 3,
/**
* Upper left.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
LEFT_UP = 4,
/**
* Lower left.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
LEFT_DOWN = 5,
/**
* Upper right.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
RIGHT_UP = 6,
/**
* Lower right.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
RIGHT_DOWN = 7
}
/**
* Describes the display rotation of the device.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
*/
declare enum DisplayRotation {
/**
* The device display is not rotated and is in its original vertical orientation.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
ROTATION_0 = 0,
/**
* The device display rotates 90° clockwise and is in landscape orientation.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
ROTATION_90 = 1,
/**
* The device display rotates 180° clockwise and is in reverse vertical orientation.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
ROTATION_180 = 2,
/**
* The device display rotates 270° clockwise and is in reverse landscape orientation.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
ROTATION_270 = 3
}
/**
* Represents the point on the device screen.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
declare interface Point {
/**
* Horizontal coordinate of a coordinate point. The value is an integer greater than 0.
*
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
x: number;
/**
* Vertical coordinate of a coordinate point. The value is an integer greater than 0.
*
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
*/
y: number;
/**
* ID of the display to which the coordinate point belongs. The value is an integer greater than or equal to 0. The
* default value is the default screen ID of the device.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
*/
displayId?: number;
}
/**
* Represents the rectangle area on the device screen.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
declare interface Rect {
/**
* X coordinate of the upper left corner of the component border. The value is an integer greater than 0.
* <br>Unit: px
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
left: number;
/**
* Y coordinate of the upper left corner of the component border. The value is an integer greater than 0.
* <br>Unit: px
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
top: number;
/**
* X coordinate of the lower right corner of the component border. The value is an integer greater than 0.
* <br>Unit: px
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
right: number;
/**
* Y coordinate of the lower right corner of the component border. The value is an integer greater than 0.
* <br>Unit: px
* @readonly [since 9 - 19]
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
bottom: number;
/**
* ID of the display to which the component border belongs. The value is an integer greater than or equal to 0.
* <br>Default value: the default screen ID of the device.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
*/
displayId?: number;
}
/**
* Provides the flag attributes of this window.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
declare interface WindowFilter {
/**
* Bundle name of the application to which the window belongs. The default value is empty.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
bundleName?: string;
/**
* Title of the window. The default value is empty.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
title?: string;
/**
* Whether the window is focused. The value **true** indicates that the window is focused, and **false** indicates the
* opposite. The default value is **false**.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
*/
focused?: boolean;
/**
* Whether the window is interacting with the user. The value **true** indicates that the window is interacting with
* the user, and **false** indicates the opposite.
*
* This API is deprecated since API version 11. You are advised to use the **active** API instead.
*
* @syscap SystemCapability.Test.UiTest
* @since 9
* @deprecated since 11
* @useinstead ohos.UiTest.WindowFilter#active
*/
actived?: boolean;
/**
* Whether the window is interacting with the user. The value **true** indicates that the window is interacting with
* the user, and **false** indicates the opposite.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
*/
active?: boolean;
/**
* ID of the display to which the window belongs. The value is an integer greater than or equal to 0. The default
* value is the default screen ID of the device.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
*/
displayId?: number;
}
/**
* Enumerates the window change event types that can be listened for.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
*/
declare enum WindowChangeType {
/**
* Non-window change event.
* <br>Note: This value can only be used as a return value. If it is passed in an API, an exception will be thrown.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
WINDOW_UNDEFINED = 0,
/**
* Window adding event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
WINDOW_ADDED = 1,
/**
* Window removing event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
WINDOW_REMOVED = 2,
/**
* Window bounds change event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
WINDOW_BOUNDS_CHANGED = 3
}
/**
* Enumerates the component operation event types that can be listened for.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
*/
declare enum ComponentEventType {
/**
* Non-component operation event.
*
* Note: This value can only be used as a return value. If it is passed in an API, an exception will be thrown.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_UNDEFINED = 0,
/**
* Component clicked event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_CLICKED = 1,
/**
* Component long-clicked event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_LONG_CLICKED = 2,
/**
* Component scroll start event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_SCROLL_START = 3,
/**
* Component scroll end event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_SCROLL_END = 4,
/**
* Text change event of the [text input component](docroot://ui/arkts-common-components-text-input.md).
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
COMPONENT_TEXT_CHANGED = 5
}
/**
* Describes the extended configuration of window change event listening,
* which is used to specify the listening process configuration and event filtering conditions.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
declare interface WindowChangeOptions {
/**
* Listening timeout interval, to prevent listening failures casued by event notification delay.
* <br>Value range: The value should be >= 500
* <br>Default value: 10000
* <br>Unit: ms
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
timeout?: number;
/**
* Bundle name of the window to be listened for. By default, all windows are listened for.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
bundleName?: string;
}
/**
* Describes the extended configuration of component operation event listening,
* which is used to specify the listening process configuration and event filtering conditions.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
declare interface ComponentEventOptions {
/**
* Listening timeout interval , to prevent listening failures casued by event notification delay.
* <br>Value range: The value should be >= 500
* <br>Default value: 10000
* <br>Unit: ms
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
timeout?: number;
/**
* Attribute requirements of the target component to listen for. By default, all components are listened for.
* **Note**: Only components with specified attributes can be listened for. Components with relative positions such as
* **On.isBefore**, **On.isAfter**, and **On.within** cannot be listened for.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
on?: On;
}
/**
* Provides information about the UI event.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
declare interface UIElementInfo {
/**
* Bundle name of the application.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
readonly bundleName: string;
/**
* Component or window type.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
readonly type: string;
/**
* Text information of the component or window.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
readonly text: string;
/**
* Window change event type.
* If the event is not a window change event, {@link WindowChangeType.WINDOW_UNDEFINED} is returned.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
readonly windowChangeType?: WindowChangeType;
/**
* Component operation event type.
* If it is not a component operation event, {@link ComponentEventType.COMPONENT_UNDEFINED} is returned.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
readonly componentEventType?: ComponentEventType;
/**
* ID of the window where the component belongs.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
readonly windowId?: number;
/**
* Component ID. If it is not a component operation event, an empty string is returned.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
readonly componentId?: string;
/**
* The rect of the component, set all attributes of rect to 0 if it's a window.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
readonly componentRect?: Rect;
}
/**
* Observer to monitor UI events.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
declare interface UIEventObserver {
/**
* Subscribes to events of the toast component. This API uses a callback to return the result.
*
* @param { 'toastShow' } type - Event type. The value is fixed at **'toastShow'**.
* @param { Callback<UIElementInfo> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
once(type: 'toastShow', callback: Callback<UIElementInfo>): void;
/**
* Subscribes to events of the dialog component. This API uses a callback to return the result.
*
* @param { 'dialogShow' } type - Event type. The value is fixed at **'dialogShow'**.
* @param { Callback<UIElementInfo> } callback - Callback used to return the result.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
once(type: 'dialogShow', callback: Callback<UIElementInfo>): void;
/**
* Starts listening for window change events of the specified type with extended configuration supported. This API
* triggers a callback when a specified window change event is detected.
* This API can be used only in [free windows](docroot://windowmanager/window-terminology.md#free-windows) mode.
*
* @param { 'windowChange' } type - Type of the event to subscribe to, which can be **windowChange**. This event is
* triggered when the window changes.
* @param { WindowChangeType } windowChangeType - Type of the window change event.
* @param { WindowChangeOptions } options - Extended configuration, including the listening timeout interval and the
* bundle name of the window to be listened for.
* @param { Callback<UIElementInfo> } callback - Callback triggered to return event information when an event occurs.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
once(type: 'windowChange', windowChangeType: WindowChangeType, options: WindowChangeOptions, callback: Callback<UIElementInfo>): void;
/**
* Starts listening for component operation events of the specified type with extended configuration supported. This
* API triggers a callback when a specified component operation event is detected.
*
* @param { 'componentEventOccur' } type - Type of the event to subscribe to, which can be **componentEventOccur**.
* This event is triggered when the component operation is detected.
* @param { ComponentEventType } componentEventType - Type of the component operation event.
* @param { ComponentEventOptions } options - Extended configuration, including the listening timeout interval and
* the matching condition of the component to be listened for.
* @param { Callback<UIElementInfo> } callback - Callback used to return the result.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
once(type: 'componentEventOccur', componentEventType: ComponentEventType, options: ComponentEventOptions, callback: Callback<UIElementInfo>): void;
}
/**
* Describes the direction of a UI operation such as fling.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
*/
declare enum UiDirection {
/**
* Leftward.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
* @test
*/
LEFT = 0,
/**
* Rightward.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
* @test
*/
RIGHT = 1,
/**
* Upward.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
* @test
*/
UP = 2,
/**
* Downward.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
* @test
*/
DOWN = 3
}
/**
* Describes the injected simulated mouse button.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
declare enum MouseButton {
/**
* Left button on the mouse.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
MOUSE_BUTTON_LEFT = 0,
/**
* Right button on the mouse.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
MOUSE_BUTTON_RIGHT = 1,
/**
* MIDDLE button on the mouse.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
MOUSE_BUTTON_MIDDLE = 2
}
/**
* Describes information about the touchpad swipe gesture option.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
declare interface TouchPadSwipeOptions {
/**
* Whether the swipe gesture stays on the touchpad for 1s before it is lifted.
* The value **true** indicates that the swipe gesture stays on the touchpad for 1s, and **false** indicates the opposite.
* <br>Default value: false
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
stay?: boolean;
/**
* Swipe speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 2000
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
speed?: number;
}
/**
* Describes the text input mode.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
declare interface InputTextMode {
/**
* Whether to copy and paste text. The value **true** means to copy and paste text, and **false** means to type text.
* Default value: **false**
*
* **Note**: If the input text contains Chinese characters, special characters, or the text length exceeds 200
* characters, the text is copied and pasted regardless of the value of this parameter.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
paste?: boolean;
/**
* Whether to input text in addition mode. The value **true** means to input text in addition mode, and **false**
* means the opposite. Default value: **false**
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
addition?: boolean;
}
/**
* Represents the options for key operations.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare interface KeyOptions {
/**
* The first keyCode to press during the operation.
* If not set, no key event will be injected.
* Setting only key2 without key1 will result in a BusinessError 17000007.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
key1?: number;
/**
* The second KeyCode to press during the operation.
* If not set, no key event will be injected.
* Setting only key2 without key1 will result in a BusinessError 17000007.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
key2?: number;
}
/**
* Common options for touch operations.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare interface TouchOptions {
/**
* Speed of touch action.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
speed?: number;
/**
* Duration of the operation in milliseconds.
* <br>Value range: The value should be >= 1500
* <br>Unit: ms
* <br>Default value: 1500
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
duration?: number;
/**
* The pressure of the touch.
* <br>Value range:[0.0, 1.0]
* <br>Default value: 1.0
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
pressure?: number;
}
/**
* Pen key type enum.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare enum PenKey {
/**
* Handwriting key.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
HANDWRITING = 0,
/**
* Smart key.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
SMART = 1,
/**
* Air mouse key.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
AIR_MOUSE = 2
}
/**
* Pen key operation type enum.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare enum PenKeyOperation {
/**
* Single click.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
CLICK = 0,
/**
* Double click.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
DOUBLE_CLICK = 1
}
/**
* Pen mode enum.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare enum PenMode {
/**
* Handwriting mode.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
HANDWRITING = 0,
/**
* Air mouse mode.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
AIR_MOUSE = 1
}
/**
* Pen key operation options.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
declare interface PenKeyOperationOptions {
/**
* The coordinate point for air mouse mode operations. Required when key is AIR_MOUSE in air mouse mode.
*
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
point?: Point;
}
/**
* Since API version 9, the UiTest framework provides a wide range of UI component feature description APIs in the
* **On** class to filter and match components.
*
* The APIs provided by the **On** class exhibit the following features:
*
* 1. Allow one or more attributes as the match conditions.
* For example, you can specify both the **text** and **id** attributes to find the target component.
* 2. Provide multiple match patterns for component attributes.
* 3. Support absolute positioning and relative positioning for components.
* APIs such as [ON.isBefore]{@link On.isBefore(on: On)} and [ON.isAfter]{@link On.isAfter(on: On)} can be used to specify
* the features of adjacent components to assist positioning.
*
* All APIs provided in the **On** class are synchronous. You are advised to use the static constructor **ON** to create
* an **On** object in chain mode.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
*/
declare class On {
/**
* Specifies the text attribute of the target component. Multiple match patterns are supported.
*
* > **NOTE**
* >
* > If the [accessibilityLevel]{@link ./@internal/component/ets/common:CommonMethod#accessibilityLevel}
* > of a component is set to **no** or **no-hide-descendants**, this API cannot be used to specify the text attribute
* > of the target component for searching for the component. In this case, you can use the
* > [On.originalText()]{@link On#originalText} API.
*
* @param { string } txt - Component text, used to match the target component.<!--RP2--><!--RP2End-->
* @param { MatchPattern } [pattern] - Match pattern {@link MatchPattern} .
* <br>Default value: {@link MatchPattern.EQUALS}
* @returns { On } - **On** object that matches the text attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
text(txt: string, pattern?: MatchPattern): On;
/**
* Specifies the ID attribute of the target component.
*
* @param { string } id - Component ID.<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the ID attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
id(id: string): On;
/**
* Specifies the type attribute of the target component.
*
* @param { string } tp - Component type.<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the type attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
type(tp: string): On;
/**
* Specifies the clickable attribute of the target component.
*
* @param { boolean } [b] - Clickable status of the component. The value **true** indicates that the component is clickable
* , and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the clickable attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
clickable(b?: boolean): On;
/**
* Specifies the long-clickable attribute of the target component.
*
* @param { boolean } [b] - Long-clickable status of the component. The value **true** indicates that the component is long
* -clickable, and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the long-clickable attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
longClickable(b?: boolean): On;
/**
* Specifies the scrollable attribute of the target component.
*
* @param { boolean } [b] - Scrollable status of the component. The value **true** indicates that the component is
* scrollable, and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the scrollable attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
scrollable(b?: boolean): On;
/**
* Specifies the enabled attribute of the target component.
*
* @param { boolean } [b] - Enabled status of the component. The value **true** indicates that the component is enabled,
* and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the enabled attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
enabled(b?: boolean): On;
/**
* Specifies the focused attribute of the target component.
*
* @param { boolean } [b] - Focused status of the component. The value **true** indicates that the component is focused,
* and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the focused attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
focused(b?: boolean): On;
/**
* Specifies the selected attribute of the target component.
*
* @param { boolean } [b] - Selected status of the component. The value **true** indicates that the component is selected,
* and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the selected attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
selected(b?: boolean): On;
/**
* Specifies the checked attribute of the target component.
*
* @param { boolean } [b] - Checked status of the component. The value **true** indicates that the component is checked,
* and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the checked attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
checked(b?: boolean): On;
/**
* Specifies the checkable attribute of the target component.
*
* @param { boolean } [b] - Checkable status of the component. The value **true** indicates that the component is checkable
* , and **false** indicates the opposite. Default value: **true**<!--RP2--><!--RP2End-->
* @returns { On } - **On** object that matches the checkable attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
checkable(b?: boolean): On;
/**
* Specifies that the target component is located before the given attribute component.
*
* @param { On } on - Information about the attribute component.<!--RP3--><!--RP3End-->
* @returns { On } - **On** object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
isBefore(on: On): On;
/**
* Requires that the target Component which is before another Component that specified by the given {@link Component}
* object,used to locate Component relatively.
*
* @param { Component } com - describes the Component which the target one is in front of.
* @returns { On } this {@link On} object.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
beforeComponent(com: Component): On;
/**
* Specifies that the target component is located after the given attribute component.
*
* @param { On } on - Information about the attribute component.<!--RP3--><!--RP3End-->
* @returns { On } - **On** object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
isAfter(on: On): On;
/**
* Requires that the target Component which is after another Component that specified by the given {@link Component}
* object,used to locate Component relatively.
*
* @param { Component } com - describes the Component which the target one is in back of.
* @returns { On } this {@link On} object.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
afterComponent(com: Component): On;
/**
* Specifies that the target component is located within the given attribute component.
*
* @param { On } on - Information about the attribute component.<!--RP3--><!--RP3End-->
* @returns { On } - **On** object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 10
* @test
*/
within(on: On): On;
/**
* Requires that the target Component which is inside of another Component that specified by the given {@link Component}
* object,used to locate Component relatively.
*
* @param { Component } com - describes the Component which the target one is inside of.
* @returns { On } this {@link On} object.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
withinComponent(com: Component): On;
/**
* Specifies that the target component is located within the given application window.
*
* @param { string } bundleName - Bundle name of the application window.<!--RP2--><!--RP2End-->
* @returns { On } - **On** object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
inWindow(bundleName: string): On;
/**
* Obtains the component object on the specified display.
*
* @param { number } displayId - ID of the display to which the component belongs. The value is an integer greater than
* or equal to 0.
* <br>**Note**: If the input **displayId** does not exist, the exception **17000007** is reported. You can use
* [getAllDisplays]{@link @ohos.display:display.getAllDisplays(callback: AsyncCallback<Array<Display>>)} to obtain
* all current **display** objects and use them to obtain the corresponding display IDs.<!--RP2--><!--RP2End-->
* @returns { On } - The **On** object of the display to which the specified component belongs.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
belongingDisplay(displayId: number): On;
/**
* Specifies the description of the target component. Multiple match patterns are supported.
*
* @param { string } val - Description of the component.<!--RP2--><!--RP2End-->
* @param { MatchPattern } [pattern] - Match pattern {@link MatchPattern} .
* <br>Default value: {@link MatchPattern.EQUALS}
* @returns { On } - **On** object.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
description(val: string, pattern?: MatchPattern): On;
/**
* Specifies the **id** attribute and match pattern of the target component.
*
* @param { string } id - Component ID.<!--RP2--><!--RP2End-->
* @param { MatchPattern } pattern - Text matching pattern {@link MatchPattern}.
* @returns { On } - **On** object that matches the ID attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
id(id: string, pattern: MatchPattern): On;
/**
* Specifies the **type** attribute and match pattern of the target component.
*
* @param { string } tp - Component type.<!--RP2--><!--RP2End-->
* @param { MatchPattern } pattern - Text matching pattern {@link MatchPattern}.
* @returns { On } - **On** object that matches the type attribute of the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
type(tp: string, pattern: MatchPattern): On;
/**
* Obtains the component object of the specified hint text and returns the **On** object.
*
* @param { string } val - The specified hint text of the component.<!--RP2--><!--RP2End-->
* @param { MatchPattern } [pattern] - Match pattern{@link MatchPattern}.
* <br>Default value: {@link MatchPattern.EQUALS}
* @returns { On } - The **On** object of the specified hint text component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
hint(val: string, pattern?: MatchPattern): On;
/**
* Specifies the text content and text matching pattern of the component.
*
* > **NOTE**
* >
* > If the [accessibilityLevel]{@link ./@internal/component/ets/common:CommonMethod#accessibilityLevel}
* > of a component is set to **no** or **no-hide-descendants**, this API can be used to specify the text attribute of
* > the target component for searching for the component. In this case, the [On.text()]{@link On#text} API does not
* > take effect.
*
* @param { string } text - Component text, used to match the target component.<!--RP2--><!--RP2End-->
* @param { MatchPattern } [pattern] - Match pattern{@link MatchPattern}.
* <br>Default value: {@link MatchPattern.EQUALS}
* @returns { On } - **On** object that matches the text attribute of the target component.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
originalText(text: string, pattern?: MatchPattern): On;
}
/**
* Represents a component on the UI and provides APIs for obtaining component attributes, clicking a component,
* scrolling to search for a component, and text injection.
* All APIs provided in this class use a promise to return the result and must be invoked using **await**.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
* @test
*/
declare class Component {
/**
* Clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
click(): Promise<void>;
/**
* Double-clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
doubleClick(): Promise<void>;
/**
* Long-clicks this component. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
longClick(): Promise<void>;
/**
* Obtains the ID of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the component ID.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
getId(): Promise<string>;
/**
* Obtains the ID of the display to which the component belongs. This API uses a promise to return the result.
*
* @returns { Promise<number> } - Promise used to return the ID of the display to which the component belongs.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
getDisplayId(): Promise<number>;
/**
* Obtains the text information of this component. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > If the [accessibilityLevel]{@link ./@internal/component/ets/common:CommonMethod#accessibilityLevel}
* > attribute of the component is set to **no** or **no-hide-descendants**, this API cannot be used to obtain the
* > text information of the component. In this case, you can use
* > [Component.getOriginalText ()]{@link Component#getOriginalText} instead.
*
* @returns { Promise<string> } - Promise used to return the text information of the component.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
getText(): Promise<string>;
/**
* Obtains the type of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the component type.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
getType(): Promise<string>;
/**
* Obtains the clickable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component object is clickable.
* The value **true** indicates that the component is clickable, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isClickable(): Promise<boolean>;
/**
* Obtains the clickable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component object is clickable.
* The value **true** indicates that the component is clickable, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isLongClickable(): Promise<boolean>;
/**
* Obtains the scrollable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component object is scrollable.
* The value **true** indicates that the component is scrollable, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isScrollable(): Promise<boolean>;
/**
* Obtains the enabled status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is enabled.
* The value **true** indicates that the component is enabled, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isEnabled(): Promise<boolean>;
/**
* Checks whether a component is focused. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is focused.
* The value **true** indicates that the component is focused, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isFocused(): Promise<boolean>;
/**
* Obtains the selected status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component is selected.
* The value **true** indicates that the component is selected, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isSelected(): Promise<boolean>;
/**
* Obtains the checked status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return the checked status of the component object.
* The value **true** indicates indicates that the component is checked, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isChecked(): Promise<boolean>;
/**
* Obtains the checkable status of this component. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the component object is checkable.
* The value **true** indicates indicates that the component is checkable, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
isCheckable(): Promise<boolean>;
/**
* Clears the original text in a component and inputs the specified text. This API takes effect only for editable
* text components. This API uses a promise to return the result.
*
* @param { string } text - Input text. Currently, English, Chinese, and special characters are supported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
inputText(text: string): Promise<void>;
/**
* Inputs text to a component in a specified text input mode. This API takes effect only for editable text
* components. This API uses a promise to return the result.
*
* @param { string } text - Input text. Currently, English, Chinese, and special characters are supported.
* @param { InputTextMode } mode - Text input mode.
* For details, see [InputTextMode]{@link InputTextMode}.
* <br> **Note**: If **InputTextMode.addition** is set to **true**, the specified text is added to the end of the
* existing text in the component. Otherwise, the specified text overwrites the existing text of the component.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 801 - Capability not supported. Function can not work correctly due to limited device
* capabilities.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
inputText(text: string, mode: InputTextMode): Promise<void>;
/**
* Clears the text information of a component. This API takes effect only for editable text components. This API
* uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
clearText(): Promise<void>;
/**
* Scrolls to the top of this component. This API is applicable to components that support scrolling. This API uses
* a promise to return the result.
*
* @param { number } [speed] - Scroll speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
scrollToTop(speed?: number): Promise<void>;
/**
* Scrolls to the bottom of this component. This API is applicable to components that support scrolling. This API
* uses a promise to return the result.
*
* @param { number } [speed] - Scroll speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter
* verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
scrollToBottom(speed?: number): Promise<void>;
/**
* Obtains the bounds information of this component. This API uses a promise to return the result.
*
* @returns { Promise<Rect> } - Promise used to return the bound information of the component object.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
* @test
*/
getBounds(): Promise<Rect>;
/**
* Scrolls on this component to search for the target component. This API is applicable to components that support
* scrolling. This API uses a promise to return the result.
*
* @param { On } on - Attributes of the target component.
* @returns { Promise<Component> } - Promise used to return the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
scrollSearch(on: On): Promise<Component>;
/**
* Obtains the center point of the area occupied by this component. This API uses a promise to return the result.
*
* @returns { Promise<Point> } - Promise used to return the center point of the area occupied by the component object.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
getBoundsCenter(): Promise<Point>;
/**
* Drags a component to the target component. This API uses a promise to return the result.
*
* @param { Component } target - Target component.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
dragTo(target: Component): Promise<void>;
/**
* Pinches out a component at the specified scale. This API uses a promise to return the result.
*
* @param { number } scale - Scale factor, which is a value greater than 1.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
pinchOut(scale: number): Promise<void>;
/**
* Pinches in a component at the specified scale. This API uses a promise to return the result.
*
* @param { number } scale - Scale factor, which is a value ranging from 0 to 1.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
pinchIn(scale: number): Promise<void>;
/**
* Obtains the description of this component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the description of the component.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
getDescription(): Promise<string>;
/**
* Obtains the hint text of a component. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the hint text of a component.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
getHint(): Promise<string>;
/**
* Scrolls on this component to search for the target component. This API is applicable to components that support
* scrolling. You can specify the scrolling direction and the offset between the scrolling start and end points and
* the component border. This API uses a promise to return the result.
*
* @param { On } on - Attributes of the target component.
* @param { boolean } [vertical] - Whether the search direction is vertical. The default value **true** indicates that the
* search direction is vertical. **false** indicates that the search direction is horizontal.
* @param { number } [offset] - Offset from the scrolling start/end point to the component border, in pixels. The default
* value is **80**. The value is an integer greater than or equal to 0.
* <br>Default value: 80
* <br>Unit: px
* @returns { Promise<Component> } - Promise used to return the target component.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
scrollSearch(on: On, vertical?: boolean, offset?: number): Promise<Component>;
/**
* Obtains the text information of this component. This API uses a promise to return the result. If the
* [accessibilityLevel]{@link ./@internal/component/ets/common:CommonMethod#accessibilityLevel}
* attribute of the component is set to **no** or **no-hide-descendants**, this API can be used
* to obtain the text information of the component, but [Component.getText()]{@link Component#getText} cannot.
*
* @returns { Promise<string> } - Promise used to return the text information of the component.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
getOriginalText(): Promise<string>;
}
/**
* The **Driver** class is the main entry to the UiTest framework. It provides APIs for features such as component
* matching/search, key injection, coordinate clicking/sliding, and screenshot.
* All APIs provided by this class, except **Driver.create()**, use a promise to return the result and must be invoked
* using **await**.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 9
* @test
*/
declare class Driver {
/**
* Creates a **Driver** object and returns the object created. This API is a static API.
*
* @returns { Driver } - **{@link Driver}** object created.
* @throws { BusinessError } 17000001 - Initialization failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
static create(): Driver;
/**
* Delays execution for the specified duration. This API uses a promise to return the result.
*
* @param { number } duration - Specified time, in ms. The value is an integer greater than or equal to 0.
* <br>Unit: ms
* <br>Value range: The value should be >= 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
delayMs(duration: number): Promise<void>;
/**
* Searches for the target component based on the specified attributes. This API uses a promise to return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @returns { Promise<Component> } - Promise used to return the {@link Component} or undefined.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
findComponent(on: On): Promise<Component>;
/**
* Searches for a window based on the specified attributes. This API uses a promise to return the result.
*
* @param { WindowFilter } filter - Attributes of the target {@link UiWindow}.
* @returns { Promise<UiWindow> } - Promise used to return the target {@link UiWindow}.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
findWindow(filter: WindowFilter): Promise<UiWindow>;
/**
* Searches for the target component based on the attributes within a specified time. This API uses a promise to
* return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @param { number } time - Duration for searching for the target {@link Component}, in ms. The value is an integer greater than or
* equal to 0.
* <br>Unit: ms
* <br>Value range: The value should be >= 0
* @returns { Promise<Component> } the first matched {@link Component} or undefined.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
waitForComponent(on: On, time: number): Promise<Component>;
/**
* Searches for all matched components based on the specified attributes and saves them in a list. This API uses a
* promise to return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @returns { Promise<Array<Component>> } - Promise used to return the list of {@link Component}s.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
findComponents(on: On): Promise<Array<Component>>;
/**
* Asserts whether a component matches the specified attributes exists on the current page. This API uses a promise
* to return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000003 - Assertion failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
assertComponentExist(on: On): Promise<void>;
/**
* Presses the Back button. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
pressBack(): Promise<void>;
/**
* Presses the Back button on the specified screen. This API uses a promise to return the result.
*
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **17000007** is reported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
pressBack(displayId: number): Promise<void>;
/**
* Triggers a key event by passing the key value. This API uses a promise to return the result.
*
* @param { number } keyCode - Key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
triggerKey(keyCode: number): Promise<void>;
/**
* Triggers a key event by passing the key value on the specified screen. This API uses a promise to return the
* result.
*
* @param { number } keyCode - Key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **401** is reported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
triggerKey(keyCode: number, displayId: number): Promise<void>;
/**
* Triggers a combination key event based on the specified key values. This API uses a promise to return the result.
* For example, if the value of **Key** is (2072, 2019), the combination key **Ctrl+C** that matches the value is
* found and clicked.
*
* @param { number } key0 - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @param { number } key1 - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @param { number } [key2] - Third key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
triggerCombineKeys(key0: number, key1: number, key2?: number): Promise<void>;
/**
* Triggers a combination key event based on the specified key values on the specified screen. This API uses a
* promise to return the result. For example, if the value of **Key** is (2072, 2019), the combination key **Ctrl+C**
* that matches the value is found and clicked.
*
* @param { number } key0 - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @param { number } key1 - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* @param { number } [key2] - Third key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [displayId] - Display ID. The value is an integer greater than or equal to 0. The default value is the
* default display ID of the device.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
triggerCombineKeys(key0: number, key1: number, key2?: number, displayId?: number): Promise<void>;
/**
* Clicks the target coordinate point. This API uses a promise to return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer greater
* than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
click(x: number, y: number): Promise<void>;
/**
* Double-clicks the target coordinate point. This API uses a promise to return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer greater
* than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
doubleClick(x: number, y: number): Promise<void>;
/**
* Long-clicks the target coordinate point. This API uses a promise to return the result.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer greater
* than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
longClick(x: number, y: number): Promise<void>;
/**
* Swipes from the start coordinate point to the target coordinate point. This API uses a promise to return the
* result.
*
* @param { number } startx - Number, which indicates the horizontal coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } starty - Number, which indicates the vertical coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endx - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endy - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } [speed] - Swipe speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range
* , the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
swipe(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise<void>;
/**
* Drags from the start coordinate point to the target coordinate point. This API uses a promise to return the result
* .
*
* @param { number } startx - Number, which indicates the horizontal coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } starty - Number, which indicates the vertical coordinate of the start point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endx - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } endy - Number, which indicates the vertical coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } [speed] - Drag speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range
* , the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
drag(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise<void>;
/**
* Clicks the target coordinate point. This API uses a promise to return the result.
*
* @param { Point } point - Point object, which is used to transfer the target point information.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
clickAt(point: Point): Promise<void>;
/**
* Click on the specified location on the screen, with optional touch options.
*
* @param { Point } point - the coordinate point where the finger touches the screen.
* @param { TouchOptions } [options] - the options for the click operation.
* Only the 'pressure' property is applicable for this method.
* Setting other properties will result in a BusinessError 17000007.
* Default value: Refer to the default value of TouchOptions.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
clickAtWithOptions(point: Point, options?: TouchOptions): Promise<void>;
/**
* Double-clicks the target coordinate point. This API uses a promise to return the result.
*
* @param { Point } point - Point object, which is used to transfer the target point information.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
doubleClickAt(point: Point): Promise<void>;
/**
* Long-clicks the target coordinate point for a specified duration. This API uses a promise to return the result.
*
* @param { Point } point - Point object, which is used to transfer the target point information.
* @param { number } [duration] - Long-click duration, in ms.
* <br>Value range: The value should be >= 1500
* <br>Unit: ms
* <br>Default value: 1500
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
longClickAt(point: Point, duration?: number): Promise<void>;
/**
* LongClick on the specified location on the screen, with optional touch settings.
*
* @param { Point } point - the coordinate point where the finger touches the screen.
* @param { TouchOptions } [options] - the options for the long click operation.
* Only the 'duration' and 'pressure' properties are applicable for this method.
* Setting other properties will result in a BusinessError 17000007.
* Default value: Refer to the default value of TouchOptions.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
longClickAtWithOptions(point: Point, options?: TouchOptions): Promise<void>;
/**
* Swipes from the start coordinate point to the target coordinate point. This API uses a promise to return the
* result.
*
* @param { Point } from - Point object, which transfers the coordinates of the start point and the ID of the display to
* which the start point belongs.
* @param { Point } to - Point object, which transfers the coordinates of the target point and the ID of the display to
* which it belongs.
* <br> **Note**: The target point and the start point must be on the same screen. Otherwise, the **17000007**
* exception is thrown.
* @param { number } [speed] - Swipe speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range
* , the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
swipeBetween(from: Point, to: Point, speed?: number): Promise<void>;
/**
* Swipe on the screen between the specified points with optional touch options.
*
* @param { Point } from - the coordinate point where the finger touches the screen.
* @param { Point } to - the coordinate point where the finger leaves the screen.
* @param { TouchOptions } [options] - the options for the swipe operation.
* Only the 'speed' and 'pressure' properties are applicable for this method.
* Setting other properties will result in a BusinessError 17000007.
* Default value: Refer to the default value of TouchOptions.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
swipeBetweenWithOptions(from: Point, to: Point, options?: TouchOptions): Promise<void>;
/**
* Drags from the start point to the target point. You can specify the drag speed and the click duration before
* dragging. This API uses a promise to return the result.
*
* @param { Point } from - Point object, which transfers the coordinates of the start point and the ID of the display to
* which the start point belongs.
* @param { Point } to - Point object, which transfers the coordinates of the target point and the ID of the display to
* which it belongs.
* <br> **Note**: The target point and the start point must be on the same screen. Otherwise, the **17000007**
* exception is thrown.
* @param { number } [speed] - Drag speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range
* , the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @param { number } [duration] - The duration of the long press before dragging.
* <br>Value range: The value should be >= 1500
* <br>Unit: ms
* <br>Default value: 1500
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
dragBetween(from: Point, to: Point, speed?: number, duration?: number): Promise<void>;
/**
* Drag on the screen between the specified points with optional settings.
*
* @param { Point } from - the coordinate point where the finger touches the screen.
* @param { Point } to - the coordinate point where the finger leaves the screen.
* @param { TouchOptions } [options] - the options for the drag operation.
* Only the 'pressure', 'speed', and 'duration' properties are applicable for this method.
* Setting other properties will result in a BusinessError 17000007.
* Default value: Refer to the default value of TouchOptions.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
dragBetweenWithOptions(from: Point, to: Point, options?: TouchOptions): Promise<void>;
/**
* Captures the current screen and saves it as a PNG image to the given save path. This API uses a promise to return
* the result. This API can be used in scenarios where screenshots are supported.
*
* @param { string } savePath - File save path. The path must be the
* [sandbox path](docroot://file-management/app-sandbox-directory.md) of the current application.
* @returns { Promise<boolean> } - Promise used to return whether the screenshot operation is successful.
* The value **true** indicates that the operation is successful, and **false** indicates the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
screenCap(savePath: string): Promise<boolean>;
/**
* Captures the specified screen and saves it as a PNG image to the given save path. This API uses a promise to
* return the result. This API can be used in scenarios where screenshots are supported.
*
* @param { string } savePath - File save path. The path must be the
* [sandbox path](docroot://file-management/app-sandbox-directory.md) of the current application.
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **401** is reported.
* @returns { Promise<boolean> } Promise used to return whether the screenshot operation is successful. The value
* **true** indicates that the screen capture operation is successful, and **false** indicates the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
screenCap(savePath: string, displayId: number): Promise<boolean>;
/**
* Get the current layout information and save as file with json format.
*
* @param { string } savePath - the path where to store the json, must be in the application sandbox directory.
* The path must be the [sandbox path](docroot://file-management/app-sandbox-directory.md) of the current
* application.
* @param { number } [displayId] - the Id of the specified display, default is the displayId of the main screen.
* @returns { Promise<boolean> } true if dump layout and file-storing are completed successfully,false otherwise.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
dumpLayout(savePath: string, displayId?: number): Promise<boolean>;
/**
* Sets the display rotation of the current scene. This API uses a promise to return the result. It applies to
* rotatable scenarios.
*
* @param { DisplayRotation } rotation - Display rotation of the device.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified;
* 2. Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
setDisplayRotation(rotation: DisplayRotation): Promise<void>;
/**
* Obtains the display rotation of the current device. This API uses a promise to return the result.
*
* @returns { Promise<DisplayRotation> } - Promise used to return the display rotation of the current device.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
getDisplayRotation(): Promise<DisplayRotation>;
/**
* Obtains the display rotation of the specified device. This API uses a promise to return the result.
*
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **17000007** is reported.
* @returns { Promise<DisplayRotation> } - Promise used to return the display rotation of the specified device.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
getDisplayRotation(displayId: number): Promise<DisplayRotation>;
/**
* Enables or disables display rotation. This API uses a promise to return the result.
*
* @param { boolean } enabled - Whether the screen can be rotated. The value **true** indicates that the screen can be
* rotated, and **false** indicates the opposite.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
setDisplayRotationEnabled(enabled: boolean): Promise<void>;
/**
* Obtains the display size of the current device. This API uses a promise to return the result.
*
* @returns { Promise<Point> } - Promise used to return the **Point** object.
* The size of the current device screen is **Point.x * Point.y**.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
getDisplaySize(): Promise<Point>;
/**
* Obtains the size of the specified display on the current device. This API uses a promise to return the result.
*
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **17000007** is reported.
* @returns { Promise<Point> } Promise used to return the **Point** object. The size of the specified display is
* **Point.x * Point.y**.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 20
* @test
*/
getDisplaySize(displayId: number): Promise<Point>;
/**
* Obtains the display density of the current device. This API uses a promise to return the result.
*
* @returns { Promise<Point> } Promise used to return the **Point** object. The density of the current device display
* is **Point.x*Point.y**.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
getDisplayDensity(): Promise<Point>;
/**
* Obtains the density of the specified display of the current device. This API uses a promise to return the result.
*
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **17000007** is reported.
* @returns { Promise<Point> } Promise used to return the **Point** object. The density of the specified display is
* **Point.x*Point.y**.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
getDisplayDensity(displayId: number): Promise<Point>;
/**
* Wakes up the current display. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
wakeUpDisplay(): Promise<void>;
/**
* Injects an operation of returning to the home screen on the device. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
pressHome(): Promise<void>;
/**
* Injects an operation of returning to the home screen on the specified display. This API uses a promise to return
* the result.
*
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **17000007** is reported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
pressHome(displayId: number): Promise<void>;
/**
* Checks whether all components on the current UI are idle. This API uses a promise to return the result.
*
* @param { number } idleTime - Idle time threshold, in ms. If the duration for which a component remains inactive reaches
* this threshold, it is considered as idle. The value must be an integer greater than or equal to 0.
* <br>Unit: ms
* @param { number } timeout - Maximum waiting time, in milliseconds. The value is an integer greater than or equal to 0.
* <br>Unit: ms
* @returns { Promise<boolean> } - Promise used to return whether all components on the current UI are idle. The value true
* indicates that all components on the current UI are idle, and false indicates the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 9
* @test
*/
waitForIdle(idleTime: number, timeout: number): Promise<boolean>;
/**
* Simulates a fling operation. This API uses a promise to return the result.
*
* @param { Point } from - Coordinates of the point where the finger touches the screen.
* @param { Point } to - Coordinates of the point where the finger leaves the screen.
* @param { number } stepLen - Step length, in pixels. The value is an integer greater than or equal to 0.
* <br>Unit: px
* @param { number } speed - Fling speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range
* , the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 10]
* @atomicservice [since 11]
* @since 9
* @test
*/
fling(from: Point, to: Point, stepLen: number, speed: number): Promise<void>;
/**
* Injects a multi-finger operation into a device. This API uses a promise to return the result.
*
* @param { PointerMatrix } pointers - Scroll trajectory, including the number of fingers and an array of coordinates along
* the trajectory.
* @param { number } [speed] - Pointer action speed, in px/s.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<boolean> } - Promise used to return whether the operation is successful.
* The value **true** indicates that the operation is successful, and **false** indicates the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
injectMultiPointerAction(pointers: PointerMatrix, speed?: number): Promise<boolean>;
/**
* Simulates a fling operation with the specified direction and speed. This API uses a promise to return the result.
*
* @param { UiDirection } direction - Direction of the fling operation.
* @param { number } speed - Scroll speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 12]
* @atomicservice [since 11]
* @since 10
* @test
*/
fling(direction: UiDirection, speed: number): Promise<void>;
/**
* Simulates a fling operation on a specified display with the specified direction and speed. This API uses a promise
* to return the result.
*
* @param { UiDirection } direction - Direction of the fling operation.
* @param { number } speed - Fling speed, in px/s. The value ranges from 200 to 40000. If the set value is not in the range,
* the default value **600** is used.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @param { number } displayId - Display ID. The value is an integer greater than or equal to 0.
* <br> **Note**: If the input **displayId** does not exist, the exception **401** is reported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
fling(direction: UiDirection, speed: number, displayId: number): Promise<void>;
/**
* Injects a mouse click action at the specified coordinates, with the optional key or key combination. This API uses
* a promise to return the result. For example, if the value of **key1** is **2072**, the **Ctrl** button is pressed
* with the mouse click.
*
* @param { Point } p - Coordinates of the mouse click.
* @param { MouseButton } btnId - Mouse button pressed.
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
mouseClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
/**
* Moves the mouse cursor to the target point. This API uses a promise to return the result.
*
* @param { Point } p - Coordinates of the end point.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
mouseMoveTo(p: Point): Promise<void>;
/**
* Injects a mouse scroll action at the specified coordinates, with the optional key or key combination. This API
* uses a promise to return the result. For example, if the value of **key1** is **2072**, the **Ctrl** button is
* pressed with mouse scrolling.
*
* @param { Point } p - Coordinates of the mouse click.
* @param { boolean } down - Whether the mouse wheel scrolls downward. The value **true** indicates the mouse wheel scrolls
* downward, and **false** indicates the mouse wheel scrolls upward.
* @param { number } d - Number of ticks scrolled by the mouse wheel. A tick indicates a 120 px shift to the target point.
* The value is an integer greater than or equal to 0.
* <br>Value range: The value should be >= 0
* <br>Unit: px
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number): Promise<void>;
/**
* Injects a mouse scroll action at the specified coordinates, with the optional key or key combination and the
* specified scroll speed. This API uses a promise to return the result.
*
* @param { Point } p - Coordinates of the mouse click.
* @param { boolean } down - Whether the mouse wheel scrolls downward. The value **true** indicates the mouse wheel scrolls
* downward, and **false** indicates the mouse wheel scrolls upward.
* @param { number } d - Number of ticks scrolled by the mouse wheel. A tick indicates a 120 px shift to the target point. The
* value is an integer greater than or equal to 0.
* <br>Unit: cell
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [speed] - Scroll speed of the mouse wheel.
* <br>Value range:[1, 500]
* <br>Unit: ticks/s
* <br>Throws error code 401 if negative.
* <br>Default value: 20
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number, speed?: number): Promise<void>;
/**
* Captures the specified area of the current screen and saves the captured screenshot as a PNG image to the
* specified path. This API uses a promise to return the result. This API can be used in scenarios where screenshots
* are supported.
*
* @param { string } savePath - File save path. The path must be the
* [sandbox path](docroot://file-management/app-sandbox-directory.md) of the current application.
* @param { Rect } [rect] - Area of the screen to capture. The default value is the entire screen.
* @returns { Promise<boolean> } - Promise used to return whether the screenshot operation is successful.
* The value **true** indicates the screenshot operation is successful, and **false** indicates the opposite.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice [since 11]
* @since 10
* @test
*/
screenCapture(savePath: string, rect?: Rect): Promise<boolean>;
/**
* Creates a UI event listener {@link UIEventObserver}.
*
* @returns { UIEventObserver } - UI event listener {@link UIEventObserver}.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 10
* @test
*/
createUIEventObserver(): UIEventObserver;
/**
* Injects a double-click action at the specified coordinates, with the optional key or key combination. This API
* uses a promise to return the result. For example, if the value of **key** is **2072**, the **Ctrl** button is
* pressed with the double-click.
*
* @param { Point } p - Coordinates of the double-click.
* @param { MouseButton } btnId - Mouse button pressed.
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
mouseDoubleClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
/**
* Injects a mouse long-click action at the specified coordinates, with the optional key or key combination. This API
* uses a promise to return the result. For example, if the value of **Key** is **2072**, the **Ctrl** button is
* long-clicked with the mouse device.
*
* @param { Point } p - Coordinates of the long-click of the mouse device.
* @param { MouseButton } btnId - Mouse button pressed.
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
mouseLongClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
/**
* Injects a mouse long-click action at the specified coordinates, with the optional key or key combination and the
* specified duration. This API uses a promise to return the result. For example, if the value of **Key** is **2072**
* , the **Ctrl** button is long-clicked with the mouse device.
*
* @param { Point } p - Coordinates of the long-click of the mouse device.
* @param { MouseButton } btnId - Mouse button pressed.
* @param { number } [key1] - First key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [key2] - Second key value. The value is an integer greater than or equal to 0.
* For details, see [KeyCode]{@link @ohos.multimodalInput.keyCode:KeyCode}.
* <br>Default value: 0
* @param { number } [duration] - Long-click duration.
* <br>Value range: The value should be >= 1500
* <br>Unit: ms
* <br>Default value: 1500
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
mouseLongClick(p: Point, btnId: MouseButton, key1?: number, key2?: number, duration?: number): Promise<void>;
/**
* Moves the mouse pointer from the start point to the end point. This API uses a promise to return the result.
*
* @param { Point } from - Coordinates of the start point.
* @param { Point } to - Coordinates of the end point.
* @param { number } [speed] - Mouse move speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
mouseMoveWithTrack(from: Point, to: Point, speed?: number): Promise<void>;
/**
* Drags the mouse pointer from the start point to the end point. This API uses a promise to return the result.
*
* @param { Point } from - Coordinates of the start point.
* @param { Point } to - Coordinates of the end point.
* @param { number } [speed] - Mouse drag speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
mouseDrag(from: Point, to: Point, speed?: number): Promise<void>;
/**
* Drags the mouse from the start point to the end point. You can specify the dragging speed and the duration before
* dragging. This API uses a promise to return the result.
*
* @param { Point } from - Coordinates of the start point.
* @param { Point } to - Coordinates of the end point.
* @param { number } [speed] - Speed of mouse drag.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @param { number } [duration] - The duration of the long press before dragging.
* <br>Value range: The value should be >= 1500
* <br>Unit: ms
* <br>Default value: 1500
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
mouseDrag(from: Point, to: Point, speed?: number, duration?: number): Promise<void>;
/**
* Hold down the left mouse button and drag on the screen between the specified points,
* with optional touch and key settings.
*
* @param { Point } from - the starting point.
* @param { Point } to - the ending point.
* @param { TouchOptions } [touchOptions] - the touch options for speed and duration settings.
* Only 'speed' and 'duration' properties are valid in this method.
* Setting other properties will cause BusinessError 17000007.
* Default value: Refer to the default value of TouchOptions.
* @param { KeyOptions } [keyOptions] - the key options for key codes to press during drag.
* Default value: Refer to the default value of keyOptions.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
mouseDragWithOptions(from: Point, to: Point, touchOptions?: TouchOptions, keyOptions?: KeyOptions): Promise<void>;
/**
* Inputs text at a specified coordinate without clearing the original text in the component. This API uses a promise
* to return the result.
*
* @param { Point } p - Coordinates of the end point.
* @param { string } text - Input text. Currently, English, Chinese, and special characters are supported.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
inputText(p: Point, text: string): Promise<void>;
/**
* Inputs text at a specified coordinate point in a specified input mode. This API uses a promise to return the
* result.
*
* @param { Point } p - Coordinates of the end point.
* @param { string } text - Input text. Currently, English, Chinese, and special characters are supported.
* @param { InputTextMode } mode - Text input mode.
* For details, see [InputTextMode]{@link InputTextMode}.
* **NOTE**
*
* If **InputTextMode.addition** is set to **true**, the cursor moves to the end of the text and the specified
* text is input. If the value is **false**, the specified text is input at the coordinate point.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 801 Capability not supported. function can not work correctly due to limited device
* capabilities.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
inputText(p: Point, text: string, mode: InputTextMode): Promise<void>;
/**
* Simulates a multi-finger swipe gesture on the touchpad. This API uses a promise to return the result.
*
* @param { number } fingers - Number of fingers. The value can be 3 or 4.
* @param { UiDirection } direction - Swipe direction.
* @param { TouchPadSwipeOptions } [options] - Additional options for the multi-finger swipe gesture on the touchpad. The
* default values of the attributes in **{@link TouchPadSwipeOptions }** are used by default.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000005 This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
touchPadMultiFingerSwipe(fingers: number, direction: UiDirection, options?: TouchPadSwipeOptions): Promise<void>;
/**
* Simulates a pen click operation. This API uses a promise to return the result.
*
* @param { Point } point - Coordinates of the clicked point.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
penClick(point: Point): Promise<void>;
/**
* Simulates a pen long-click operation. This API uses a promise to return the result.
*
* @param { Point } point - Coordinates of the long-clicked point.
* @param { number } [pressure] - Swipe pressure of the pen. The value ranges from 0.0 to 1.0. The default value is **1.0**.
* <br>Value range:[0.0, 1.0]
* <br>Default value: 1.0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
penLongClick(point: Point, pressure?: number): Promise<void>;
/**
* Simulates a pen double-click operation. This API uses a promise to return the result.
*
* @param { Point } point - Coordinates of the double-clicked point.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
penDoubleClick(point: Point): Promise<void>;
/**
* Simulates a pen swipe operation. This API uses a promise to return the result.
*
* @param { Point } startPoint - Coordinates of the start point.
* @param { Point } endPoint - Coordinates of the end point.
* @param { number } [speed] - Speed of pen swipe.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @param { number } [pressure] - Swipe pressure of the pen.
* <br>Value range:[0.0, 1.0]
* <br>Default value: 1.0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
penSwipe(startPoint: Point, endPoint: Point, speed?: number, pressure?: number): Promise<void>;
/**
* Simulates a continuous multi-point pen injection operation. This API uses a promise to return the result.
*
* @param { PointerMatrix } pointers - Scroll trajectory, including the number of fingers and an array of coordinates along
* the trajectory.
* **Note**: Currently, only the single-finger operation is supported. The value of **fingers** in
* **PointerMatrix** must be set to **1**.
* @param { number } [speed] - Pen pointer action speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 401 if negative.
* <br>Default value: 600
* @param { number } [pressure] - Injection pressure.
* <br>Value range:[0.0, 1.0]
* <br>Default value: 1.0
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 18
* @test
*/
injectPenPointerAction(pointers: PointerMatrix, speed?: number, pressure?: number): Promise<void>;
/**
* Trigger pen key operation.
*
* Supported combinations:
*
* - HANDWRITING mode: HANDWRITING key with CLICK or DOUBLE_CLICK operation.
* - AIR_MOUSE mode: AIR_MOUSE key with CLICK or DOUBLE_CLICK operation (requires point in options),
* HANDWRITING key with CLICK or DOUBLE_CLICK operation, SMART key with CLICK operation.
* Other combinations will result in a BusinessError 17000007.
*
* @param { PenKey } key - the pen key to operate.
* @param { PenMode } mode - the pen mode.
* @param { PenKeyOperation } operation - the operation type.
* @param { PenKeyOperationOptions } [options] - the operation options, including optional coordinate point.
* Default value: Refer to the default value of PenKeyOperationOption.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed. Unsupported key, mode, and operation combination.
* @syscap SystemCapability.Test.UiTest
* @FaAndStageModel
* @atomicservice
* @since 26.0.0
* @test
*/
triggerPenKey(key: PenKey, mode: PenMode, operation: PenKeyOperation, options?: PenKeyOperationOptions): Promise<void>;
/**
* Injects a crown rotation event. You can specify the rotation speed. This API uses a promise to return the result.
*
* @param { number } d - Number of rotation ticks. A positive value indicates rotation, and a negative value indicates
* counterclockwise rotation. The value must be an integer.
* @param { number } [speed] - Rotation speed.
* <br>Unit: ticks/s.
* <br>Value range: [1, 500]
* <br>Throws error code 17000007 if negative.
* <br>Default value: 20
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
crownRotate(d: number, speed?: number): Promise<void>;
/**
* Long-clicks at the specified coordinates and checks whether the target component exists. This API uses a promise
* to return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @param { Point } point - Coordinates of the long-clicked point.
* @param { number } [duration] - Long-click duration.
* <br>Value range: The value should be >= 1500
* <br>Default value: 1500
* @returns { Promise<boolean> } - Promise used to return whether the target component exists during a long-click
* operation. The value **true** indicates that the target component exists, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 26.0.0]
* @atomicservice
* @since 22
* @test
*/
isComponentPresentWhenLongClick(on: On, point: Point, duration?: number): Promise<boolean>;
/**
* Drags from the start point to the end point and checks whether the target component exists. This API uses a
* promise to return the result.
*
* @param { On } on - Attributes of the target {@link Component}.
* @param { Point } from - Point object, which transfers the coordinates of the start point and the ID
* of the display to which the start point belongs.
* @param { Point } to - Point object, which transfers the coordinates of the target point and the ID
* of the display to which it belongs.
* <br> **Note**: The target point and the start point must be on the same screen. Otherwise, the **17000007**
* exception is thrown.
* @param { number } [speed] - Drag speed.
* <br>Value range:[200, 40000]
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @param { number } [duration] - The duration of the long press before dragging.
* <br>Value range: The value should be >= 1500
* <br>Default value: 1500
* @returns { Promise<boolean> } - Promise used to return whether the target component exists during the dragging
* operation. The value **true** indicates that the target component exists, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
isComponentPresentWhenDrag(on: On, from: Point, to: Point, speed?: number, duration?: number): Promise<boolean>;
/**
* Swipes from the start point to the end point and checks whether the target component exists. This API uses a
* promise to return the result.
*
* @param { On } on - Attributes of the target component.
* @param { Point } from - Point object, which transfers the coordinates of the start point and the ID of
* the display to which the start point belongs.
* @param { Point } to - Point object, which transfers the coordinates of the target point and the ID
* of the display to
* which it belongs.
* <br> **Note**: The target point and the start point must be on the same screen. Otherwise, the **17000007**
* exception is thrown.
* @param { number } [speed] - Scroll speed.
* <br>Value range:[200, 40000]
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @returns { Promise<boolean> } - Promise used to return whether the target component exists during the swiping
* operation.The value **true** indicates that the target component exists, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
isComponentPresentWhenSwipe(on: On, from: Point, to: Point, speed?: number): Promise<boolean>;
/**
* Simulates a two-finger scroll gesture on the touchpad. This API uses a promise to return the result.
*
* @param { Point } point - Point of the mouse cursor when the two-finger scrolling is performed on the touchpad.
* @param { UiDirection } direction - Direction of two-finger scrolling on the touchpad.
* @param { number } d - Number of grids scrolled by two fingers on the touchpad. A grid indicates a 120 px shift to the
* target point. The value is an integer greater than or equal to 0.
* @param { number } [speed] - Speed of two-finger scrolling on the touchpad.
* <br>Unit: ticks/s.
* <br>Value range: [1, 500]
* <br>Throws error code 17000007 if negative.
* <br>Default value: 20
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
touchPadTwoFingersScroll(point: Point, direction: UiDirection, d: number, speed?: number): Promise<void>;
/**
* Simulates a knuckle knock on the display. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > If the knuckle gesture is disabled on the device<!--RP4--><!--RP4End-->, 17000005 is returned.
*
* @param { Array<Point> } pointers - Array of knuckle knock coordinates on the display. The array length can be 1 or 2.
* @param { number } times - Number of consecutive knocks on the display.
* <br>Value range:[1,2]
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
knuckleKnock(pointers: Array<Point>, times: number): Promise<void>;
/**
* Simulates a multi-point knuckle scrolling operation. This API uses a promise to return the result.
*
* > **NOTE**
* >
* > If the knuckle gesture is disabled on the device<!--RP4--><!--RP4End-->, 17000005 is returned.
*
* @param { PointerMatrix } pointers - Scroll trajectory, including the number of fingers and an array of
* coordinates along the trajectory.
*
* **Note**: Currently, only the single-finger operation is supported. The value of **fingers** in
* **PointerMatrix** must be set to **1**.
* @param { number } [speed] - Knuckle pointer action speed.
* <br>Value range:[200, 40000]
* <br>Unit: px/s.
* <br>Throws error code 17000007 if negative.
* <br>Default value: 600
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @throws { BusinessError } 17000007 - Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 22
* @test
*/
injectKnucklePointerAction(pointers: PointerMatrix, speed?: number): Promise<void>;
}
/**
* The **UiWindow** class represents a window on the UI and provides APIs for obtaining window attributes, dragging a
* window, and adjusting the window size.
* All APIs provided in this class use a promise to return the result and must be invoked using **await**.
*
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
declare class UiWindow {
/**
* Obtains the bundle name of the application to which a window belongs. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the bundle name of the application to which the window belongs.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
getBundleName(): Promise<string>;
/**
* Obtains the bounds information of a window. This API uses a promise to return the result.
*
* @returns { Promise<Rect> } - Promise used to return the window border information.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
getBounds(): Promise<Rect>;
/**
* Obtains the window title. This API uses a promise to return the result.
*
* @returns { Promise<string> } - Promise used to return the window title.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
getTitle(): Promise<string>;
/**
* Obtains the window mode. This API uses a promise to return the result.
*
* @returns { Promise<WindowMode> } - Promise used to return the window mode information.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
getWindowMode(): Promise<WindowMode>;
/**
* Checks whether a window is focused. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the window is focused. The value **true** indicates that
* the component is focused, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
isFocused(): Promise<boolean>;
/**
* Checks whether a window is active. This API uses a promise to return the result.
*
*
* @returns { Promise<boolean> } - Promise used to return whether the window is active. The value **true** indicates that
* the window is active, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @since 9
* @deprecated since 11
* @useinstead UiWindow#isActive
* @test
*/
isActived(): Promise<boolean>;
/**
* Focuses a window. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
focus(): Promise<void>;
/**
* Moves a window to the target point. This API uses a promise to return the result. This API is applicable to
* moveable windows.
*
* @param { number } x - Number, which indicates the horizontal coordinate of the target point. The value is an integer
* greater than or equal to 0.
* <br>Unit: px
* @param { number } y - Number, which indicates the vertical coordinate of the target point. The value is an integer greater
* than or equal to 0.
* <br>Unit: px
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
moveTo(x: number, y: number): Promise<void>;
/**
* Resizes a window based on the specified width, height, and direction. This API uses a promise to return the
* result. This API is applicable to resizable windows.
*
* @param { number } wide - Width of the adjusted window, in number format.
* The value is an integer greater than or equal to 0.
* <br>Unit: px
* @param { number } height - Height of the adjusted window, in number format.
* The value is an integer greater than or equal to 0.
* <br>Unit: px
* @param { ResizeDirection } direction - Resize direction.
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
resize(wide: number, height: number, direction: ResizeDirection): Promise<void>;
/**
* Switches to the split-screen mode. This API uses a promise to return the result. This API is applicable to
* windows that support screen splitting.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
split(): Promise<void>;
/**
* Maximizes a window. This API uses a promise to return the result. This API is applicable to windows that can be
* maximized.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
maximize(): Promise<void>;
/**
* Minimizes a window. This API uses a promise to return the result. This API is applicable to windows that can be
* minimized.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
minimize(): Promise<void>;
/**
* Resumes a window to its previous mode. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
resume(): Promise<void>;
/**
* Closes a window. This API uses a promise to return the result.
*
* @returns { Promise<void> } - Promise that returns no value.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @throws { BusinessError } 17000005 - This operation is not supported.
* @syscap SystemCapability.Test.UiTest
* @atomicservice [since 11]
* @since 9
* @test
*/
close(): Promise<void>;
/**
* Checks whether a window is active. This API uses a promise to return the result.
*
* @returns { Promise<boolean> } - Promise used to return whether the window is active. The value **true** indicates that
* the window is active, and **false** indicates the opposite.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 11
* @test
*/
isActive(): Promise<boolean>;
/**
* Obtains the ID of the display to which a window belongs. This API uses a promise to return the result.
*
* @returns { Promise<number> } - Promise used to return the ID of the display to which the window belongs.
* @throws { BusinessError } 17000002 - The API does not support concurrent calls.
* @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
* @syscap SystemCapability.Test.UiTest
* @atomicservice
* @since 20
* @test
*/
getDisplayId(): Promise<number>;
}
/**
* Represents a two-dimensional array of pointers on the device display, it's used to build a
* multi-finger trace which can be injected with UiDriver.
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
declare class PointerMatrix {
/**
* Creates a **PointerMatrix** object and returns the object created. This API is a static API.
*
* @param { number } fingers - Number of fingers injected during the multi-finger operation.
* <br>Value range:[1, 10]
* @param { number } steps - Number of steps performed by a finger.
* <br>Value range:[1, 1000]
* @returns { PointerMatrix } - **PointerMatrix** object created.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
static create(fingers: number, steps: number): PointerMatrix;
/**
* Sets the coordinates for the action corresponding to the specified finger and step in the **PointerMatrix**
* object.
*
* @param { number } finger - Number of fingers. The value is an integer greater than or equal to 0 and cannot exceed the
* number of fingers set when the **PointerMatrix** object is constructed.
* @param { number } step - Number of steps. The value is an integer greater than or equal to 0 and cannot exceed the number
* of steps set when the **PointerMatrix** object is constructed.
* @param { Point } point - Coordinates of the action. It is recommended that the distance between adjacent coordinates be
* within the range of 10 px to 80 px.
* @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.
* Incorrect parameter types; 3. Parameter verification failed.
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
setPoint(finger: number, step: number, point: Point): void;
}
/**
* The static builder for building {@link By}object conveniently,usage example:BY.text('txt').enabled(true).
*
* @syscap SystemCapability.Test.UiTest
* @since 8
* @deprecated since 9
* @useinstead ohos.UiTest.ON
* @test
*/
declare const BY: By;
/**
* The static builder for building {@link On}object conveniently,usage example:ON.text('txt').enabled(true).
*
* @syscap SystemCapability.Test.UiTest
* @crossplatform [since 11]
* @atomicservice [since 11]
* @since 9
* @test
*/
declare const ON: On;
export { Component, Driver, UiWindow, ON, On, MatchPattern, DisplayRotation, ResizeDirection, WindowMode, Point, WindowFilter, Rect, PointerMatrix, UiDirection, MouseButton, UIElementInfo, UIEventObserver, TouchPadSwipeOptions, InputTextMode, WindowChangeType, ComponentEventType, WindowChangeOptions, ComponentEventOptions, KeyOptions, TouchOptions, PenKey, PenKeyOperation, PenMode, PenKeyOperationOptions };
export { UiComponent, UiDriver, BY, By };
```
references/JsEtsAPIReference/api26/openharmony-js/@ohos.WorkSchedulerExtensionAbility.d.ts.md
# @ohos.WorkSchedulerExtensionAbility.d.ts
> API 26.0.0 Release declaration snapshot from DevEco Studio SDK 26.0.0.105.
```ts
/*
* Copyright (c) 2022-2026 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* The **WorkSchedulerExtensionAbility** module provides callbacks for deferred task scheduling. You can override the
* APIs provided by this module. When a deferred task is triggered, the system calls back the application through the
* APIs and processes the task logic in the callback.
*
* @file
* @kit BackgroundTasksKit
*/
import workScheduler from './@ohos.resourceschedule.workScheduler';
import _WorkSchedulerExtensionContext from './application/WorkSchedulerExtensionContext';
/**
* WorkSchedulerExtensionContext represents the context of WorkSchedulerExtensionAbility and is inherited from
* [ExtensionContext]{@link ./application/ExtensionContext:ExtensionContext}.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 10
*/
export type WorkSchedulerExtensionContext = _WorkSchedulerExtensionContext;
/**
* Provides callbacks to be invoked when the scheduling conditions are met or the scheduling ends, for example,
* [onWorkStart()]{@link WorkSchedulerExtensionAbility.onWorkStart} or
* [onWorkStop()]{@link WorkSchedulerExtensionAbility.onWorkStop} in WorkSchedulerExtensionAbility.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 9
*/
declare class WorkSchedulerExtensionAbility {
/**
* Context of the WorkSchedulerExtensionAbility. This context inherits from ExtensionContext.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 10
*/
context: WorkSchedulerExtensionContext;
/**
* Called when the system starts scheduling the deferred task.
*
* @param {workScheduler.WorkInfo} work - Deferred task that starts.
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 9
*/
onWorkStart(work: workScheduler.WorkInfo): void;
/**
* Called when the system stops scheduling the deferred task. This callback is triggered when the deferred task times
* out for 2 minutes or the [stopWork]{@link @ohos.resourceschedule.workScheduler:workScheduler.stopWork} API is
* called to cancel the task.
*
* @param {workScheduler.WorkInfo} work - Deferred task that stops.
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 9
*/
onWorkStop(work: workScheduler.WorkInfo): void;
}
/**
* Provides callbacks to be invoked when the scheduling conditions are met or the scheduling ends, for example,
* [onWorkStart()]{@link WorkSchedulerExtensionAbility.onWorkStart} or
* [onWorkStop()]{@link WorkSchedulerExtensionAbility.onWorkStop} in WorkSchedulerExtensionAbility.
*
* @syscap SystemCapability.ResourceSchedule.WorkScheduler
* @stagemodelonly
* @since 9
*/
export default WorkSchedulerExtensionAbility;
```
references/JsEtsAPIReference/INDEX.md
api26/hms-js/@hms.health.WearEngineLite.d.ts.md
api26/hms-js/@hms.health.service.d.ts.md
api26/hms-js/@hms.health.store.d.ts.md
api26/hms-kits/@kit.AODNavigationKit.d.ts.md
api26/hms-kits/@kit.AREngine.d.ts.md
api26/hms-kits/@kit.AccessoryKit.d.ts.md
api26/hms-kits/@kit.AccountKit.d.ts.md
api26/hms-kits/@kit.AgentFrameworkKit.d.ts.md
api26/hms-kits/@kit.AppGalleryKit.d.ts.md
api26/hms-kits/@kit.AppLinkingKit.d.ts.md
api26/hms-kits/@kit.CallKit.d.ts.md
api26/hms-kits/@kit.CallServiceKit.d.ts.md
api26/hms-kits/@kit.CarKit.d.ts.md
api26/hms-kits/@kit.CloudFoundationKit.d.ts.md
api26/hms-kits/@kit.ConfidentialSpaceKit.d.ts.md
api26/hms-kits/@kit.CoreSpeechKit.d.ts.md
api26/hms-kits/@kit.CoreVisionKit.d.ts.md
api26/hms-kits/@kit.DataAugmentationKit.d.ts.md
api26/hms-kits/@kit.DeskTopExtensionKit.d.ts.md
api26/hms-kits/@kit.DeviceSecurityKit.d.ts.md
api26/hms-kits/@kit.EnterpriseDataGuardKit.d.ts.md
api26/hms-kits/@kit.EnterpriseSpaceKit.d.ts.md
api26/hms-kits/@kit.EnterpriseThreatProtectionKit.d.ts.md
api26/hms-kits/@kit.FASTKit.d.ts.md
api26/hms-kits/@kit.FileManagerServiceKit.d.ts.md
api26/hms-kits/@kit.GameServiceKit.d.ts.md
api26/hms-kits/@kit.GraphicsAccelerateKit.d.ts.md
api26/hms-kits/@kit.HealthServiceKit.d.ts.md
api26/hms-kits/@kit.IAPKit.d.ts.md
api26/hms-kits/@kit.IntentsKit.d.ts.md
api26/hms-kits/@kit.LiveViewKit.d.ts.md
api26/hms-kits/@kit.MapKit.d.ts.md
api26/hms-kits/@kit.NaturalLanguageKit.d.ts.md
api26/hms-kits/@kit.NearLinkKit.d.ts.md
api26/hms-kits/@kit.NetworkBoostKit.d.ts.md
api26/hms-kits/@kit.OnlineAuthenticationKit.d.ts.md
api26/hms-kits/@kit.PDFKit.d.ts.md
api26/hms-kits/@kit.PaymentKit.d.ts.md
api26/hms-kits/@kit.Penkit.d.ts.md
api26/hms-kits/@kit.PreviewKit.d.ts.md
api26/hms-kits/@kit.PushKit.d.ts.md
api26/hms-kits/@kit.ReaderKit.d.ts.md
api26/hms-kits/@kit.RemoteCommunicationKit.d.ts.md
api26/hms-kits/@kit.RingtoneKit.d.ts.md
api26/hms-kits/@kit.ScanKit.d.ts.md
api26/hms-kits/@kit.ScenarioFusionKit.d.ts.md
api26/hms-kits/@kit.ScreenTimeGuardKit.d.ts.md
api26/hms-kits/@kit.ServiceCollaborationKit.d.ts.md
api26/hms-kits/@kit.ServiceSupportKit.d.ts.md
api26/hms-kits/@kit.ShareKit.d.ts.md
api26/hms-kits/@kit.SpatialReconKit.d.ts.md
api26/hms-kits/@kit.SpeechKit.d.ts.md
api26/hms-kits/@kit.StatusBarExtensionKit.d.ts.md
api26/hms-kits/@kit.StoreKit.d.ts.md
api26/hms-kits/@kit.UIDesignKit.d.ts.md
api26/hms-kits/@kit.VisionKit.d.ts.md
api26/hms-kits/@kit.WalletKit.d.ts.md
api26/hms-kits/@kit.WearEngine.d.ts.md
api26/hms-kits/@kit.WeatherServiceKit.d.ts.md
api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.FusionConnectivity.PartnerAgentExtensionContext.d.ts.md
api26/openharmony-js/@ohos.FusionConnectivity.partnerAgent.d.ts.md
api26/openharmony-js/@ohos.FusionConnectivity.ranging.d.ts.md
api26/openharmony-js/@ohos.InputMethodExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.InputMethodExtensionContext.d.ts.md
api26/openharmony-js/@ohos.InputMethodSubtype.d.ts.md
api26/openharmony-js/@ohos.PiPWindow.d.ts.md
api26/openharmony-js/@ohos.UiTest.d.ts.md
api26/openharmony-js/@ohos.WorkSchedulerExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.ability.ability.d.ts.md
api26/openharmony-js/@ohos.ability.dataUriUtils.d.ts.md
api26/openharmony-js/@ohos.ability.errorCode.d.ts.md
api26/openharmony-js/@ohos.ability.featureAbility.d.ts.md
api26/openharmony-js/@ohos.ability.particleAbility.d.ts.md
api26/openharmony-js/@ohos.ability.screenLockFileManager.d.ts.md
api26/openharmony-js/@ohos.ability.wantConstant.d.ts.md
api26/openharmony-js/@ohos.abilityAccessCtrl.d.ts.md
api26/openharmony-js/@ohos.accessibility.GesturePath.d.ts.md
api26/openharmony-js/@ohos.accessibility.GesturePoint.d.ts.md
api26/openharmony-js/@ohos.accessibility.d.ts.md
api26/openharmony-js/@ohos.account.appAccount.d.ts.md
api26/openharmony-js/@ohos.account.distributedAccount.d.ts.md
api26/openharmony-js/@ohos.account.osAccount.d.ts.md
api26/openharmony-js/@ohos.advertising.AdsServiceExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.advertising.d.ts.md
api26/openharmony-js/@ohos.ai.mindSporeLite.d.ts.md
api26/openharmony-js/@ohos.animator.d.ts.md
api26/openharmony-js/@ohos.app.ability.Ability.d.ts.md
api26/openharmony-js/@ohos.app.ability.AbilityConstant.d.ts.md
api26/openharmony-js/@ohos.app.ability.AbilityLifecycleCallback.d.ts.md
api26/openharmony-js/@ohos.app.ability.AbilityStage.d.ts.md
api26/openharmony-js/@ohos.app.ability.ActionExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.AppServiceExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.ApplicationStateChangeCallback.d.ts.md
api26/openharmony-js/@ohos.app.ability.AtomicServiceOptions.d.ts.md
api26/openharmony-js/@ohos.app.ability.ChildProcess.d.ts.md
api26/openharmony-js/@ohos.app.ability.ChildProcessArgs.d.ts.md
api26/openharmony-js/@ohos.app.ability.ChildProcessOptions.d.ts.md
api26/openharmony-js/@ohos.app.ability.CompletionHandler.d.ts.md
api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAbilityStartCallback.d.ts.md
api26/openharmony-js/@ohos.app.ability.CompletionHandlerForAtomicService.d.ts.md
api26/openharmony-js/@ohos.app.ability.Configuration.d.ts.md
api26/openharmony-js/@ohos.app.ability.ConfigurationConstant.d.ts.md
api26/openharmony-js/@ohos.app.ability.DriverExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.EmbeddableUIAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.EnvironmentCallback.d.ts.md
api26/openharmony-js/@ohos.app.ability.ExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.FenceExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.FenceExtensionContext.d.ts.md
api26/openharmony-js/@ohos.app.ability.InsightIntentContext.d.ts.md
api26/openharmony-js/@ohos.app.ability.InsightIntentDecorator.d.ts.md
api26/openharmony-js/@ohos.app.ability.InsightIntentEntryExecutor.d.ts.md
api26/openharmony-js/@ohos.app.ability.InsightIntentExecutor.d.ts.md
api26/openharmony-js/@ohos.app.ability.OpenLinkOptions.d.ts.md
api26/openharmony-js/@ohos.app.ability.PhotoEditorExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.PrintExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.ShareExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.StartOptions.d.ts.md
api26/openharmony-js/@ohos.app.ability.UIAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.UIExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.UIExtensionContentSession.d.ts.md
api26/openharmony-js/@ohos.app.ability.VpnExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.ability.Want.d.ts.md
api26/openharmony-js/@ohos.app.ability.abilityDelegatorRegistry.d.ts.md
api26/openharmony-js/@ohos.app.ability.abilityManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.appManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.appMemoryOptimizer.d.ts.md
api26/openharmony-js/@ohos.app.ability.appRecovery.d.ts.md
api26/openharmony-js/@ohos.app.ability.application.d.ts.md
api26/openharmony-js/@ohos.app.ability.autoFillManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.autoStartupManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.childProcessManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.common.d.ts.md
api26/openharmony-js/@ohos.app.ability.contextConstant.d.ts.md
api26/openharmony-js/@ohos.app.ability.continueManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.dataUriUtils.d.ts.md
api26/openharmony-js/@ohos.app.ability.dialogRequest.d.ts.md
api26/openharmony-js/@ohos.app.ability.errorManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.hyperSnapManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.insightIntent.d.ts.md
api26/openharmony-js/@ohos.app.ability.insightIntentProvider.d.ts.md
api26/openharmony-js/@ohos.app.ability.kioskManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.scriptManager.d.ts.md
api26/openharmony-js/@ohos.app.ability.systemConfiguration.d.ts.md
api26/openharmony-js/@ohos.app.ability.wantAgent.d.ts.md
api26/openharmony-js/@ohos.app.ability.wantConstant.d.ts.md
api26/openharmony-js/@ohos.app.agent.AgentExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.agent.AgentUIExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.agent.agentConstant.d.ts.md
api26/openharmony-js/@ohos.app.appstartup.StartupConfig.d.ts.md
api26/openharmony-js/@ohos.app.appstartup.StartupConfigEntry.d.ts.md
api26/openharmony-js/@ohos.app.appstartup.StartupListener.d.ts.md
api26/openharmony-js/@ohos.app.appstartup.startupManager.d.ts.md
api26/openharmony-js/@ohos.app.form.FormEditExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.form.FormExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.form.LiveFormExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.app.form.formBindingData.d.ts.md
api26/openharmony-js/@ohos.app.form.formInfo.d.ts.md
api26/openharmony-js/@ohos.app.form.formProvider.d.ts.md
api26/openharmony-js/@ohos.application.AccessibilityExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.application.BackupExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.application.Configuration.d.ts.md
api26/openharmony-js/@ohos.application.ConfigurationConstant.d.ts.md
api26/openharmony-js/@ohos.application.DistributedExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.application.DistributedExtensionContext.d.ts.md
api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.application.NotificationSubscriberExtensionContext.d.ts.md
api26/openharmony-js/@ohos.application.Want.d.ts.md
api26/openharmony-js/@ohos.application.abilityDelegatorRegistry.d.ts.md
api26/openharmony-js/@ohos.application.appManager.d.ts.md
api26/openharmony-js/@ohos.application.formBindingData.d.ts.md
api26/openharmony-js/@ohos.application.formError.d.ts.md
api26/openharmony-js/@ohos.application.formInfo.d.ts.md
api26/openharmony-js/@ohos.application.formProvider.d.ts.md
api26/openharmony-js/@ohos.application.testRunner.d.ts.md
api26/openharmony-js/@ohos.application.uriPermissionManager.d.ts.md
api26/openharmony-js/@ohos.arkui.ArcAlphabetIndexer.d.ts.md
api26/openharmony-js/@ohos.arkui.ArcList.d.ts.md
api26/openharmony-js/@ohos.arkui.ArcScrollBar.d.ts.md
api26/openharmony-js/@ohos.arkui.ArcSwiper.d.ts.md
api26/openharmony-js/@ohos.arkui.Prefetcher.d.ts.md
api26/openharmony-js/@ohos.arkui.StateManagement.d.ts.md
api26/openharmony-js/@ohos.arkui.UIContext.d.ts.md
api26/openharmony-js/@ohos.arkui.WithEnv.d.ts.md
api26/openharmony-js/@ohos.arkui.componentSnapshot.d.ts.md
api26/openharmony-js/@ohos.arkui.componentUtils.d.ts.md
api26/openharmony-js/@ohos.arkui.components.ArkDynamicLayout.d.ts.md
api26/openharmony-js/@ohos.arkui.components.ArkLazyColumnLayout.d.ts.md
api26/openharmony-js/@ohos.arkui.components.ArkLazyDynamicLayout.d.ts.md
api26/openharmony-js/@ohos.arkui.components.ArkLazyWaterFlowLayout.d.ts.md
api26/openharmony-js/@ohos.arkui.components.ContainerReader.d.ts.md
api26/openharmony-js/@ohos.arkui.components.SelectionContainer.d.ts.md
api26/openharmony-js/@ohos.arkui.dragController.d.ts.md
api26/openharmony-js/@ohos.arkui.drawableDescriptor.d.ts.md
api26/openharmony-js/@ohos.arkui.inspector.d.ts.md
api26/openharmony-js/@ohos.arkui.layoutAlgorithm.d.ts.md
api26/openharmony-js/@ohos.arkui.lazyLayoutAlgorithm.d.ts.md
api26/openharmony-js/@ohos.arkui.modifier.d.ts.md
api26/openharmony-js/@ohos.arkui.node.d.ts.md
api26/openharmony-js/@ohos.arkui.observer.d.ts.md
api26/openharmony-js/@ohos.arkui.shape.d.ts.md
api26/openharmony-js/@ohos.arkui.theme.d.ts.md
api26/openharmony-js/@ohos.arkui.uiExtension.d.ts.md
api26/openharmony-js/@ohos.arkui.uiMaterial.d.ts.md
api26/openharmony-js/@ohos.backgroundTaskManager.d.ts.md
api26/openharmony-js/@ohos.base.d.ts.md
api26/openharmony-js/@ohos.batteryInfo.d.ts.md
api26/openharmony-js/@ohos.bluetooth.a2dp.d.ts.md
api26/openharmony-js/@ohos.bluetooth.access.d.ts.md
api26/openharmony-js/@ohos.bluetooth.baseProfile.d.ts.md
api26/openharmony-js/@ohos.bluetooth.ble.d.ts.md
api26/openharmony-js/@ohos.bluetooth.common.d.ts.md
api26/openharmony-js/@ohos.bluetooth.connection.d.ts.md
api26/openharmony-js/@ohos.bluetooth.constant.d.ts.md
api26/openharmony-js/@ohos.bluetooth.d.ts.md
api26/openharmony-js/@ohos.bluetooth.hfp.d.ts.md
api26/openharmony-js/@ohos.bluetooth.hid.d.ts.md
api26/openharmony-js/@ohos.bluetooth.map.d.ts.md
api26/openharmony-js/@ohos.bluetooth.opp.d.ts.md
api26/openharmony-js/@ohos.bluetooth.pan.d.ts.md
api26/openharmony-js/@ohos.bluetooth.pbap.d.ts.md
api26/openharmony-js/@ohos.bluetooth.socket.d.ts.md
api26/openharmony-js/@ohos.bluetooth.wearDetection.d.ts.md
api26/openharmony-js/@ohos.bluetoothManager.d.ts.md
api26/openharmony-js/@ohos.buffer.d.ts.md
api26/openharmony-js/@ohos.bundle.bundleManager.d.ts.md
api26/openharmony-js/@ohos.bundle.d.ts.md
api26/openharmony-js/@ohos.bundle.defaultAppManager.d.ts.md
api26/openharmony-js/@ohos.bundle.launcherBundleManager.d.ts.md
api26/openharmony-js/@ohos.bundle.overlay.d.ts.md
api26/openharmony-js/@ohos.bundle.pluginBundleManager.d.ts.md
api26/openharmony-js/@ohos.bundle.shortcutManager.d.ts.md
api26/openharmony-js/@ohos.bundle.skillManager.d.ts.md
api26/openharmony-js/@ohos.bundleState.d.ts.md
api26/openharmony-js/@ohos.busManager.serial.d.ts.md
api26/openharmony-js/@ohos.bytrace.d.ts.md
api26/openharmony-js/@ohos.calendarManager.d.ts.md
api26/openharmony-js/@ohos.commonEvent.d.ts.md
api26/openharmony-js/@ohos.commonEventManager.d.ts.md
api26/openharmony-js/@ohos.connectedTag.d.ts.md
api26/openharmony-js/@ohos.contact.d.ts.md
api26/openharmony-js/@ohos.continuation.continuationManager.d.ts.md
api26/openharmony-js/@ohos.convertxml.d.ts.md
api26/openharmony-js/@ohos.curves.d.ts.md
api26/openharmony-js/@ohos.customization.customConfig.d.ts.md
api26/openharmony-js/@ohos.data.ValuesBucket.d.ts.md
api26/openharmony-js/@ohos.data.cloudData.d.ts.md
api26/openharmony-js/@ohos.data.cloudExtension.d.ts.md
api26/openharmony-js/@ohos.data.commonType.d.ts.md
api26/openharmony-js/@ohos.data.dataAbility.d.ts.md
api26/openharmony-js/@ohos.data.dataShare.d.ts.md
api26/openharmony-js/@ohos.data.dataSharePredicates.d.ts.md
api26/openharmony-js/@ohos.data.distributedData.d.ts.md
api26/openharmony-js/@ohos.data.distributedDataObject.d.ts.md
api26/openharmony-js/@ohos.data.distributedKVStore.d.ts.md
api26/openharmony-js/@ohos.data.intelligence.d.ts.md
api26/openharmony-js/@ohos.data.preferences.d.ts.md
api26/openharmony-js/@ohos.data.rdb.d.ts.md
api26/openharmony-js/@ohos.data.relationalStore.d.ts.md
api26/openharmony-js/@ohos.data.storage.d.ts.md
api26/openharmony-js/@ohos.data.unifiedDataChannel.d.ts.md
api26/openharmony-js/@ohos.data.uniformDataStruct.d.ts.md
api26/openharmony-js/@ohos.data.uniformTypeDescriptor.d.ts.md
api26/openharmony-js/@ohos.deviceAttest.d.ts.md
api26/openharmony-js/@ohos.deviceInfo.d.ts.md
api26/openharmony-js/@ohos.display.d.ts.md
api26/openharmony-js/@ohos.distributedDeviceManager.d.ts.md
api26/openharmony-js/@ohos.distributedHardware.deviceManager.d.ts.md
api26/openharmony-js/@ohos.distributedHardware.mechanicManager.d.ts.md
api26/openharmony-js/@ohos.distributedsched.abilityConnectionManager.d.ts.md
api26/openharmony-js/@ohos.distributedsched.linkEnhance.d.ts.md
api26/openharmony-js/@ohos.distributedsched.proxyChannelManager.d.ts.md
api26/openharmony-js/@ohos.dlpPermission.d.ts.md
api26/openharmony-js/@ohos.document.d.ts.md
api26/openharmony-js/@ohos.driver.deviceManager.d.ts.md
api26/openharmony-js/@ohos.effectKit.d.ts.md
api26/openharmony-js/@ohos.enterprise.EnterpriseAdminExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.enterprise.accountManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.adminManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.applicationManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.bluetoothManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.browser.d.ts.md
api26/openharmony-js/@ohos.enterprise.bundleManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.common.d.ts.md
api26/openharmony-js/@ohos.enterprise.deviceControl.d.ts.md
api26/openharmony-js/@ohos.enterprise.deviceInfo.d.ts.md
api26/openharmony-js/@ohos.enterprise.deviceSettings.d.ts.md
api26/openharmony-js/@ohos.enterprise.locationManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.networkManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.restrictions.d.ts.md
api26/openharmony-js/@ohos.enterprise.securityManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.systemManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.telephonyManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.usbManager.d.ts.md
api26/openharmony-js/@ohos.enterprise.wifiManager.d.ts.md
api26/openharmony-js/@ohos.events.emitter.d.ts.md
api26/openharmony-js/@ohos.fastbuffer.d.ts.md
api26/openharmony-js/@ohos.faultLogger.d.ts.md
api26/openharmony-js/@ohos.file.BackupExtensionContext.d.ts.md
api26/openharmony-js/@ohos.file.cloudSync.d.ts.md
api26/openharmony-js/@ohos.file.cloudSyncManager.d.ts.md
api26/openharmony-js/@ohos.file.environment.d.ts.md
api26/openharmony-js/@ohos.file.fileAccess.d.ts.md
api26/openharmony-js/@ohos.file.fileuri.d.ts.md
api26/openharmony-js/@ohos.file.fs.d.ts.md
api26/openharmony-js/@ohos.file.hash.d.ts.md
api26/openharmony-js/@ohos.file.keyManager.d.ts.md
api26/openharmony-js/@ohos.file.photoAccessHelper.d.ts.md
api26/openharmony-js/@ohos.file.picker.d.ts.md
api26/openharmony-js/@ohos.file.securityLabel.d.ts.md
api26/openharmony-js/@ohos.file.statvfs.d.ts.md
api26/openharmony-js/@ohos.file.storageStatistics.d.ts.md
api26/openharmony-js/@ohos.fileio.d.ts.md
api26/openharmony-js/@ohos.fileshare.d.ts.md
api26/openharmony-js/@ohos.font.d.ts.md
api26/openharmony-js/@ohos.geoLocationManager.d.ts.md
api26/openharmony-js/@ohos.geolocation.d.ts.md
api26/openharmony-js/@ohos.graphics.colorSpaceManager.d.ts.md
api26/openharmony-js/@ohos.graphics.common2D.d.ts.md
api26/openharmony-js/@ohos.graphics.displaySync.d.ts.md
api26/openharmony-js/@ohos.graphics.drawing.d.ts.md
api26/openharmony-js/@ohos.graphics.hdrCapability.d.ts.md
api26/openharmony-js/@ohos.graphics.scene.d.ts.md
api26/openharmony-js/@ohos.graphics.text.d.ts.md
api26/openharmony-js/@ohos.graphics.uiEffect.d.ts.md
api26/openharmony-js/@ohos.hiAppEvent.d.ts.md
api26/openharmony-js/@ohos.hiTraceChain.d.ts.md
api26/openharmony-js/@ohos.hiTraceMeter.d.ts.md
api26/openharmony-js/@ohos.hichecker.d.ts.md
api26/openharmony-js/@ohos.hidebug.d.ts.md
api26/openharmony-js/@ohos.hilog.d.ts.md
api26/openharmony-js/@ohos.hiviewdfx.FaultLogExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.hiviewdfx.FaultLogExtensionContext.d.ts.md
api26/openharmony-js/@ohos.hiviewdfx.hiAppEvent.d.ts.md
api26/openharmony-js/@ohos.hiviewdfx.hiRetrieval.d.ts.md
api26/openharmony-js/@ohos.hiviewdfx.jsLeakWatcher.d.ts.md
api26/openharmony-js/@ohos.i18n.d.ts.md
api26/openharmony-js/@ohos.identifier.oaid.d.ts.md
api26/openharmony-js/@ohos.inputMethod.ExtraConfig.d.ts.md
api26/openharmony-js/@ohos.inputMethod.Panel.d.ts.md
api26/openharmony-js/@ohos.inputMethod.d.ts.md
api26/openharmony-js/@ohos.inputMethodEngine.d.ts.md
api26/openharmony-js/@ohos.intelligentScene.d.ts.md
api26/openharmony-js/@ohos.intl.d.ts.md
api26/openharmony-js/@ohos.matrix4.d.ts.md
api26/openharmony-js/@ohos.measure.d.ts.md
api26/openharmony-js/@ohos.mediaquery.d.ts.md
api26/openharmony-js/@ohos.multimedia.audio.d.ts.md
api26/openharmony-js/@ohos.multimedia.audioHaptic.d.ts.md
api26/openharmony-js/@ohos.multimedia.avCastPickerParam.d.ts.md
api26/openharmony-js/@ohos.multimedia.avMusicTemplate.d.ts.md
api26/openharmony-js/@ohos.multimedia.avsession.d.ts.md
api26/openharmony-js/@ohos.multimedia.camera.d.ts.md
api26/openharmony-js/@ohos.multimedia.cameraPicker.d.ts.md
api26/openharmony-js/@ohos.multimedia.drm.d.ts.md
api26/openharmony-js/@ohos.multimedia.image.d.ts.md
api26/openharmony-js/@ohos.multimedia.media.d.ts.md
api26/openharmony-js/@ohos.multimedia.movingphotoview.d.ts.md
api26/openharmony-js/@ohos.multimedia.systemSoundManager.d.ts.md
api26/openharmony-js/@ohos.multimedia.videoProcessing.d.ts.md
api26/openharmony-js/@ohos.multimedia.videoProcessingEngine.d.ts.md
api26/openharmony-js/@ohos.multimodalAwareness.deviceStatus.d.ts.md
api26/openharmony-js/@ohos.multimodalAwareness.metadataBinding.d.ts.md
api26/openharmony-js/@ohos.multimodalAwareness.motion.d.ts.md
api26/openharmony-js/@ohos.multimodalAwareness.onScreen.d.ts.md
api26/openharmony-js/@ohos.multimodalAwareness.userStatus.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.gestureEvent.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.infraredEmitter.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.inputConsumer.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.inputDevice.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.inputDeviceCooperate.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.inputEvent.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.inputEventClient.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.intentionCode.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.keyCode.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.keyEvent.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.mouseEvent.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.pointer.d.ts.md
api26/openharmony-js/@ohos.multimodalInput.touchEvent.d.ts.md
api26/openharmony-js/@ohos.nearlink.advertising.d.ts.md
api26/openharmony-js/@ohos.nearlink.cdsm.d.ts.md
api26/openharmony-js/@ohos.nearlink.constant.d.ts.md
api26/openharmony-js/@ohos.nearlink.dataTransfer.d.ts.md
api26/openharmony-js/@ohos.nearlink.manager.d.ts.md
api26/openharmony-js/@ohos.nearlink.remoteDevice.d.ts.md
api26/openharmony-js/@ohos.nearlink.scan.d.ts.md
api26/openharmony-js/@ohos.nearlink.ssap.d.ts.md
api26/openharmony-js/@ohos.net.connection.d.ts.md
api26/openharmony-js/@ohos.net.eap.d.ts.md
api26/openharmony-js/@ohos.net.ethernet.d.ts.md
api26/openharmony-js/@ohos.net.http.d.ts.md
api26/openharmony-js/@ohos.net.mdns.d.ts.md
api26/openharmony-js/@ohos.net.netFirewall.d.ts.md
api26/openharmony-js/@ohos.net.networkSecurity.d.ts.md
api26/openharmony-js/@ohos.net.policy.d.ts.md
api26/openharmony-js/@ohos.net.sharing.d.ts.md
api26/openharmony-js/@ohos.net.socket.d.ts.md
api26/openharmony-js/@ohos.net.statistics.d.ts.md
api26/openharmony-js/@ohos.net.vpn.d.ts.md
api26/openharmony-js/@ohos.net.vpnExtension.d.ts.md
api26/openharmony-js/@ohos.net.webSocket.d.ts.md
api26/openharmony-js/@ohos.nfc.cardEmulation.d.ts.md
api26/openharmony-js/@ohos.nfc.controller.d.ts.md
api26/openharmony-js/@ohos.nfc.tag.d.ts.md
api26/openharmony-js/@ohos.notification.d.ts.md
api26/openharmony-js/@ohos.notificationExtensionSubscription.d.ts.md
api26/openharmony-js/@ohos.notificationManager.d.ts.md
api26/openharmony-js/@ohos.pasteboard.d.ts.md
api26/openharmony-js/@ohos.pluginComponent.d.ts.md
api26/openharmony-js/@ohos.power.d.ts.md
api26/openharmony-js/@ohos.print.d.ts.md
api26/openharmony-js/@ohos.privacyManager.d.ts.md
api26/openharmony-js/@ohos.process.d.ts.md
api26/openharmony-js/@ohos.prompt.d.ts.md
api26/openharmony-js/@ohos.promptAction.d.ts.md
api26/openharmony-js/@ohos.reminderAgent.d.ts.md
api26/openharmony-js/@ohos.reminderAgentManager.d.ts.md
api26/openharmony-js/@ohos.request.cacheDownload.d.ts.md
api26/openharmony-js/@ohos.request.d.ts.md
api26/openharmony-js/@ohos.resourceManager.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.backgroundProcessManager.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.backgroundTaskManager.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.deviceStandby.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.systemload.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.usageStatistics.d.ts.md
api26/openharmony-js/@ohos.resourceschedule.workScheduler.d.ts.md
api26/openharmony-js/@ohos.router.d.ts.md
api26/openharmony-js/@ohos.rpc.d.ts.md
api26/openharmony-js/@ohos.runningLock.d.ts.md
api26/openharmony-js/@ohos.screenLock.d.ts.md
api26/openharmony-js/@ohos.screenshot.d.ts.md
api26/openharmony-js/@ohos.secureElement.d.ts.md
api26/openharmony-js/@ohos.security.CryptoExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.security.asset.d.ts.md
api26/openharmony-js/@ohos.security.cert.d.ts.md
api26/openharmony-js/@ohos.security.certManager.d.ts.md
api26/openharmony-js/@ohos.security.certManagerDialog.d.ts.md
api26/openharmony-js/@ohos.security.cryptoFramework.d.ts.md
api26/openharmony-js/@ohos.security.huks.d.ts.md
api26/openharmony-js/@ohos.security.huksExternalCrypto.d.ts.md
api26/openharmony-js/@ohos.security.identifySensitiveContent.d.ts.md
api26/openharmony-js/@ohos.selectionInput.SelectionExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.selectionInput.SelectionExtensionContext.d.ts.md
api26/openharmony-js/@ohos.selectionInput.SelectionPanel.d.ts.md
api26/openharmony-js/@ohos.selectionInput.selectionManager.d.ts.md
api26/openharmony-js/@ohos.sensor.d.ts.md
api26/openharmony-js/@ohos.settings.d.ts.md
api26/openharmony-js/@ohos.settingsLite.d.ts.md
api26/openharmony-js/@ohos.statfs.d.ts.md
api26/openharmony-js/@ohos.stationary.d.ts.md
api26/openharmony-js/@ohos.systemDateTime.d.ts.md
api26/openharmony-js/@ohos.systemTime.d.ts.md
api26/openharmony-js/@ohos.taskpool.d.ts.md
api26/openharmony-js/@ohos.telephony.call.d.ts.md
api26/openharmony-js/@ohos.telephony.data.d.ts.md
api26/openharmony-js/@ohos.telephony.esim.d.ts.md
api26/openharmony-js/@ohos.telephony.observer.d.ts.md
api26/openharmony-js/@ohos.telephony.radio.d.ts.md
api26/openharmony-js/@ohos.telephony.sim.d.ts.md
api26/openharmony-js/@ohos.telephony.sms.d.ts.md
api26/openharmony-js/@ohos.telephony.vcard.d.ts.md
api26/openharmony-js/@ohos.test.PerfTest.d.ts.md
api26/openharmony-js/@ohos.thermal.d.ts.md
api26/openharmony-js/@ohos.uiAppearance.d.ts.md
api26/openharmony-js/@ohos.uri.d.ts.md
api26/openharmony-js/@ohos.url.d.ts.md
api26/openharmony-js/@ohos.usb.d.ts.md
api26/openharmony-js/@ohos.usbManager.d.ts.md
api26/openharmony-js/@ohos.usbManager.serial.d.ts.md
api26/openharmony-js/@ohos.userIAM.faceAuth.d.ts.md
api26/openharmony-js/@ohos.userIAM.userAccessCtrl.d.ts.md
api26/openharmony-js/@ohos.userIAM.userAuth.d.ts.md
api26/openharmony-js/@ohos.util.ArrayList.d.ts.md
api26/openharmony-js/@ohos.util.Deque.d.ts.md
api26/openharmony-js/@ohos.util.HashMap.d.ts.md
api26/openharmony-js/@ohos.util.HashSet.d.ts.md
api26/openharmony-js/@ohos.util.LightWeightMap.d.ts.md
api26/openharmony-js/@ohos.util.LightWeightSet.d.ts.md
api26/openharmony-js/@ohos.util.LinkedList.d.ts.md
api26/openharmony-js/@ohos.util.List.d.ts.md
api26/openharmony-js/@ohos.util.PlainArray.d.ts.md
api26/openharmony-js/@ohos.util.Queue.d.ts.md
api26/openharmony-js/@ohos.util.Stack.d.ts.md
api26/openharmony-js/@ohos.util.TreeMap.d.ts.md
api26/openharmony-js/@ohos.util.TreeSet.d.ts.md
api26/openharmony-js/@ohos.util.Vector.d.ts.md
api26/openharmony-js/@ohos.util.d.ts.md
api26/openharmony-js/@ohos.util.json.d.ts.md
api26/openharmony-js/@ohos.util.stream.d.ts.md
api26/openharmony-js/@ohos.vibrator.d.ts.md
api26/openharmony-js/@ohos.wallpaper.d.ts.md
api26/openharmony-js/@ohos.wantAgent.d.ts.md
api26/openharmony-js/@ohos.web.WebNativeMessagingExtensionAbility.d.ts.md
api26/openharmony-js/@ohos.web.WebNativeMessagingExtensionContext.d.ts.md
api26/openharmony-js/@ohos.web.netErrorList.d.ts.md
api26/openharmony-js/@ohos.web.webNativeMessagingExtensionManager.d.ts.md
api26/openharmony-js/@ohos.web.webview.d.ts.md
api26/openharmony-js/@ohos.wifi.d.ts.md
api26/openharmony-js/@ohos.wifiManager.d.ts.md
api26/openharmony-js/@ohos.wifiManagerExt.d.ts.md
api26/openharmony-js/@ohos.wifiext.d.ts.md
api26/openharmony-js/@ohos.window.d.ts.md
api26/openharmony-js/@ohos.window.floatView.d.ts.md
api26/openharmony-js/@ohos.window.floatingBall.d.ts.md
api26/openharmony-js/@ohos.worker.d.ts.md
api26/openharmony-js/@ohos.xml.d.ts.md
api26/openharmony-js/@ohos.zlib.d.ts.md
api26/openharmony-js/@system.app.d.ts.md
api26/openharmony-js/@system.battery.d.ts.md
api26/openharmony-js/@system.bluetooth.d.ts.md
api26/openharmony-js/@system.brightness.d.ts.md
api26/openharmony-js/@system.cipher.d.ts.md
api26/openharmony-js/@system.configuration.d.ts.md
api26/openharmony-js/@system.device.d.ts.md
api26/openharmony-js/@system.fetch.d.ts.md
api26/openharmony-js/@system.file.d.ts.md
api26/openharmony-js/@system.geolocation.d.ts.md
api26/openharmony-js/@system.mediaquery.d.ts.md
api26/openharmony-js/@system.network.d.ts.md
api26/openharmony-js/@system.notification.d.ts.md
api26/openharmony-js/@system.package.d.ts.md
api26/openharmony-js/@system.prompt.d.ts.md
api26/openharmony-js/@system.request.d.ts.md
api26/openharmony-js/@system.router.d.ts.md
api26/openharmony-js/@system.sensor.d.ts.md
api26/openharmony-js/@system.storage.d.ts.md
api26/openharmony-js/@system.vibrator.d.ts.md
api26/openharmony-js/permissions.d.ts.md
errors/API错误码.md
errors/AR Engine错误码.md
errors/AntifraudPicker(反诈选择器).md
errors/ArkTS API 错误码.md
errors/ArkTS API错误码.md
errors/ArkTS 错误码.md
errors/ArkTS组件错误码.md
errors/ArkTS错误码.md
errors/Audio错误码.md
errors/BusinessRiskIntelligentDetection(业务风险检测).md
errors/C API错误码.md
errors/Camera错误码.md
errors/Canvas组件错误码.md
errors/Contacts错误码.md
errors/DLP服务错误码.md
errors/DRM错误码.md
errors/DeviceVerify(应用设备状态检测).md
errors/DistributedSchedule错误码.md
errors/DlpAntiPeep(防窥保护).md
errors/DrawableDescriptor错误码.md
errors/Es2abc 编译器错误码.md
errors/FIDO.md
errors/Faultlogger 错误码.md
errors/HTTP错误码.md
errors/HUKS错误码.md
errors/HiCollie错误码.md
errors/HiDebug CpuUsage错误码.md
errors/HiDebug Trace错误码.md
errors/HiDebug错误码.md
errors/I18n错误码.md
errors/Image错误码.md
errors/JsLeakWatcher错误码.md
errors/MDNS错误码.md
errors/Media错误码.md
errors/NFC错误码.md
errors/NodeAdapter错误码.md
errors/OHIPCErrorCode.md
errors/REST API错误码.md
errors/RPC错误码.md
errors/RunningLock锁错误码.md
errors/SE(secureElement)错误码.md
errors/SOCKET 错误码.md
errors/SOTER.md
errors/SafetyDetect(安全检测).md
errors/SecurityAudit(安全审计).md
errors/SuperPrivacyMode(超级隐私模式).md
errors/TrustedAppService(可信应用服务).md
errors/TrustedAuthentication (数字盾服务).md
errors/Typescript Compiler错误码介绍.md
errors/UIExtension错误码.md
errors/UI上下文错误码.md
errors/UI界面.md
errors/UI编译.md
errors/USB服务错误码.md
errors/VPN错误码.md
errors/Video组件错误码.md
errors/WIFI错误码.md
errors/Webview错误码.md
errors/XComponent组件错误码.md
errors/backgroundProcessManager错误码.md
errors/backgroundTaskManager错误码.md
errors/crypto framework错误码.md
errors/perftest错误码.md
errors/reminderAgentManager错误码.md
errors/uitest错误码.md
errors/webSocket错误码.md
errors/workScheduler错误码.md
errors/zlib子系统错误码.md
errors/上传下载错误码.md
errors/事件错误码.md
errors/交互事件错误码.md
errors/代理通道管理错误码.md
errors/以太网连接错误码.md
errors/企业设备管理错误码.md
errors/传感器错误码.md
errors/位置服务错误码.md
errors/元能力子系统错误码.md
errors/全局快捷键管理错误码.md
errors/关系型数据库错误码.md
errors/关键资产存储服务错误码.md
errors/内核错误码.md
errors/分布式数据对象错误码.md
errors/分布式键值数据库错误码.md
errors/划词服务错误码.md
errors/剪贴板错误码.md
errors/动作感知错误码.md
errors/包管理子系统通用错误码.md
errors/半模态错误码.md
errors/卡片错误码.md
errors/反色能力错误码.md
errors/图像AI分析错误码.md
errors/图形图像.md
errors/图形绘制与显示错误码.md
errors/增强连接错误码.md
errors/媒体会话管理错误码.md
errors/媒体库错误码.md
errors/屏幕错误码.md
errors/属性字符串错误码.md
errors/广告服务框架错误码.md
errors/应用事件打点错误码.md
errors/开放匿名设备标识服务错误码.md
errors/弹窗错误码.md
errors/截图错误码.md
errors/打印服务错误码.md
errors/扩展认证错误码.md
errors/拖拽事件错误码.md
errors/振动错误码.md
errors/接口调用异常错误码.md
errors/数据共享错误码.md
errors/文件管理错误码.md
errors/无障碍子系统错误码.md
errors/日历服务错误码.md
errors/时间时区服务错误码.md
errors/智慧数据平台错误码.md
errors/机械体控制模块错误码.md
errors/注册节点渲染状态监听错误码.md
errors/流量管理错误码.md
errors/渲染节点错误码.md
errors/源码混淆错误码.md
errors/滚动类组件错误码.md
errors/热管理错误码.md
errors/焦点错误码.md
errors/状态管理错误码.md
errors/环境变量错误码.md
errors/用户状态感知错误码.md
errors/用户界面外观服务错误码.md
errors/用户认证错误码.md
errors/用户首选项错误码.md
errors/电话子系统错误码.md
errors/窗口错误码.md
errors/策略管理错误码.md
errors/系统电源管理错误码.md
errors/系统资源错误码.md
errors/统一数据管理框架错误码.md
errors/编译工具链错误码.md
errors/编译错误码.md
errors/网络共享错误码.md
errors/网络安全校验错误码.md
errors/网络连接管理错误码.md
errors/自定义节点错误码.md
errors/色彩管理错误码.md
errors/蓝牙服务子系统错误码.md
errors/融合短距服务子系统错误码.md
errors/视频处理引擎错误码.md
errors/记忆链接错误码.md
errors/设备状态感知错误码.md
errors/设备管理错误码.md
errors/设置数据项错误码.md
errors/访问控制错误码.md
errors/证书管理对话框错误码.md
errors/证书管理错误码.md
errors/证书错误码.md
errors/语言基础类库错误码.md
errors/账号管理错误码.md
errors/资源管理错误码.md
errors/输入法框架错误码.md
errors/输入设备错误码.md
errors/通用错误码.md
errors/通知错误码.md
errors/通行密钥.md
errors/锁屏敏感数据管理错误码.md
errors/错误码.md
errors/防火墙错误码.md
errors/附属节点错误码.md
errors/页面路由错误码.md
errors/驱动错误码.md
errors/鼠标光标错误码.md
guides/!!语法:双向绑定.md
guides/$$语法:系统组件双向同步.md
guides/@Builder装饰器:自定义构建函数.md
guides/@ObservedV2与@Trace:类属性变化观测.md
guides/@Observed与@ObjectLink:V1数据对象观测.md
guides/@Reusable装饰器:V1组件复用.md
guides/Ability Kit术语.md
guides/AppStorageV2(应用全局的UI状态存储).md
guides/Connectivity Kit术语.md
guides/Environment:设备环境查询.md
guides/ExtensionAbility组件.md
guides/MDM Kit开发指南.md
guides/MDM Kit术语.md
guides/NFC标签读写开发指南.md
guides/PersistenceV2(持久化存储UI状态).md
guides/Sendable对象简介.md
guides/UIAbility备份恢复.md
guides/UIAbility组件启动模式.md
guides/UIAbility组件基本用法.md
guides/UI国际化.md
guides/User-Agent开发指导.md
guides/Worker简介.md
guides/addMonitor与clearMonitor开发指南.md
guides/app.json5配置文件.md
guides/applySync与flushUpdates与flushUIUpdates接口:同步刷新.md
guides/bm工具.md
guides/if-else:条件渲染.md
guides/makeObserved接口:将非观察数据变为可观察数据.md
guides/module.json5配置文件.md
guides/wrapBuilder:封装全局@Builder.md
guides/云侧服务准备.md
guides/交互基础机制说明.md
guides/代理提醒(ArkTS).md
guides/使用Picker选择媒体库资源.md
guides/使用RSA密钥对分段签名验签(PKCS1模式).md
guides/使用RSA密钥对(PKCS1模式)签名验签.md
guides/使用Web组件上传文件.md
guides/保存媒体库资源.md
guides/华为账号一键登录(获取手机号和UnionID-OpenID).md
guides/单元测试框架使用指导.md
guides/受限开放权限.md
guides/向用户申请授权.md
guides/启动应用内的UIAbility组件.md
guides/图片解码内存优化.md
guides/基于服务账号生成鉴权令牌.md
guides/基于服务账号生成鉴权令牌(Device Security).md
guides/声明权限.md
guides/多应用管控.md
guides/安全控件概述.md
guides/应用上下文Context.md
guides/应用启动框架AppStartup.md
guides/应用沙箱目录.md
guides/开发准备(媒体库).md
guides/开放权限(用户授权).md
guides/开通Device Security服务.md
guides/支持单复数.md
guides/支持的语言.md
guides/支持键盘输入事件.md
guides/数据库备份与恢复.md
guides/日志分析.md
guides/智能填充服务.md
guides/查询当前状态场景.md
guides/栅格布局 (GridRow-GridCol).md
guides/消息认证码计算HMAC.md
guides/状态管理V1-V2迁移指导.md
guides/状态管理V1和V2混用指导(API version 19及之后).md
guides/状态管理概述.md
guides/用户文件URI介绍.md
guides/申请受限权限.md
guides/申请推送场景化消息权益.md
guides/申请访问剪贴板权限.md
guides/窗口开发术语.md
guides/线程间通信对象概述.md
guides/组件启动规则(FA模型).md
guides/组件启动规则(Stage模型).md
guides/耗时任务并发场景简介.md
guides/自定义渲染(XComponent).md
guides/自定义节点概述.md
guides/获取Push Token.md
guides/获取支持的编解码能力.md
guides/设置页签栏的悬浮样式.md
guides/资源分类与访问.md
guides/通过用户首选项实现数据持久化.md
guides/通过键值型数据库实现数据持久化.md
guides/配置ArkTS卡片的配置文件.md
guides/非对称密钥生成和转换规格.md
guides/预览流二次处理(C-C++).md
guides/(可选)开发消息回执.md
guides/(可选)配置应用内购买服务参数.md
modules/ohos/@ohos.FusionConnectivity.PartnerAgentExtensionAbility (支持设备状态通知的ExtensionAbility组件).md
modules/ohos/@ohos.FusionConnectivity.PartnerAgentExtensionContext (设备状态通知能力上下文).md
modules/ohos/@ohos.FusionConnectivity.partnerAgent(设备状态通知模块).md
modules/ohos/@ohos.InputMethodExtensionAbility (InputMethodExtensionAbility).md
modules/ohos/@ohos.InputMethodExtensionContext (InputMethodExtensionContext).md
modules/ohos/@ohos.InputMethodSubtype (输入法子类型).md
modules/ohos/@ohos.PiPWindow (画中画窗口).md
modules/ohos/@ohos.UiTest.md
modules/ohos/@ohos.WorkSchedulerExtensionAbility (延迟任务调度回调).md
modules/ohos/@ohos.ability.ability (Ability模块).md
modules/ohos/@ohos.ability.dataUriUtils (DataUriUtils模块).md
modules/ohos/@ohos.ability.errorCode (ErrorCode).md
modules/ohos/@ohos.ability.featureAbility (FeatureAbility模块).md
modules/ohos/@ohos.ability.particleAbility (ParticleAbility模块).md
modules/ohos/@ohos.ability.screenLockFileManager (锁屏敏感数据管理).md
modules/ohos/@ohos.ability.wantConstant (wantConstant).md
modules/ohos/@ohos.abilityAccessCtrl (程序访问控制管理).md
modules/ohos/@ohos.accessibility (辅助应用).md
modules/ohos/@ohos.accessibility.GesturePath (手势路径).md
modules/ohos/@ohos.accessibility.GesturePoint (手势触摸点).md
modules/ohos/@ohos.account.appAccount (应用账号管理).md
modules/ohos/@ohos.account.distributedAccount (分布式账号管理).md
modules/ohos/@ohos.account.osAccount (系统账号管理).md
modules/ohos/@ohos.advertising (广告服务框架).md
modules/ohos/@ohos.advertising.AdComponent (广告展示组件).md
modules/ohos/@ohos.advertising.AdsServiceExtensionAbility(广告扩展服务).md
modules/ohos/@ohos.advertising.AutoAdComponent (轮播广告展示组件).md
modules/ohos/@ohos.ai.mindSporeLite (端侧AI框架).md
modules/ohos/@ohos.animator (动画).md
modules/ohos/@ohos.annotation (注解).md
modules/ohos/@ohos.app.ability.Ability (Ability基类).md
modules/ohos/@ohos.app.ability.AbilityConstant (Ability相关常量).md
modules/ohos/@ohos.app.ability.AbilityStage (AbilityStage组件管理器).md
modules/ohos/@ohos.app.ability.ActionExtensionAbility (支持业务操作自定义的ExtensionAbility组件).md
modules/ohos/@ohos.app.ability.AppServiceExtensionAbility (应用后台服务扩展组件).md
modules/ohos/@ohos.app.ability.ApplicationStateChangeCallback (应用进程状态变化监听器).md
modules/ohos/@ohos.app.ability.AtomicServiceOptions (openAtomicService可选参数).md
modules/ohos/@ohos.app.ability.ChildProcess (子进程基类).md
modules/ohos/@ohos.app.ability.ChildProcessArgs (子进程参数).md
modules/ohos/@ohos.app.ability.ChildProcessOptions (子进程启动选项).md
modules/ohos/@ohos.app.ability.CompletionHandler (拉起应用结果的操作类).md
modules/ohos/@ohos.app.ability.CompletionHandlerForAbilityStartCallback (拉起应用结果回调的操作类).md
modules/ohos/@ohos.app.ability.CompletionHandlerForAtomicService (打开元服务结果的操作类).md
modules/ohos/@ohos.app.ability.Configuration (环境变量).md
modules/ohos/@ohos.app.ability.ConfigurationConstant (环境变量相关的常量定义).md
modules/ohos/@ohos.app.ability.DriverExtensionAbility (驱动程序扩展能力).md
modules/ohos/@ohos.app.ability.EmbeddableUIAbility (可嵌入式UIAbility组件).md
modules/ohos/@ohos.app.ability.EmbeddedUIExtensionAbility (支持跨进程界面嵌入的ExtensionAbility组件).md
modules/ohos/@ohos.app.ability.EnvironmentCallback (系统环境变化监听器).md
modules/ohos/@ohos.app.ability.ExtensionAbility (扩展能力基类).md
modules/ohos/@ohos.app.ability.FenceExtensionAbility (FenceExtensionAbility).md
modules/ohos/@ohos.app.ability.FenceExtensionContext (FenceExtensionContext).md
modules/ohos/@ohos.app.ability.InsightIntentContext (意图执行上下文).md
modules/ohos/@ohos.app.ability.InsightIntentDecorator (意图装饰器定义).md
modules/ohos/@ohos.app.ability.InsightIntentEntryExecutor (@InsightIntentEntry的意图执行基类).md
modules/ohos/@ohos.app.ability.InsightIntentExecutor (意图执行基类).md
modules/ohos/@ohos.app.ability.OpenLinkOptions (openLink的可选参数).md
modules/ohos/@ohos.app.ability.PhotoEditorExtensionAbility (支持图片编辑能力的ExtensionAbility组件).md
modules/ohos/@ohos.app.ability.PrintExtensionAbility (打印扩展能力).md
modules/ohos/@ohos.app.ability.ShareExtensionAbility (支持分享详情页接入的ExtensionAbility组件).md
modules/ohos/@ohos.app.ability.StartOptions (startAbility的可选参数).md
modules/ohos/@ohos.app.ability.UIAbility (带界面的应用组件).md
modules/ohos/@ohos.app.ability.UIExtensionAbility (带界面的ExtensionAbility组件).md
modules/ohos/@ohos.app.ability.UIExtensionContentSession (UIExtensionAbility界面操作类).md
modules/ohos/@ohos.app.ability.VpnExtensionAbility (三方VPN能力).md
modules/ohos/@ohos.app.ability.Want (Want).md
modules/ohos/@ohos.app.ability.abilityDelegatorRegistry (AbilityDelegatorRegistry).md
modules/ohos/@ohos.app.ability.abilityLifecycleCallback (UIAbility生命周期回调监听器).md
modules/ohos/@ohos.app.ability.abilityManager (Ability信息管理).md
modules/ohos/@ohos.app.ability.appManager (应用管理).md
modules/ohos/@ohos.app.ability.appRecovery (应用故障恢复).md
modules/ohos/@ohos.app.ability.application (应用工具类).md
modules/ohos/@ohos.app.ability.autoFillManager (自动填充框架).md
modules/ohos/@ohos.app.ability.autoStartupManager (开机自启管理能力).md
modules/ohos/@ohos.app.ability.childProcessManager (子进程管理).md
modules/ohos/@ohos.app.ability.common (Ability公共模块).md
modules/ohos/@ohos.app.ability.contextConstant (Context相关常量).md
modules/ohos/@ohos.app.ability.continueManager (跨端迁移).md
modules/ohos/@ohos.app.ability.dataUriUtils (DataUriUtils模块).md
modules/ohos/@ohos.app.ability.dialogRequest (dialogRequest模块).md
modules/ohos/@ohos.app.ability.errorManager (错误管理模块).md
modules/ohos/@ohos.app.ability.insightIntent (意图框架基础定义).md
modules/ohos/@ohos.app.ability.insightIntentProvider (意图提供方管理能力).md
modules/ohos/@ohos.app.ability.kioskManager (Kiosk模式管理).md
modules/ohos/@ohos.app.ability.sendableContextManager (sendable上下文管理).md
modules/ohos/@ohos.app.ability.wantAgent (WantAgent模块).md
modules/ohos/@ohos.app.ability.wantConstant (Want常量).md
modules/ohos/@ohos.app.appstartup.StartupConfig (启动框架配置信息).md
modules/ohos/@ohos.app.appstartup.StartupConfigEntry (启动框架配置).md
modules/ohos/@ohos.app.appstartup.StartupListener (启动框架任务监听器).md
modules/ohos/@ohos.app.appstartup.StartupTask (启动框架任务).md
modules/ohos/@ohos.app.appstartup.startupManager (启动框架管理能力).md
modules/ohos/@ohos.app.form.FormEditExtensionAbility (FormEditExtensionAbility).md
modules/ohos/@ohos.app.form.FormExtensionAbility (FormExtensionAbility).md
modules/ohos/@ohos.app.form.LiveFormExtensionAbility (LiveFormExtensionAbility).md
modules/ohos/@ohos.app.form.formBindingData (卡片数据绑定类).md
modules/ohos/@ohos.app.form.formInfo (formInfo).md
modules/ohos/@ohos.app.form.formProvider (formProvider).md
modules/ohos/@ohos.application.AccessibilityExtensionAbility (辅助功能扩展能力).md
modules/ohos/@ohos.application.BackupExtensionAbility (备份恢复扩展能力).md
modules/ohos/@ohos.application.Configuration (Configuration).md
modules/ohos/@ohos.application.ConfigurationConstant (ConfigurationConstant).md
modules/ohos/@ohos.application.DistributedExtensionAbility (协同Extension).md
modules/ohos/@ohos.application.NotificationSubscriberExtensionAbility (通知订阅扩展能力).md
modules/ohos/@ohos.application.NotificationSubscriberExtensionContext (通知订阅扩展上下文).md
modules/ohos/@ohos.application.Want (Want).md
modules/ohos/@ohos.application.abilityDelegatorRegistry (AbilityDelegatorRegistry).md
modules/ohos/@ohos.application.appManager (appManager).md
modules/ohos/@ohos.application.formBindingData (卡片数据绑定类).md
modules/ohos/@ohos.application.formError (formError).md
modules/ohos/@ohos.application.formInfo (formInfo).md
modules/ohos/@ohos.application.formProvider (formProvider).md
modules/ohos/@ohos.application.testRunner (TestRunner).md
modules/ohos/@ohos.arkui.Prefetcher (Prefetching).md
modules/ohos/@ohos.arkui.StateManagement (状态管理).md
modules/ohos/@ohos.arkui.UIContext (UIContext).md
modules/ohos/@ohos.arkui.componentSnapshot (组件截图).md
modules/ohos/@ohos.arkui.componentUtils (componentUtils).md
modules/ohos/@ohos.arkui.dragController (DragController).md
modules/ohos/@ohos.arkui.drawableDescriptor (DrawableDescriptor).md
modules/ohos/@ohos.arkui.inspector (布局回调).md
modules/ohos/@ohos.arkui.node.md
modules/ohos/@ohos.arkui.observer (无感监听).md
modules/ohos/@ohos.arkui.shape (形状).md
modules/ohos/@ohos.arkui.theme(主题换肤).md
modules/ohos/@ohos.arkui.uiExtension (uiExtension).md
modules/ohos/@ohos.backgroundTaskManager (后台任务管理).md
modules/ohos/@ohos.base (公共回调信息).md
modules/ohos/@ohos.batteryInfo (电量信息).md
modules/ohos/@ohos.bluetooth (蓝牙).md
modules/ohos/@ohos.bluetooth.a2dp (蓝牙a2dp模块).md
modules/ohos/@ohos.bluetooth.access (蓝牙access模块).md
modules/ohos/@ohos.bluetooth.baseProfile (蓝牙baseProfile模块).md
modules/ohos/@ohos.bluetooth.ble (蓝牙ble模块).md
modules/ohos/@ohos.bluetooth.common (蓝牙common模块).md
modules/ohos/@ohos.bluetooth.connection (蓝牙connection模块).md
modules/ohos/@ohos.bluetooth.constant (蓝牙constant模块).md
modules/ohos/@ohos.bluetooth.hfp (蓝牙hfp模块).md
modules/ohos/@ohos.bluetooth.hid (蓝牙hid模块).md
modules/ohos/@ohos.bluetooth.map (蓝牙map模块).md
modules/ohos/@ohos.bluetooth.pan (蓝牙pan模块).md
modules/ohos/@ohos.bluetooth.pbap (蓝牙pbap模块).md
modules/ohos/@ohos.bluetooth.socket (蓝牙socket模块).md
modules/ohos/@ohos.bluetoothManager (蓝牙).md
modules/ohos/@ohos.buffer (Buffer).md
modules/ohos/@ohos.bundle (Bundle模块).md
modules/ohos/@ohos.bundle.bundleManager (应用程序包管理模块).md
modules/ohos/@ohos.bundle.defaultAppManager (默认应用管理).md
modules/ohos/@ohos.bundle.launcherBundleManager (launcherBundleManager模块).md
modules/ohos/@ohos.bundle.overlay (overlay模块).md
modules/ohos/@ohos.bundle.shortcutManager (shortcutManager模块).md
modules/ohos/@ohos.bundleState (设备使用信息统计).md
modules/ohos/@ohos.bytrace (性能打点).md
modules/ohos/@ohos.calendarManager (日程管理能力).md
modules/ohos/@ohos.commonEvent (公共事件模块).md
modules/ohos/@ohos.commonEventManager (公共事件模块).md
modules/ohos/@ohos.connectedTag (有源标签).md
modules/ohos/@ohos.contact (联系人).md
modules/ohos/@ohos.continuation.continuationManager (流转_协同管理).md
modules/ohos/@ohos.convertxml (xml转换JavaScript).md
modules/ohos/@ohos.curves (插值计算).md
modules/ohos/@ohos.customization.customConfig (定制配置).md
modules/ohos/@ohos.data.UdmfComponents(内容卡片).md
modules/ohos/@ohos.data.ValuesBucket (数据集).md
modules/ohos/@ohos.data.cloudData (端云服务).md
modules/ohos/@ohos.data.commonType (数据通用类型).md
modules/ohos/@ohos.data.dataAbility (DataAbility谓词).md
modules/ohos/@ohos.data.dataShare (数据共享).md
modules/ohos/@ohos.data.dataSharePredicates (数据共享谓词).md
modules/ohos/@ohos.data.distributedData (分布式数据管理).md
modules/ohos/@ohos.data.distributedDataObject (分布式数据对象).md
modules/ohos/@ohos.data.distributedKVStore (分布式键值数据库).md
modules/ohos/@ohos.data.intelligence (智慧数据平台).md
modules/ohos/@ohos.data.preferences (用户首选项).md
modules/ohos/@ohos.data.rdb (关系型数据库).md
modules/ohos/@ohos.data.relationalStore (关系型数据库).md
modules/ohos/@ohos.data.sendablePreferences (共享用户首选项).md
modules/ohos/@ohos.data.sendableRelationalStore (共享关系型数据库).md
modules/ohos/@ohos.data.storage (轻量级存储).md
modules/ohos/@ohos.data.unifiedDataChannel (标准化数据通路).md
modules/ohos/@ohos.data.uniformDataStruct (标准化数据结构).md
modules/ohos/@ohos.data.uniformTypeDescriptor (标准化数据定义与描述).md
modules/ohos/@ohos.deviceInfo (设备信息).md
modules/ohos/@ohos.display (屏幕属性).md
modules/ohos/@ohos.distributedDeviceManager (设备管理).md
modules/ohos/@ohos.distributedHardware.mechanicManager (机械体控制模块).md
modules/ohos/@ohos.distributedsched.abilityConnectionManager (应用多端协同管理).md
modules/ohos/@ohos.distributedsched.linkEnhance (增强连接).md
modules/ohos/@ohos.distributedsched.proxyChannelManager (代理通道管理).md
modules/ohos/@ohos.dlpPermission (数据防泄漏).md
modules/ohos/@ohos.document (文件交互).md
modules/ohos/@ohos.driver.deviceManager (外设管理).md
modules/ohos/@ohos.effectKit (图像效果).md
modules/ohos/@ohos.enterprise.EnterpriseAdminExtensionAbility(企业设备管理扩展能力).md
modules/ohos/@ohos.enterprise.accountManager(账户管理).md
modules/ohos/@ohos.enterprise.adminManager(admin权限管理).md
modules/ohos/@ohos.enterprise.applicationManager(应用管理).md
modules/ohos/@ohos.enterprise.bluetoothManager(蓝牙管理).md
modules/ohos/@ohos.enterprise.browser(浏览器管理).md
modules/ohos/@ohos.enterprise.bundleManager(包管理).md
modules/ohos/@ohos.enterprise.common(Enterprise公共模块).md
modules/ohos/@ohos.enterprise.deviceControl(设备控制管理).md
modules/ohos/@ohos.enterprise.deviceInfo(设备信息管理).md
modules/ohos/@ohos.enterprise.deviceSettings (设备设置管理).md
modules/ohos/@ohos.enterprise.locationManager(位置服务管理).md
modules/ohos/@ohos.enterprise.networkManager(网络管理).md
modules/ohos/@ohos.enterprise.restrictions (限制类策略).md
modules/ohos/@ohos.enterprise.securityManager(安全管理).md
modules/ohos/@ohos.enterprise.systemManager (系统管理).md
modules/ohos/@ohos.enterprise.telephonyManager(通话管理).md
modules/ohos/@ohos.enterprise.usbManager(USB管理).md
modules/ohos/@ohos.enterprise.wifiManager(Wi-Fi管理).md
modules/ohos/@ohos.events.emitter (Emitter).md
modules/ohos/@ohos.fastbuffer (FastBuffer).md
modules/ohos/@ohos.faultLogger (故障日志获取).md
modules/ohos/@ohos.file.AlbumPickerComponent (Album Picker组件).md
modules/ohos/@ohos.file.BackupExtensionContext (备份恢复扩展能力).md
modules/ohos/@ohos.file.PhotoPickerComponent (PhotoPicker组件).md
modules/ohos/@ohos.file.RecentPhotoComponent (最近图片组件).md
modules/ohos/@ohos.file.cloudSync (端云同步能力).md
modules/ohos/@ohos.file.cloudSyncManager (端云同步管理能力).md
modules/ohos/@ohos.file.environment (目录环境能力).md
modules/ohos/@ohos.file.fileuri (文件URI).md
modules/ohos/@ohos.file.fs (文件管理).md
modules/ohos/@ohos.file.hash (文件哈希处理).md
modules/ohos/@ohos.file.photoAccessHelper (相册管理模块).md
modules/ohos/@ohos.file.picker (选择器).md
modules/ohos/@ohos.file.securityLabel (数据标签).md
modules/ohos/@ohos.file.sendablePhotoAccessHelper (基于Sendable对象的相册管理模块).md
modules/ohos/@ohos.file.statvfs (文件系统空间统计).md
modules/ohos/@ohos.file.storageStatistics (应用空间统计).md
modules/ohos/@ohos.fileio (文件管理).md
modules/ohos/@ohos.fileshare (文件分享).md
modules/ohos/@ohos.font (注册自定义字体).md
modules/ohos/@ohos.geoLocationManager (位置服务).md
modules/ohos/@ohos.geolocation (位置服务).md
modules/ohos/@ohos.graphics.colorSpaceManager (色彩管理).md
modules/ohos/@ohos.graphics.common2D (2D图形通用数据类型).md
modules/ohos/@ohos.graphics.displaySync (可变帧率).md
modules/ohos/@ohos.graphics.drawing (绘制模块).md
modules/ohos/@ohos.graphics.hdrCapability (HDR能力).md
modules/ohos/@ohos.graphics.scene (ArkGraphics 3D模块).md
modules/ohos/@ohos.graphics.sendableColorSpaceManager (可共享的色彩管理).md
modules/ohos/@ohos.graphics.text (文本模块).md
modules/ohos/@ohos.graphics.uiEffect (效果级联).md
modules/ohos/@ohos.hiAppEvent (应用打点).md
modules/ohos/@ohos.hiTraceChain (分布式跟踪).md
modules/ohos/@ohos.hiTraceMeter (性能打点).md
modules/ohos/@ohos.hichecker (检测模式).md
modules/ohos/@ohos.hidebug (Debug调试).md
modules/ohos/@ohos.hilog (HiLog日志打印).md
modules/ohos/@ohos.hiviewdfx.FaultLogExtensionAbility (故障延迟通知).md
modules/ohos/@ohos.hiviewdfx.FaultLogExtensionContext (故障延迟通知上下文).md
modules/ohos/@ohos.hiviewdfx.hiAppEvent (应用事件打点).md
modules/ohos/@ohos.hiviewdfx.jsLeakWatcher (js泄漏检测).md
modules/ohos/@ohos.i18n (国际化-I18n).md
modules/ohos/@ohos.identifier.oaid (开放匿名设备标识服务).md
modules/ohos/@ohos.inputMethod (输入法框架).md
modules/ohos/@ohos.inputMethod.ExtraConfig (输入法扩展信息).md
modules/ohos/@ohos.inputMethod.Panel (输入法面板).md
modules/ohos/@ohos.inputMethodEngine (输入法服务).md
modules/ohos/@ohos.inputMethodList (输入法切换列表控件).md
modules/ohos/@ohos.intl (国际化-Intl).md
modules/ohos/@ohos.matrix4 (矩阵变换).md
modules/ohos/@ohos.measure (文本计算).md
modules/ohos/@ohos.mediaquery (媒体查询).md
modules/ohos/@ohos.multimedia.audio (音频管理).md
modules/ohos/@ohos.multimedia.audioHaptic (音振协同).md
modules/ohos/@ohos.multimedia.avCastPicker (投播组件).md
modules/ohos/@ohos.multimedia.avCastPickerParam (投播组件参数).md
modules/ohos/@ohos.multimedia.avInputCastPicker (录音设备选择组件).md
modules/ohos/@ohos.multimedia.avVolumePanel (音量面板).md
modules/ohos/@ohos.multimedia.avsession (媒体会话管理).md
modules/ohos/@ohos.multimedia.camera (相机管理).md
modules/ohos/@ohos.multimedia.cameraPicker (相机选择器).md
modules/ohos/@ohos.multimedia.drm (数字版权保护).md
modules/ohos/@ohos.multimedia.image (图片处理).md
modules/ohos/@ohos.multimedia.media (媒体服务).md
modules/ohos/@ohos.multimedia.movingphotoview (动态照片).md
modules/ohos/@ohos.multimedia.sendableImage (基于Sendable对象的图片处理).md
modules/ohos/@ohos.multimedia.systemSoundManager (系统声音管理).md
modules/ohos/@ohos.multimedia.videoProcessingEngine (视频处理引擎).md
modules/ohos/@ohos.multimodalAwareness.deviceStatus(设备状态感知).md
modules/ohos/@ohos.multimodalAwareness.metadataBinding (记忆链接).md
modules/ohos/@ohos.multimodalAwareness.motion (动作感知能力).md
modules/ohos/@ohos.multimodalAwareness.userStatus (用户状态感知).md
modules/ohos/@ohos.multimodalInput.gestureEvent (手势事件).md
modules/ohos/@ohos.multimodalInput.infraredEmitter (红外管理).md
modules/ohos/@ohos.multimodalInput.inputConsumer (全局快捷键).md
modules/ohos/@ohos.multimodalInput.inputDevice (输入设备).md
modules/ohos/@ohos.multimodalInput.inputEvent (输入事件).md
modules/ohos/@ohos.multimodalInput.intentionCode (意图事件).md
modules/ohos/@ohos.multimodalInput.keyCode (键值).md
modules/ohos/@ohos.multimodalInput.keyEvent (按键输入事件).md
modules/ohos/@ohos.multimodalInput.mouseEvent (鼠标输入事件).md
modules/ohos/@ohos.multimodalInput.pointer (鼠标光标).md
modules/ohos/@ohos.multimodalInput.touchEvent (触屏输入事件).md
modules/ohos/@ohos.net.connection (网络连接管理).md
modules/ohos/@ohos.net.eap (扩展认证).md
modules/ohos/@ohos.net.ethernet (以太网连接管理).md
modules/ohos/@ohos.net.http (数据请求).md
modules/ohos/@ohos.net.mdns (MDNS管理).md
modules/ohos/@ohos.net.netFirewall (网络防火墙).md
modules/ohos/@ohos.net.networkSecurity (网络安全校验).md
modules/ohos/@ohos.net.policy (网络策略管理).md
modules/ohos/@ohos.net.sharing (网络共享管理).md
modules/ohos/@ohos.net.socket (Socket连接).md
modules/ohos/@ohos.net.statistics (流量管理).md
modules/ohos/@ohos.net.vpn (VPN 管理).md
modules/ohos/@ohos.net.vpnExtension (VPN 增强管理).md
modules/ohos/@ohos.net.webSocket (WebSocket连接).md
modules/ohos/@ohos.nfc.cardEmulation (标准NFC-cardEmulation).md
modules/ohos/@ohos.nfc.controller (标准NFC).md
modules/ohos/@ohos.nfc.tag (标准NFC-Tag).md
modules/ohos/@ohos.notification (Notification模块).md
modules/ohos/@ohos.notificationExtensionSubscription (notificationExtensionSubscription模块).md
modules/ohos/@ohos.notificationManager (NotificationManager模块).md
modules/ohos/@ohos.pasteboard (剪贴板).md
modules/ohos/@ohos.pluginComponent (PluginComponentManager).md
modules/ohos/@ohos.power (系统电源管理).md
modules/ohos/@ohos.print (打印).md
modules/ohos/@ohos.process (获取进程相关的信息).md
modules/ohos/@ohos.prompt (弹窗).md
modules/ohos/@ohos.promptAction (弹窗).md
modules/ohos/@ohos.reminderAgent (后台代理提醒).md
modules/ohos/@ohos.reminderAgentManager (后台代理提醒).md
modules/ohos/@ohos.request (上传下载).md
modules/ohos/@ohos.request.cacheDownload (缓存下载).md
modules/ohos/@ohos.resourceManager (资源管理).md
modules/ohos/@ohos.resourceschedule.backgroundProcessManager (后台子进程管控).md
modules/ohos/@ohos.resourceschedule.backgroundTaskManager (后台任务管理).md
modules/ohos/@ohos.resourceschedule.systemload (性能功耗热融合档位).md
modules/ohos/@ohos.resourceschedule.workScheduler (延迟任务调度).md
modules/ohos/@ohos.router (页面路由)(不推荐).md
modules/ohos/@ohos.rpc (RPC通信).md
modules/ohos/@ohos.runningLock (RunningLock锁).md
modules/ohos/@ohos.scan (扫描).md
modules/ohos/@ohos.screenLock (锁屏管理).md
modules/ohos/@ohos.screenshot (屏幕截图).md
modules/ohos/@ohos.secureElement (安全单元的通道管理).md
modules/ohos/@ohos.security.CryptoExtensionAbility (密钥扩展能力).md
modules/ohos/@ohos.security.asset (关键资产存储服务).md
modules/ohos/@ohos.security.cert (证书模块).md
modules/ohos/@ohos.security.certManager (证书管理模块).md
modules/ohos/@ohos.security.certManagerDialog (证书管理对话框模块).md
modules/ohos/@ohos.security.cryptoFramework (加解密算法库框架).md
modules/ohos/@ohos.security.huks (通用密钥库系统).md
modules/ohos/@ohos.security.huksExternalCrypto(外部密钥管理).md
modules/ohos/@ohos.security.identifySensitiveContent (识别敏感内容).md
modules/ohos/@ohos.sendableResourceManager (资源管理).md
modules/ohos/@ohos.sensor (传感器).md
modules/ohos/@ohos.settings (设置数据项名称).md
modules/ohos/@ohos.statfs (statfs).md
modules/ohos/@ohos.stationary (设备状态感知框架).md
modules/ohos/@ohos.systemDateTime (系统时间、时区).md
modules/ohos/@ohos.systemTime (系统时间、时区).md
modules/ohos/@ohos.taskpool(启动任务池).md
modules/ohos/@ohos.telephony.call (拨打电话).md
modules/ohos/@ohos.telephony.data (蜂窝数据).md
modules/ohos/@ohos.telephony.esim (eSIM卡管理).md
modules/ohos/@ohos.telephony.observer (observer).md
modules/ohos/@ohos.telephony.radio (网络搜索).md
modules/ohos/@ohos.telephony.sim (SIM卡管理).md
modules/ohos/@ohos.telephony.sms (短信服务).md
modules/ohos/@ohos.telephony.vcard (VCard模块).md
modules/ohos/@ohos.test.PerfTest.md
modules/ohos/@ohos.thermal (热管理).md
modules/ohos/@ohos.uiAppearance (用户界面外观).md
modules/ohos/@ohos.uri (URI字符串解析).md
modules/ohos/@ohos.url (URL字符串解析).md
modules/ohos/@ohos.usb (USB管理)(已停止维护).md
modules/ohos/@ohos.usbManager (USB管理).md
modules/ohos/@ohos.usbManager.serial (串口管理).md
modules/ohos/@ohos.userIAM.userAuth (用户认证).md
modules/ohos/@ohos.userIAM.userAuthIcon (嵌入式用户身份认证控件).md
modules/ohos/@ohos.util (util工具函数).md
modules/ohos/@ohos.util.ArrayList (线性容器ArrayList).md
modules/ohos/@ohos.util.Deque (线性容器Deque).md
modules/ohos/@ohos.util.HashMap (非线性容器HashMap).md
modules/ohos/@ohos.util.HashSet (非线性容器HashSet).md
modules/ohos/@ohos.util.LightWeightMap (非线性容器LightWeightMap).md
modules/ohos/@ohos.util.LightWeightSet (非线性容器LightWeightSet).md
modules/ohos/@ohos.util.LinkedList (线性容器LinkedList).md
modules/ohos/@ohos.util.List (线性容器List).md
modules/ohos/@ohos.util.PlainArray (非线性容器PlainArray).md
modules/ohos/@ohos.util.Queue (线性容器Queue).md
modules/ohos/@ohos.util.Stack (线性容器Stack).md
modules/ohos/@ohos.util.TreeMap (非线性容器TreeMap).md
modules/ohos/@ohos.util.TreeSet (非线性容器TreeSet).md
modules/ohos/@ohos.util.Vector (线性容器Vector).md
modules/ohos/@ohos.util.json (JSON解析与生成).md
modules/ohos/@ohos.util.stream (数据流基类stream).md
modules/ohos/@ohos.vibrator (振动).md
modules/ohos/@ohos.wallpaper (壁纸).md
modules/ohos/@ohos.wantAgent (WantAgent模块).md
modules/ohos/@ohos.web.WebNativeMessagingExtensionAbility (Web Native Messaging Extension Ability).md
modules/ohos/@ohos.web.WebNativeMessagingExtensionContext (Web Native Messaging Extension Context).md
modules/ohos/@ohos.web.netErrorList (ArkWeb网络协议栈错误列表).md
modules/ohos/@ohos.web.webNativeMessagingExtensionManager (Web Native Messaging Extension Manager).md
modules/ohos/@ohos.web.webview (Webview).md
modules/ohos/@ohos.wifi (WLAN).md
modules/ohos/@ohos.wifiManager (WLAN).md
modules/ohos/@ohos.wifiManagerExt (WLAN扩展接口).md
modules/ohos/@ohos.wifiext (WLAN扩展接口).md
modules/ohos/@ohos.window (窗口).md
modules/ohos/@ohos.window.floatingBall (闪控球窗口).md
modules/ohos/@ohos.worker (启动一个Worker).md
modules/ohos/@ohos.xml (XML解析与生成).md
modules/ohos/@ohos.zlib (Zip模块).md
modules/other/@arkts.collections (ArkTS容器集).md
modules/other/@arkts.lang (ArkTS语言基础能力).md
modules/other/@arkts.math.Decimal (高精度数学库Decimal).md
modules/other/@arkts.utils (ArkTS工具库).md
modules/system/@system.app (应用上下文).md
modules/system/@system.battery (电量信息).md
modules/system/@system.bluetooth (蓝牙).md
modules/system/@system.brightness (屏幕亮度).md
modules/system/@system.cipher (加密算法).md
modules/system/@system.configuration (应用配置).md
modules/system/@system.device (设备信息).md
modules/system/@system.fetch (数据请求).md
modules/system/@system.file (文件存储).md
modules/system/@system.geolocation (地理位置).md
modules/system/@system.mediaquery (媒体查询).md
modules/system/@system.network (网络状态).md
modules/system/@system.notification (通知消息).md
modules/system/@system.package (应用管理).md
modules/system/@system.prompt (弹窗).md
modules/system/@system.request (上传下载).md
modules/system/@system.router (页面路由).md
modules/system/@system.sensor (传感器).md
modules/system/@system.storage (数据存储).md
modules/system/@system.vibrator (振动).md
topics/components/@Entry:页面入口.md
topics/components/@Env:环境变量.md
topics/components/AICaptionComponent(AI字幕组件).md
topics/components/ARView(AR场景可视化).md
topics/components/AlphabetIndexer.md
topics/components/ArcAlphabetIndexer.md
topics/components/ArcButton.md
topics/components/ArcList.md
topics/components/ArcListItem.md
topics/components/ArcScrollBar.md
topics/components/ArcSlider.md
topics/components/ArcSwiper.md
topics/components/ArkTS组件.md
topics/components/AtomicService.md
topics/components/AtomicServiceNavigation.md
topics/components/AtomicServiceSearch.md
topics/components/AtomicServiceTabs.md
topics/components/AtomicServiceWeb.md
topics/components/Badge.md
topics/components/Blank.md
topics/components/Button.md
topics/components/CalendarPicker.md
topics/components/Canvas.md
topics/components/CanvasGradient.md
topics/components/CanvasPattern.md
topics/components/CanvasRenderingContext2D.md
topics/components/CardRecognition(卡证识别控件).md
topics/components/CashierComponent (iap嵌入式收银台组件).md
topics/components/Checkbox.md
topics/components/CheckboxGroup.md
topics/components/Chip.md
topics/components/ChipGroup.md
topics/components/Circle.md
topics/components/Column.md
topics/components/ColumnSplit.md
topics/components/Component3D.md
topics/components/ComposeListItem.md
topics/components/ComposeTitleBar.md
topics/components/ContainerSpan.md
topics/components/ContentSlot.md
topics/components/ContextMenu.md
topics/components/Counter.md
topics/components/DataPanel.md
topics/components/DatePicker.md
topics/components/DialogV2.md
topics/components/Divider.md
topics/components/DocumentScanner(文档扫描控件).md
topics/components/DownloadFileButton.md
topics/components/DrawingRenderingContext.md
topics/components/EditableTitleBar.md
topics/components/Ellipse.md
topics/components/EmbeddedComponent.md
topics/components/ExceptionPrompt.md
topics/components/Filter.md
topics/components/Flex.md
topics/components/Flex布局.md
topics/components/FlowItem.md
topics/components/FoldSplitContainer.md
topics/components/FolderStack.md
topics/components/ForEach.md
topics/components/FormLink.md
topics/components/FormMenu.md
topics/components/FullScreenLaunchComponent.md
topics/components/FunctionComponent(功能组件).md
topics/components/FunctionalButton(Button组件).md
topics/components/FunctionalInput(Input组件).md
topics/components/Gauge.md
topics/components/Grid.md
topics/components/GridCol.md
topics/components/GridContainer.md
topics/components/GridItem.md
topics/components/GridObjectSortComponent.md
topics/components/GridRow.md
topics/components/HalfScreenLaunchComponent.md
topics/components/HandwriteComponent(手写套件组件).md
topics/components/HdsActionBar.md
topics/components/HdsListItem.md
topics/components/HdsListItemCard.md
topics/components/HdsNavDestination.md
topics/components/HdsNavigation.md
topics/components/HdsSideBar.md
topics/components/HdsSideMenu.md
topics/components/HdsSnackBar.md
topics/components/HdsTabs.md
topics/components/HdsVisualComponent.md
topics/components/Hyperlink.md
topics/components/LazyForEach.md
topics/components/LazyVGridLayout.md
topics/components/Line.md
topics/components/List.md
topics/components/ListItem.md
topics/components/ListItemGroup.md
topics/components/LoadingProgress.md
topics/components/LoginPanel (华为账号Panel登录组件).md
topics/components/LoginWithHuaweiIDButton (华为账号Button登录组件).md
topics/components/LongPressGesture.md
topics/components/MapComponent(地图组件).md
topics/components/Marquee.md
topics/components/Matrix2D.md
topics/components/Menu.md
topics/components/MenuItem.md
topics/components/MenuItemGroup.md
topics/components/MultiNavigation.md
topics/components/MultiWindowEntryInAPP.md
topics/components/NavDestination.md
topics/components/NavPushPathHelper.md
topics/components/NavRouter.md
topics/components/Navigation.md
topics/components/Navigator.md
topics/components/NodeContainer.md
topics/components/OffscreenCanvas.md
topics/components/OffscreenCanvasRenderingContext2D.md
topics/components/PanGesture.md
topics/components/Panel.md
topics/components/PasteButton.md
topics/components/Path.md
topics/components/Path2D.md
topics/components/PatternLock.md
topics/components/PdfView(PDF预览组件).md
topics/components/PinchGesture.md
topics/components/Polygon.md
topics/components/Polyline.md
topics/components/Popup.md
topics/components/Popup控制.md
topics/components/Progress.md
topics/components/ProgressButton.md
topics/components/ProgressButtonV2.md
topics/components/QRCode.md
topics/components/Radio.md
topics/components/Rating.md
topics/components/ReadPageComponent(阅读页组件).md
topics/components/Rect.md
topics/components/Refresh.md
topics/components/RelativeContainer.md
topics/components/Repeat.md
topics/components/RichEditor.md
topics/components/RichText.md
topics/components/RotationGesture.md
topics/components/Row.md
topics/components/RowSplit.md
topics/components/SVG标签解析能力增强.md
topics/components/SVG标签说明.md
topics/components/SaveButton.md
topics/components/Scroll.md
topics/components/ScrollBar.md
topics/components/Search.md
topics/components/SegmentButton.md
topics/components/SegmentButtonV2.md
topics/components/Select.md
topics/components/SelectTitleBar.md
topics/components/SelectionMenu.md
topics/components/Shape.md
topics/components/SideBarContainer.md
topics/components/Slider.md
topics/components/Span.md
topics/components/SplitLayout.md
topics/components/Stack.md
topics/components/Stepper.md
topics/components/StepperItem.md
topics/components/SubHeader.md
topics/components/SubHeaderV2.md
topics/components/SwipeGesture.md
topics/components/SwipeRefresher.md
topics/components/Swiper.md
topics/components/SymbolGlyph.md
topics/components/SymbolSpan.md
topics/components/TabContent.md
topics/components/TabTitleBar.md
topics/components/Tabs.md
topics/components/TapGesture.md
topics/components/Text.md
topics/components/TextArea.md
topics/components/TextClock.md
topics/components/TextInput.md
topics/components/TextPicker.md
topics/components/TextReaderIcon(朗读听筒图标).md
topics/components/TextTimer.md
topics/components/TimePicker.md
topics/components/Tips控制.md
topics/components/Toggle.md
topics/components/ToolBar.md
topics/components/ToolBarItem.md
topics/components/ToolBarV2.md
topics/components/TreeView.md
topics/components/UIPickerComponent.md
topics/components/Video.md
topics/components/WaterFlow.md
topics/components/WithTheme.md
topics/components/XComponent.md
topics/components/Z序控制.md
topics/components/advanced.Counter.md
topics/components/cashierComponentManager (iap嵌入式收银台组件管理).md
topics/components/functionalButtonComponentManager(场景化融合Button组件管理).md
topics/components/functionalInputComponentManager(场景化融合Input组件管理).md
topics/components/loginComponentManager (华为账号登录组件管理).md
topics/components/mutableBuilder.md
topics/components/wrapBuilder.md
topics/components/主题.md
topics/components/事件独占控制.md
topics/components/交互事件分发控制.md
topics/components/交互响应事件.md
topics/components/交互属性.md
topics/components/位置设置.md
topics/components/信息展示.md
topics/components/信息展示公共接口.md
topics/components/像素单位.md
topics/components/全屏模态转场.md
topics/components/公共定义.md
topics/components/共享元素转场 (sharedTransition).md
topics/components/关键帧动画 (keyframeAnimateTo).md
topics/components/其他.md
topics/components/内置环境变量说明.md
topics/components/分布式迁移标识.md
topics/components/列表选择弹窗 (ActionSheet).md
topics/components/前景属性设置.md
topics/components/前景色设置.md
topics/components/动态SymbolGlyphModifier属性设置.md
topics/components/动态属性与自定义.md
topics/components/动态属性设置.md
topics/components/动态手势设置.md
topics/components/动画.md
topics/components/半模态转场.md
topics/components/卡片.md
topics/components/响应式环境变量.md
topics/components/图像效果.md
topics/components/图像类型定义.md
topics/components/图形变换.md
topics/components/图形绘制.md
topics/components/图片与视频.md
topics/components/图片边框设置.md
topics/components/基础属性.md
topics/components/基础手势.md
topics/components/基础类型定义.md
topics/components/基础输入事件.md
topics/components/复用标识.md
topics/components/复用选项.md
topics/components/外描边设置.md
topics/components/多态样式.md
topics/components/安全.md
topics/components/安全区域.md
topics/components/安全控件通用属性.md
topics/components/定义可动画属性 (@AnimatableExtend).md
topics/components/导航与切换.md
topics/components/尺寸设置.md
topics/components/属性动画 (animation).md
topics/components/属性字符串.md
topics/components/工具栏设置.md
topics/components/已停止维护的组件与接口.md
topics/components/布局与边框.md
topics/components/布局约束.md
topics/components/应用级变量的状态管理.md
topics/components/弹出框 (Dialog).md
topics/components/弹窗.md
topics/components/弹窗控制.md
topics/components/形状裁剪.md
topics/components/悬浮事件.md
topics/components/悬浮态效果.md
topics/components/手势公共接口.md
topics/components/手势处理.md
topics/components/手势处理器.md
topics/components/手势拦截增强.md
topics/components/手势控制.md
topics/components/拖拽事件.md
topics/components/拖拽排序.md
topics/components/拖拽控制.md
topics/components/挂载卸载事件.md
topics/components/按钮与选择.md
topics/components/按键事件.md
topics/components/文本与输入.md
topics/components/文本滑动选择器弹窗 (TextPickerDialog).md
topics/components/文本组件公共接口.md
topics/components/无障碍属性.md
topics/components/无障碍悬浮事件.md
topics/components/无障碍控制操作.md
topics/components/无障碍相关.md
topics/components/日历选择器弹窗 (CalendarPickerDialog).md
topics/components/日期滑动选择器弹窗 (DatePickerDialog).md
topics/components/时间滑动选择器弹窗 (TimePickerDialog).md
topics/components/显式动画 (animateTo).md
topics/components/显式动画立即下发 (animateToImmediately).md
topics/components/显隐控制.md
topics/components/枚举说明.md
topics/components/栅格与分栏.md
topics/components/栅格设置.md
topics/components/模态转场设置.md
topics/components/浮层.md
topics/components/渲染绘制.md
topics/components/滚动与滑动.md
topics/components/滚动组件通用接口.md
topics/components/点击事件.md
topics/components/点击回弹效果.md
topics/components/点击控制.md
topics/components/焦点事件.md
topics/components/焦点控制.md
topics/components/焦点轴事件.md
topics/components/特效绘制合并.md
topics/components/状态变量变化监听.md
topics/components/状态管理V1装饰器参数.md
topics/components/状态管理与渲染控制.md
topics/components/画布绘制.md
topics/components/禁用反色能力.md
topics/components/禁用控制.md
topics/components/空白与分隔.md
topics/components/粒子动画 (Particle).md
topics/components/系统预置UI组件库.md
topics/components/组件内容填充方式.md
topics/components/组件内容模糊.md
topics/components/组件内转场 (transition).md
topics/components/组件内隐式共享元素转场 (geometryTransition).md
topics/components/组件区域变化事件.md
topics/components/组件变化事件.md
topics/components/组件可见区域变化事件.md
topics/components/组件尺寸变化事件.md
topics/components/组件快捷键事件.md
topics/components/组件扩展装饰器.md
topics/components/组件标识.md
topics/components/组件级像素取整.md
topics/components/组件预览.md
topics/components/组合手势.md
topics/components/绑定手势.md
topics/components/绑定手势方法.md
topics/components/背景设置.md
topics/components/自定义事件分发.md
topics/components/自定义事件拦截.md
topics/components/自定义内容.md
topics/components/自定义占位组件.md
topics/components/自定义属性设置.md
topics/components/自定义弹窗 (CustomDialog).md
topics/components/自定义手势判定.md
topics/components/自定义组件.md
topics/components/自定义组件内置方法.md
topics/components/自定义组件参数.md
topics/components/自定义组件的生命周期.md
topics/components/自定义组件的生命周期(推荐).md
topics/components/自定义组件的自定义布局.md
topics/components/自定义绘制设置.md
topics/components/菜单.md
topics/components/菜单控制.md
topics/components/行列与堆叠.md
topics/components/表冠事件.md
topics/components/视效与模糊.md
topics/components/视效设置.md
topics/components/触摸事件.md
topics/components/触摸交互控制.md
topics/components/触摸测试控制.md
topics/components/触摸热区设置.md
topics/components/警告弹窗 (AlertDialog).md
topics/components/设置事件回调.md
topics/components/设置组件绑定的手势.md
topics/components/路径动画 (motionPath).md
topics/components/轴事件.md
topics/components/输入框类组件通用接口.md
topics/components/边框设置.md
topics/components/运动模糊.md
topics/components/选择器(Picker)公共接口.md
topics/components/透明度设置.md
topics/components/通用事件.md
topics/components/通用属性.md
topics/components/隐私遮罩.md
topics/components/页面级像素取整.md
topics/components/页面间转场 (pageTransition).md
topics/components/颜色渐变.md
topics/components/鼠标事件.md
topics/components/鼠标光标控制.md
topics/graphics/ArkGraphics 2D(方舟2D图形服务).md
topics/graphics/ArkGraphics 3D(方舟3D图形).md
topics/graphics/ArkTS API.md
topics/graphics/BufferHandle.md
topics/graphics/C API.md
topics/graphics/ColorSpacePrimaries.md
topics/graphics/DisplaySoloist_ExpectedRateRange.md
topics/graphics/Drawing.md
topics/graphics/NativeColorSpaceManager.md
topics/graphics/NativeDisplaySoloist.md
topics/graphics/NativeFence.md
topics/graphics/NativePixelMap_.md
topics/graphics/NativeVsync.md
topics/graphics/NativeWindow.md
topics/graphics/NativeWindowBuffer.md
topics/graphics/OHExtDataHandle.md
topics/graphics/OHHDRMetaData.md
topics/graphics/OHIPCParcel.md
topics/graphics/OH_DisplaySoloist.md
topics/graphics/OH_Drawing_Array.md
topics/graphics/OH_Drawing_Bitmap.md
topics/graphics/OH_Drawing_BitmapFormat.md
topics/graphics/OH_Drawing_Brush.md
topics/graphics/OH_Drawing_Canvas.md
topics/graphics/OH_Drawing_ColorFilter.md
topics/graphics/OH_Drawing_ColorSpace.md
topics/graphics/OH_Drawing_Filter.md
topics/graphics/OH_Drawing_Font.md
topics/graphics/OH_Drawing_FontAdjustInfo.md
topics/graphics/OH_Drawing_FontAliasInfo.md
topics/graphics/OH_Drawing_FontArguments.md
topics/graphics/OH_Drawing_FontCollection.md
topics/graphics/OH_Drawing_FontConfigInfo.md
topics/graphics/OH_Drawing_FontDescriptor.md
topics/graphics/OH_Drawing_FontFallbackGroup.md
topics/graphics/OH_Drawing_FontFallbackInfo.md
topics/graphics/OH_Drawing_FontFeature.md
topics/graphics/OH_Drawing_FontFeatures.md
topics/graphics/OH_Drawing_FontFullDescriptor.md
topics/graphics/OH_Drawing_FontGenericInfo.md
topics/graphics/OH_Drawing_FontMgr.md
topics/graphics/OH_Drawing_FontParser.md
topics/graphics/OH_Drawing_FontStyleSet.md
topics/graphics/OH_Drawing_Font_Metrics.md
topics/graphics/OH_Drawing_GpuContext.md
topics/graphics/OH_Drawing_GpuContextOptions.md
topics/graphics/OH_Drawing_Image.md
topics/graphics/OH_Drawing_ImageFilter.md
topics/graphics/OH_Drawing_Image_Info.md
topics/graphics/OH_Drawing_Lattice.md
topics/graphics/OH_Drawing_LineMetrics.md
topics/graphics/OH_Drawing_LineTypography.md
topics/graphics/OH_Drawing_MaskFilter.md
topics/graphics/OH_Drawing_Matrix.md
topics/graphics/OH_Drawing_MemoryStream.md
topics/graphics/OH_Drawing_Path.md
topics/graphics/OH_Drawing_PathEffect.md
topics/graphics/OH_Drawing_PathIterator.md
topics/graphics/OH_Drawing_Pen.md
topics/graphics/OH_Drawing_PixelMap.md
topics/graphics/OH_Drawing_PlaceholderSpan.md
topics/graphics/OH_Drawing_Point.md
topics/graphics/OH_Drawing_Point2D.md
topics/graphics/OH_Drawing_Point3D.md
topics/graphics/OH_Drawing_PositionAndAffinity.md
topics/graphics/OH_Drawing_Range.md
topics/graphics/OH_Drawing_RecordCmd.md
topics/graphics/OH_Drawing_RecordCmdUtils.md
topics/graphics/OH_Drawing_Rect.md
topics/graphics/OH_Drawing_RectStyle_Info.md
topics/graphics/OH_Drawing_Region.md
topics/graphics/OH_Drawing_RoundRect.md
topics/graphics/OH_Drawing_Run.md
topics/graphics/OH_Drawing_RunBuffer.md
topics/graphics/OH_Drawing_SamplingOptions.md
topics/graphics/OH_Drawing_ShaderEffect.md
topics/graphics/OH_Drawing_ShadowLayer.md
topics/graphics/OH_Drawing_String.md
topics/graphics/OH_Drawing_StrutStyle.md
topics/graphics/OH_Drawing_Surface.md
topics/graphics/OH_Drawing_TextBlob.md
topics/graphics/OH_Drawing_TextBlobBuilder.md
topics/graphics/OH_Drawing_TextBox.md
topics/graphics/OH_Drawing_TextLine.md
topics/graphics/OH_Drawing_TextShadow.md
topics/graphics/OH_Drawing_TextStyle.md
topics/graphics/OH_Drawing_TextTab.md
topics/graphics/OH_Drawing_Typeface.md
topics/graphics/OH_Drawing_Typography.md
topics/graphics/OH_Drawing_TypographyCreate.md
topics/graphics/OH_Drawing_TypographyStyle.md
topics/graphics/OH_Filter.md
topics/graphics/OH_Filter_ColorMatrix.md
topics/graphics/OH_NativeBuffer.md
topics/graphics/OH_NativeBuffer_ColorXY.md
topics/graphics/OH_NativeBuffer_Config.md
topics/graphics/OH_NativeBuffer_Cta861.md
topics/graphics/OH_NativeBuffer_Plane.md
topics/graphics/OH_NativeBuffer_Planes.md
topics/graphics/OH_NativeBuffer_Smpte2086.md
topics/graphics/OH_NativeBuffer_StaticMetadata.md
topics/graphics/OH_NativeColorSpaceManager.md
topics/graphics/OH_NativeImage.md
topics/graphics/OH_NativeVSync.md
topics/graphics/OH_NativeVSync_ExpectedRateRange.md
topics/graphics/OH_OnFrameAvailableListener.md
topics/graphics/OH_PixelmapNative.md
topics/graphics/Rect.md
topics/graphics/Region.md
topics/graphics/Scene.md
topics/graphics/SceneNode.md
topics/graphics/ScenePostProcessSettings.md
topics/graphics/SceneResource.md
topics/graphics/SceneType.md
topics/graphics/WhitePointArray.md
topics/graphics/buffer_common.h.md
topics/graphics/buffer_handle.h.md
topics/graphics/drawing_bitmap.h.md
topics/graphics/drawing_brush.h.md
topics/graphics/drawing_canvas.h.md
topics/graphics/drawing_color.h.md
topics/graphics/drawing_color_filter.h.md
topics/graphics/drawing_color_space.h.md
topics/graphics/drawing_error_code.h.md
topics/graphics/drawing_filter.h.md
topics/graphics/drawing_font.h.md
topics/graphics/drawing_font_collection.h.md
topics/graphics/drawing_font_mgr.h.md
topics/graphics/drawing_gpu_context.h.md
topics/graphics/drawing_image.h.md
topics/graphics/drawing_image_filter.h.md
topics/graphics/drawing_lattice.h.md
topics/graphics/drawing_mask_filter.h.md
topics/graphics/drawing_matrix.h.md
topics/graphics/drawing_memory_stream.h.md
topics/graphics/drawing_path.h.md
topics/graphics/drawing_path_effect.h.md
topics/graphics/drawing_path_iterator.h.md
topics/graphics/drawing_pen.h.md
topics/graphics/drawing_pixel_map.h.md
topics/graphics/drawing_point.h.md
topics/graphics/drawing_record_cmd.h.md
topics/graphics/drawing_rect.h.md
topics/graphics/drawing_region.h.md
topics/graphics/drawing_register_font.h.md
topics/graphics/drawing_round_rect.h.md
topics/graphics/drawing_sampling_options.h.md
topics/graphics/drawing_shader_effect.h.md
topics/graphics/drawing_shadow_layer.h.md
topics/graphics/drawing_surface.h.md
topics/graphics/drawing_text_blob.h.md
topics/graphics/drawing_text_declaration.h.md
topics/graphics/drawing_text_font_descriptor.h.md
topics/graphics/drawing_text_global.h.md
topics/graphics/drawing_text_line.h.md
topics/graphics/drawing_text_lineTypography.h.md
topics/graphics/drawing_text_run.h.md
topics/graphics/drawing_text_typography.h.md
topics/graphics/drawing_typeface.h.md
topics/graphics/drawing_types.h.md
topics/graphics/effectKit.md
topics/graphics/effect_filter.h.md
topics/graphics/effect_types.h.md
topics/graphics/external_window.h.md
topics/graphics/graphic_error_code.h.md
topics/graphics/graphics3d.md
topics/graphics/native_buffer.h.md
topics/graphics/native_color_space_manager.h.md
topics/graphics/native_display_soloist.h.md
topics/graphics/native_fence.h.md
topics/graphics/native_image.h.md
topics/graphics/native_vsync.h.md
topics/graphics/头文件.md
topics/graphics/模块.md
topics/graphics/模块描述.md
topics/input/ArkTS API.md
topics/input/C API.md
topics/input/OH_PixelmapNative.md
topics/input/input.md
topics/input/oh_axis_type.h.md
topics/input/oh_input_manager.h.md
topics/input/oh_key_code.h.md
topics/input/oh_pointer_style.h.md
topics/input/头文件.md
topics/input/模块.md
topics/media/AVCapability.md
topics/media/AVCodec Kit(音视频编解码服务).md
topics/media/AVDemuxer.md
topics/media/AVImageGenerator.md
topics/media/AVMediaBase.md
topics/media/AVMetadataExtractor.md
topics/media/AVMuxer.md
topics/media/AVPlayer.md
topics/media/AVPlayerCallback.md
topics/media/AVRecorder.md
topics/media/AVScreenCapture.md
topics/media/AVSession Kit(音视频播控服务).md
topics/media/AVSession_DeviceInfo.md
topics/media/AVSession_OutputDeviceInfo.md
topics/media/AVSession_PlaybackPosition.md
topics/media/AVSinkBase.md
topics/media/AVSource.md
topics/media/AVTranscoder.md
topics/media/ArkTS API.md
topics/media/Audio Kit(音频服务).md
topics/media/AudioCodec.md
topics/media/AudioDecoder.md
topics/media/AudioEncoder.md
topics/media/C API.md
topics/media/Camera Kit(相机服务).md
topics/media/CameraInput_Callbacks.md
topics/media/CameraManager_Callbacks.md
topics/media/Camera_AutoDeviceSwitchStatusInfo.md
topics/media/Camera_CaptureEndInfo.md
topics/media/Camera_CaptureSession.md
topics/media/Camera_CaptureStartInfo.md
topics/media/Camera_ConcurrentInfo.md
topics/media/Camera_ControlCenterStatusInfo.md
topics/media/Camera_Device.md
topics/media/Camera_DeviceQueryInfo.md
topics/media/Camera_FoldStatusInfo.md
topics/media/Camera_FrameRateRange.md
topics/media/Camera_FrameShutterEndInfo.md
topics/media/Camera_FrameShutterInfo.md
topics/media/Camera_Input.md
topics/media/Camera_Location.md
topics/media/Camera_Manager.md
topics/media/Camera_MetadataObject.md
topics/media/Camera_MetadataOutput.md
topics/media/Camera_OcclusionDetectionResult.md
topics/media/Camera_OutputCapability.md
topics/media/Camera_PhotoCaptureSetting.md
topics/media/Camera_PhotoOutput.md
topics/media/Camera_Point.md
topics/media/Camera_PreviewOutput.md
topics/media/Camera_Profile.md
topics/media/Camera_Rect.md
topics/media/Camera_Size.md
topics/media/Camera_SmoothZoomInfo.md
topics/media/Camera_StatusInfo.md
topics/media/Camera_TorchStatusInfo.md
topics/media/Camera_VideoOutput.md
topics/media/Camera_VideoProfile.md
topics/media/CaptureSession_Callbacks.md
topics/media/CodecBase.md
topics/media/Constants.md
topics/media/Core.md
topics/media/DRM Kit(数字版权保护服务).md
topics/media/DRM_KeysInfo.md
topics/media/DRM_MediaKeyRequest.md
topics/media/DRM_MediaKeyRequestInfo.md
topics/media/DRM_MediaKeyStatus.md
topics/media/DRM_MediaKeySystemDescription.md
topics/media/DRM_MediaKeySystemInfo.md
topics/media/DRM_OfflineMediakeyIdArray.md
topics/media/DRM_PsshInfo.md
topics/media/DRM_Statistics.md
topics/media/Drm.md
topics/media/DrmSubsample.md
topics/media/Functions.md
topics/media/LowPowerAudioSink.md
topics/media/LowPowerVideoSink.md
topics/media/Media Kit(媒体服务).md
topics/media/Media Library Kit(媒体文件管理服务).md
topics/media/MediaAssetManager.md
topics/media/MediaKeySession.md
topics/media/MediaKeySession_Callback.md
topics/media/MediaKeySystem.md
topics/media/MediaLibrary_RequestId.md
topics/media/MediaLibrary_RequestOptions.md
topics/media/MetadataOutput_Callbacks.md
topics/media/Multimedia_Drm.md
topics/media/NativePixelMap_.md
topics/media/NativeWindow.md
topics/media/OHAVSession.md
topics/media/OHAudio.md
topics/media/OHAudioSuite.md
topics/media/OH_AVBuffer.md
topics/media/OH_AVCapability.md
topics/media/OH_AVCastController.md
topics/media/OH_AVCencInfo.md
topics/media/OH_AVCodec.md
topics/media/OH_AVCodecAsyncCallback.md
topics/media/OH_AVCodecBufferAttr.md
topics/media/OH_AVCodecCallback.md
topics/media/OH_AVDataSource.md
topics/media/OH_AVDataSourceExt.md
topics/media/OH_AVDemuxer.md
topics/media/OH_AVFormat.md
topics/media/OH_AVHttpHeader.md
topics/media/OH_AVImageGenerator.md
topics/media/OH_AVMediaSource.md
topics/media/OH_AVMediaSourceLoader.md
topics/media/OH_AVMediaSourceLoadingRequest.md
topics/media/OH_AVMemory.md
topics/media/OH_AVMetadataExtractor.md
topics/media/OH_AVMetadataExtractor_FrameInfo.md
topics/media/OH_AVMetadataExtractor_OutputParam.md
topics/media/OH_AVMuxer.md
topics/media/OH_AVPlaybackStrategy.md
topics/media/OH_AVPlayer.md
topics/media/OH_AVRange.md
topics/media/OH_AVRecorder.md
topics/media/OH_AVRecorder_Config.md
topics/media/OH_AVRecorder_EncoderInfo.md
topics/media/OH_AVRecorder_Location.md
topics/media/OH_AVRecorder_Metadata.md
topics/media/OH_AVRecorder_MetadataTemplate.md
topics/media/OH_AVRecorder_Profile.md
topics/media/OH_AVRecorder_Range.md
topics/media/OH_AVSamplesBuffer.md
topics/media/OH_AVScreenCapture.md
topics/media/OH_AVScreenCaptureCallback.md
topics/media/OH_AVScreenCaptureConfig.md
topics/media/OH_AVScreenCaptureHighlightConfig.md
topics/media/OH_AVScreenCapture_CaptureStrategy.md
topics/media/OH_AVScreenCapture_ContentFilter.md
topics/media/OH_AVScreenCapture_UserSelectionInfo.md
topics/media/OH_AVSeiMessageArray.md
topics/media/OH_AVSession.md
topics/media/OH_AVSession_AVMediaDescription.md
topics/media/OH_AVSession_AVMediaDescriptionBuilder.md
topics/media/OH_AVSession_AVPlaybackState.md
topics/media/OH_AVSession_AVQueueItem.md
topics/media/OH_AVSource.md
topics/media/OH_AVTranscoder.md
topics/media/OH_AVTranscoder_Config.md
topics/media/OH_AudioBuffer.md
topics/media/OH_AudioCaptureInfo.md
topics/media/OH_AudioDataArray.md
topics/media/OH_AudioDeviceDescriptor.md
topics/media/OH_AudioDeviceDescriptorArray.md
topics/media/OH_AudioEncInfo.md
topics/media/OH_AudioFormat.md
topics/media/OH_AudioInfo.md
topics/media/OH_AudioManager.md
topics/media/OH_AudioResourceManager.md
topics/media/OH_AudioRoutingManager.md
topics/media/OH_AudioSessionManager.md
topics/media/OH_AudioSession_DeactivatedEvent.md
topics/media/OH_AudioSession_StateChangedEvent.md
topics/media/OH_AudioSession_Strategy.md
topics/media/OH_AudioStreamInfo.md
topics/media/OH_AudioStreamManager.md
topics/media/OH_AudioSuite_PureVoiceChangeOption.md
topics/media/OH_AudioSuite_SpaceRenderExtensionParams.md
topics/media/OH_AudioSuite_SpaceRenderPositionParams.md
topics/media/OH_AudioSuite_SpaceRenderRotationParams.md
topics/media/OH_AudioVolumeManager.md
topics/media/OH_AudioWorkgroup.md
topics/media/OH_AuxiliaryPictureInfo.md
topics/media/OH_AuxiliaryPictureNative.md
topics/media/OH_Camera.md
topics/media/OH_ComposeOptions.md
topics/media/OH_DecodingOptions.md
topics/media/OH_DecodingOptionsForPicture.md
topics/media/OH_EffectBufferInfo.md
topics/media/OH_EffectFilter.md
topics/media/OH_EffectFilterInfo.md
topics/media/OH_EqualizerFrequencyBandGains.md
topics/media/OH_ImageBufferData.md
topics/media/OH_ImageEffect.md
topics/media/OH_ImageNative.md
topics/media/OH_ImagePackerNative.md
topics/media/OH_ImageProcessing.md
topics/media/OH_ImageReceiverNative.md
topics/media/OH_ImageReceiverOptions.md
topics/media/OH_ImageSourceNative.md
topics/media/OH_ImageSource_Info.md
topics/media/OH_LowPowerAudioSink.md
topics/media/OH_LowPowerAudioSinkCallback.md
topics/media/OH_LowPowerVideoSink.md
topics/media/OH_LowPowerVideoSinkCallback.md
topics/media/OH_MediaAsset.md
topics/media/OH_MediaAssetChangeRequest.md
topics/media/OH_MediaAssetManager.md
topics/media/OH_MediaKeySession_Callback.md
topics/media/OH_MovingPhoto.md
topics/media/OH_NativeBuffer.md
topics/media/OH_NativeColorSpaceManager.md
topics/media/OH_PackingOptions.md
topics/media/OH_PackingOptionsForSequence.md
topics/media/OH_PhotoNative.md
topics/media/OH_PictureMetadata.md
topics/media/OH_PictureNative.md
topics/media/OH_PixelmapNative.md
topics/media/OH_Pixelmap_HdrDynamicMetadata.md
topics/media/OH_Pixelmap_HdrGainmapMetadata.md
topics/media/OH_Pixelmap_HdrMetadataValue.md
topics/media/OH_Pixelmap_HdrStaticMetadata.md
topics/media/OH_Pixelmap_ImageInfo.md
topics/media/OH_Pixelmap_InitializationOptions.md
topics/media/OH_RecorderInfo.md
topics/media/OH_Rect.md
topics/media/OH_VideoCaptureInfo.md
topics/media/OH_VideoEncInfo.md
topics/media/OH_VideoInfo.md
topics/media/OH_VideoProcessing.md
topics/media/OhosImageComponent.md
topics/media/OhosImageDecodingOps.md
topics/media/OhosImageReceiverInfo.md
topics/media/OhosImageRect.md
topics/media/OhosImageRegion.md
topics/media/OhosImageSize.md
topics/media/OhosImageSource.md
topics/media/OhosImageSourceDelayTimeList.md
topics/media/OhosImageSourceInfo.md
topics/media/OhosImageSourceOps.md
topics/media/OhosImageSourceProperty.md
topics/media/OhosImageSourceSupportedFormat.md
topics/media/OhosImageSourceSupportedFormatList.md
topics/media/OhosImageSourceUpdateData.md
topics/media/OhosPixelMapCreateOps.md
topics/media/OhosPixelMapInfo.md
topics/media/OhosPixelMapInfos.md
topics/media/PhotoOutput_Callbacks.md
topics/media/PreviewOutput_Callbacks.md
topics/media/Ringtone Kit(铃声服务).md
topics/media/Scan Kit(统一扫码服务).md
topics/media/SoundPool (音频池).md
topics/media/SystemSoundPlayer (音效播放器).md
topics/media/Types.md
topics/media/VideoDecoder.md
topics/media/VideoEncoder.md
topics/media/VideoOutput_Callbacks.md
topics/media/VideoProcessing.md
topics/media/VideoProcessing_Callback.md
topics/media/VideoProcessing_ColorSpaceInfo.md
topics/media/avcodec_audio_channel_layout.h.md
topics/media/avimage_generator.h.md
topics/media/avimage_generator_base.h.md
topics/media/avmedia_base.h.md
topics/media/avmedia_source.h.md
topics/media/avmedia_source.md
topics/media/avmetadata_extractor.h.md
topics/media/avmetadata_extractor_base.h.md
topics/media/avmetakeys.h.md
topics/media/avplayer.h.md
topics/media/avplayer_base.h.md
topics/media/avrecorder.h.md
topics/media/avrecorder_base.h.md
topics/media/avtranscoder.h.md
topics/media/avtranscoder_base.h.md
topics/media/camera.h.md
topics/media/camera_device.h.md
topics/media/camera_input.h.md
topics/media/camera_manager.h.md
topics/media/capture_session.h.md
topics/media/class (ExifMetadata).md
topics/media/class (HeifsMetadata).md
topics/media/class (MakerNoteHuaweiMetadata).md
topics/media/customScan (自定义界面扫码).md
topics/media/detectBarcode (图像识码).md
topics/media/generateBarcode (码图生成).md
topics/media/image_common.h.md
topics/media/image_effect.h.md
topics/media/image_effect_errors.h.md
topics/media/image_effect_filter.h.md
topics/media/image_mdk.h.md
topics/media/image_mdk_common.h.md
topics/media/image_native.h.md
topics/media/image_packer_mdk.h.md
topics/media/image_packer_native.h.md
topics/media/image_pixel_map_mdk.h.md
topics/media/image_pixel_map_napi.h.md
topics/media/image_processing.h.md
topics/media/image_processing_types.h.md
topics/media/image_receiver_mdk.h.md
topics/media/image_receiver_native.h.md
topics/media/image_source_mdk.h.md
topics/media/image_source_native.h.md
topics/media/lowpower_audio_sink.h.md
topics/media/lowpower_audio_sink_base.h.md
topics/media/lowpower_avsink_base.h.md
topics/media/lowpower_video_sink.h.md
topics/media/lowpower_video_sink_base.h.md
topics/media/media_access_helper_capi.h.md
topics/media/media_asset_base_capi.h.md
topics/media/media_asset_capi.h.md
topics/media/media_asset_change_request_capi.h.md
topics/media/media_asset_manager_capi.h.md
topics/media/media_types.h.md
topics/media/metadata_output.h.md
topics/media/moving_photo_capi.h.md
topics/media/multimedia.md
topics/media/native_audio_channel_layout.h.md
topics/media/native_audio_common.h.md
topics/media/native_audio_device_base.h.md
topics/media/native_audio_manager.h.md
topics/media/native_audio_resource_manager.h.md
topics/media/native_audio_routing_manager.h.md
topics/media/native_audio_session_manager.h.md
topics/media/native_audio_stream_manager.h.md
topics/media/native_audio_suite_base.h.md
topics/media/native_audio_suite_engine.h.md
topics/media/native_audio_volume_manager.h.md
topics/media/native_audiocapturer.h.md
topics/media/native_audiorenderer.h.md
topics/media/native_audiostream_base.h.md
topics/media/native_audiostreambuilder.h.md
topics/media/native_avbuffer.h.md
topics/media/native_avbuffer_info.h.md
topics/media/native_avcapability.h.md
topics/media/native_avcastcontroller.h.md
topics/media/native_avcodec_audiocodec.h.md
topics/media/native_avcodec_audiodecoder.h.md
topics/media/native_avcodec_audioencoder.h.md
topics/media/native_avcodec_base.h.md
topics/media/native_avcodec_videodecoder.h.md
topics/media/native_avcodec_videoencoder.h.md
topics/media/native_avdemuxer.h.md
topics/media/native_averrors.h.md
topics/media/native_avformat.h.md
topics/media/native_avmemory.h.md
topics/media/native_avmetadata.h.md
topics/media/native_avmuxer.h.md
topics/media/native_avplaybackstate.h.md
topics/media/native_avqueueitem.h.md
topics/media/native_avscreen_capture.h.md
topics/media/native_avscreen_capture_base.h.md
topics/media/native_avscreen_capture_errors.h.md
topics/media/native_avsession.h.md
topics/media/native_avsession_base.h.md
topics/media/native_avsession_errors.h.md
topics/media/native_avsource.h.md
topics/media/native_cencinfo.h.md
topics/media/native_deviceinfo.h.md
topics/media/native_drm_common.h.md
topics/media/native_drm_err.h.md
topics/media/native_mediakeysession.h.md
topics/media/native_mediakeysystem.h.md
topics/media/photo_native.h.md
topics/media/photo_output.h.md
topics/media/picture_native.h.md
topics/media/pixelmap_native.h.md
topics/media/preview_output.h.md
topics/media/ringtone(铃声服务).md
topics/media/scanBarcode (默认界面扫码).md
topics/media/scanCore (扫码公共信息).md
topics/media/video.md
topics/media/video_output.h.md
topics/media/video_processing.h.md
topics/media/video_processing_types.h.md
topics/media/头文件.md
topics/media/媒体.md
topics/media/媒体查询.md
topics/media/媒体组件.md
topics/media/已停止维护的接口.md
topics/media/模块.md
topics/media/模块描述.md
topics/misc/AAID(应用匿名标识符).md
topics/misc/ABR_CameraData.md
topics/misc/ABR_Vector3.md
topics/misc/AI.md
topics/misc/AIP.md
topics/misc/AR Engine.md
topics/misc/AR Engine(AR引擎服务).md
topics/misc/AREngine_ARAugmentedImageSource.md
topics/misc/AREngine_ARFrame.md
topics/misc/AREngine_ARSemanticDenseCubeData.md
topics/misc/AREngine_ARSemanticDensePointData.md
topics/misc/AREngine_ARSession.md
topics/misc/AREngine_ClipPlaneDistance.md
topics/misc/ARKUI_TextPickerCascadeRangeContent.md
topics/misc/ARKUI_TextPickerRangeContent.md
topics/misc/Ability Kit(程序框架服务).md
topics/misc/AbilityAccessControl.md
topics/misc/AbilityBase.md
topics/misc/AbilityBase_Element.md
topics/misc/AbilityBase_Want.md
topics/misc/AbilityDelegator.md
topics/misc/AbilityDelegatorArgs.md
topics/misc/AbilityInfo.md
topics/misc/AbilityMonitor.md
topics/misc/AbilityResult.md
topics/misc/AbilityRunningInfo.md
topics/misc/AbilityRuntime.md
topics/misc/AbilityRuntime_StartOptions.md
topics/misc/AbilityStageContext.md
topics/misc/AbilityStageMonitor.md
topics/misc/AbilityStartCallback.md
topics/misc/AbilityStateData.md
topics/misc/Ability_ChildProcessConfigs.md
topics/misc/Accessibility Kit(无障碍服务).md
topics/misc/AccessibilityExtensionContext (辅助功能扩展上下文).md
topics/misc/Account Kit(华为账号服务).md
topics/misc/Ads Kit(广告服务).md
topics/misc/Agent Framework Kit(智能体框架服务).md
topics/misc/AlphaAnimation.md
topics/misc/AnimateResult.md
topics/misc/Animation.md
topics/misc/AnimationFillMode.md
topics/misc/AnimationRepeatMode.md
topics/misc/AnimationSet.md
topics/misc/AnnualTimeZoneRule.md
topics/misc/App Linking Kit(应用链接服务).md
topics/misc/AppGallery Kit(应用市场服务).md
topics/misc/AppPicker(应用选择页).md
topics/misc/AppServiceExtensionContext (应用后台服务扩展组件上下文).md
topics/misc/AppStateData.md
topics/misc/AppVersionInfo.md
topics/misc/ApplicationContext (应用上下文).md
topics/misc/ApplicationInfo.md
topics/misc/ApplicationStateObserver.md
topics/misc/ArkData(方舟数据管理).md
topics/misc/ArkTS API.md
topics/misc/ArkTS API参考.md
topics/misc/ArkTS 组件.md
topics/misc/ArkTSUtils.ASON.md
topics/misc/ArkTSUtils.locks.md
topics/misc/ArkTS(方舟编程语言).md
topics/misc/ArkUI_Accessibility.md
topics/misc/ArkUI_AccessibilityActionArguments.md
topics/misc/ArkUI_AccessibilityElementInfo.md
topics/misc/ArkUI_AccessibilityElementInfoList.md
topics/misc/ArkUI_AccessibilityEventInfo.md
topics/misc/ArkUI_AccessibilityProvider.md
topics/misc/ArkUI_AccessibilityProviderCallbacks.md
topics/misc/ArkUI_AccessibilityProviderCallbacksWithInstance.md
topics/misc/ArkUI_AccessibilityState.md
topics/misc/ArkUI_AccessibilityValue.md
topics/misc/ArkUI_AccessibleAction.md
topics/misc/ArkUI_AccessibleGridInfo.md
topics/misc/ArkUI_AccessibleGridItemInfo.md
topics/misc/ArkUI_AccessibleRangeInfo.md
topics/misc/ArkUI_AccessibleRect.md
topics/misc/ArkUI_ActiveChildrenInfo.md
topics/misc/ArkUI_AlignmentRuleOption.md
topics/misc/ArkUI_AnimateCompleteCallback.md
topics/misc/ArkUI_AnimateOption.md
topics/misc/ArkUI_AnimatorEvent.md
topics/misc/ArkUI_AnimatorOnFrameEvent.md
topics/misc/ArkUI_AnimatorOption.md
topics/misc/ArkUI_Animator_.md
topics/misc/ArkUI_AttributeItem.md
topics/misc/ArkUI_BarrierOption.md
topics/misc/ArkUI_CircleShapeOption.md
topics/misc/ArkUI_CoastingAxisEvent.md
topics/misc/ArkUI_ColorAnimatablePropertyHandle.md
topics/misc/ArkUI_ColorPropertyHandle.md
topics/misc/ArkUI_ColorStop.md
topics/misc/ArkUI_CommandPathOption.md
topics/misc/ArkUI_ContentTransitionEffect.md
topics/misc/ArkUI_Context.md
topics/misc/ArkUI_ContextCallback.md
topics/misc/ArkUI_Context_.md
topics/misc/ArkUI_CrossLanguageOption.md
topics/misc/ArkUI_Curve.md
topics/misc/ArkUI_Curve_.md
topics/misc/ArkUI_CustomDialogOptions.md
topics/misc/ArkUI_CustomProperty.md
topics/misc/ArkUI_CustomSpanDrawInfo.md
topics/misc/ArkUI_CustomSpanMeasureInfo.md
topics/misc/ArkUI_CustomSpanMetrics.md
topics/misc/ArkUI_DialogDismissEvent.md
topics/misc/ArkUI_DragAction.md
topics/misc/ArkUI_DragAndDropInfo.md
topics/misc/ArkUI_DragEvent.md
topics/misc/ArkUI_DragPreviewOption.md
topics/misc/ArkUI_DrawContext.md
topics/misc/ArkUI_DrawableDescriptor.md
topics/misc/ArkUI_DrawableDescriptor_AnimationController.md
topics/misc/ArkUI_EmbeddedComponentOption.md
topics/misc/ArkUI_EventModule.md
topics/misc/ArkUI_ExpectedFrameRateRange.md
topics/misc/ArkUI_FloatAnimatablePropertyHandle.md
topics/misc/ArkUI_FloatPropertyHandle.md
topics/misc/ArkUI_GestureEvent.md
topics/misc/ArkUI_GestureEventTargetInfo.md
topics/misc/ArkUI_GestureInterruptInfo.md
topics/misc/ArkUI_GestureRecognizer.md
topics/misc/ArkUI_GestureRecognizerHandle_.md
topics/misc/ArkUI_GestureRecognizer_.md
topics/misc/ArkUI_GridItemRect.md
topics/misc/ArkUI_GridItemSize.md
topics/misc/ArkUI_GridLayoutOptions.md
topics/misc/ArkUI_GuidelineOption.md
topics/misc/ArkUI_HostWindowInfo.md
topics/misc/ArkUI_ImageAnimatorFrameInfo.md
topics/misc/ArkUI_IntOffset.md
topics/misc/ArkUI_IntSize.md
topics/misc/ArkUI_KeyframeAnimateOption.md
topics/misc/ArkUI_LayoutConstraint.md
topics/misc/ArkUI_ListChildrenMainSize.md
topics/misc/ArkUI_ListItemSwipeActionItem.md
topics/misc/ArkUI_ListItemSwipeActionOption.md
topics/misc/ArkUI_Margin.md
topics/misc/ArkUI_MotionPathOptions.md
topics/misc/ArkUI_NativeAnimateAPI_1.md
topics/misc/ArkUI_NativeDialog.md
topics/misc/ArkUI_NativeDialogAPI_1.md
topics/misc/ArkUI_NativeDialogAPI_2.md
topics/misc/ArkUI_NativeDialogAPI_3.md
topics/misc/ArkUI_NativeDialog_.md
topics/misc/ArkUI_NativeGestureAPI_1.md
topics/misc/ArkUI_NativeGestureAPI_2.md
topics/misc/ArkUI_NativeModule.md
topics/misc/ArkUI_NativeNodeAPI_1.md
topics/misc/ArkUI_Node.md
topics/misc/ArkUI_NodeAdapterEvent.md
topics/misc/ArkUI_NodeAdapter_.md
topics/misc/ArkUI_NodeBorderColorOption.md
topics/misc/ArkUI_NodeBorderRadiusOption.md
topics/misc/ArkUI_NodeBorderStyleOption.md
topics/misc/ArkUI_NodeBorderWidthOption.md
topics/misc/ArkUI_NodeComponentEvent.md
topics/misc/ArkUI_NodeContentEvent.md
topics/misc/ArkUI_NodeContent_.md
topics/misc/ArkUI_NodeCustomEvent.md
topics/misc/ArkUI_NodeEvent.md
topics/misc/ArkUI_Node_.md
topics/misc/ArkUI_NumberValue.md
topics/misc/ArkUI_ParallelInnerGestureEvent.md
topics/misc/ArkUI_PickerIndicatorBackground.md
topics/misc/ArkUI_PickerIndicatorDivider.md
topics/misc/ArkUI_PickerIndicatorStyle.md
topics/misc/ArkUI_PixelRoundPolicy.md
topics/misc/ArkUI_PositionEdges.md
topics/misc/ArkUI_ProgressLinearStyleOption.md
topics/misc/ArkUI_Rect.md
topics/misc/ArkUI_RectShapeOption.md
topics/misc/ArkUI_RenderContentModifierHandle.md
topics/misc/ArkUI_RenderNodeClipOption.md
topics/misc/ArkUI_RenderNodeHandle.md
topics/misc/ArkUI_RenderNodeMaskOption.md
topics/misc/ArkUI_RenderNodeUtils.md
topics/misc/ArkUI_RotationOptions.md
topics/misc/ArkUI_RoundRectShapeOption.md
topics/misc/ArkUI_ScaleOptions.md
topics/misc/ArkUI_SelectedDragPreviewStyle.md
topics/misc/ArkUI_SelectionOptions.md
topics/misc/ArkUI_ShowCounterConfig.md
topics/misc/ArkUI_SnapshotOptions.md
topics/misc/ArkUI_StringAsyncEvent.md
topics/misc/ArkUI_StyledString.md
topics/misc/ArkUI_StyledString_Descriptor.md
topics/misc/ArkUI_SwiperArrowStyle.md
topics/misc/ArkUI_SwiperDigitIndicator.md
topics/misc/ArkUI_SwiperIndicator.md
topics/misc/ArkUI_SystemFontStyleEvent.md
topics/misc/ArkUI_TextCascadePickerRangeContentArray.md
topics/misc/ArkUI_TextChangeEvent.md
topics/misc/ArkUI_TextContentBaseController.md
topics/misc/ArkUI_TextEditMenuOptions.md
topics/misc/ArkUI_TextLayoutManager.md
topics/misc/ArkUI_TextMarqueeOptions.md
topics/misc/ArkUI_TextMenuItem.md
topics/misc/ArkUI_TextMenuItemArray.md
topics/misc/ArkUI_TextPickerRangeContentArray.md
topics/misc/ArkUI_TextSelectionMenuOptions.md
topics/misc/ArkUI_TouchRecognizer.md
topics/misc/ArkUI_TouchRecognizerHandle_.md
topics/misc/ArkUI_TouchRecognizer_.md
topics/misc/ArkUI_TouchTestInfo.md
topics/misc/ArkUI_TouchTestInfoItem.md
topics/misc/ArkUI_TouchTestInfoItemHandle_.md
topics/misc/ArkUI_TouchTestInfoItem_.md
topics/misc/ArkUI_TransitionEffect.md
topics/misc/ArkUI_TranslationOptions.md
topics/misc/ArkUI_UIInputEvent.md
topics/misc/ArkUI_Vector2AnimatablePropertyHandle.md
topics/misc/ArkUI_Vector2PropertyHandle.md
topics/misc/ArkUI_VisibleAreaEventOptions.md
topics/misc/ArkUI_WaterFlowSectionOption.md
topics/misc/ArkUI_XComponentSurfaceConfig.md
topics/misc/ArkUI(方舟UI框架).md
topics/misc/ArkWeb_AnyNativeAPI.md
topics/misc/ArkWeb_BlanklessInfo.md
topics/misc/ArkWeb_ComponentAPI.md
topics/misc/ArkWeb_ControllerAPI.md
topics/misc/ArkWeb_CookieManagerAPI.md
topics/misc/ArkWeb_HttpBodyStream_.md
topics/misc/ArkWeb_JavaScriptBridgeData.md
topics/misc/ArkWeb_JavaScriptObject.md
topics/misc/ArkWeb_JavaScriptValueAPI.md
topics/misc/ArkWeb_JavaScriptValue_.md
topics/misc/ArkWeb_ProxyMethod.md
topics/misc/ArkWeb_ProxyMethodWithResult.md
topics/misc/ArkWeb_ProxyObject.md
topics/misc/ArkWeb_ProxyObjectWithResult.md
topics/misc/ArkWeb_RequestHeaderList_.md
topics/misc/ArkWeb_ResourceHandler_.md
topics/misc/ArkWeb_ResourceRequest_.md
topics/misc/ArkWeb_Response_.md
topics/misc/ArkWeb_SchemeHandler_.md
topics/misc/ArkWeb_WebMessageAPI.md
topics/misc/ArkWeb_WebMessagePortAPI.md
topics/misc/ArkWeb_WebMessagePort_.md
topics/misc/ArkWeb_WebMessage_.md
topics/misc/ArkWeb(方舟Web).md
topics/misc/AssetAccelerationExtensionAbility(资源加速ExtensionAbility).md
topics/misc/AssetAccelerationExtensionContext(资源加速ExtensionContext).md
topics/misc/AttributeUpdater.md
topics/misc/Background Tasks Kit(后台任务开发服务).md
topics/misc/BackgroundProcessManager.md
topics/misc/BaseContext.md
topics/misc/BaseDdk.md
topics/misc/BaseOverlay.md
topics/misc/BasePriorityOverlay.md
topics/misc/Basic Services Kit(基础服务).md
topics/misc/Bubble.md
topics/misc/BuilderNode.md
topics/misc/BuildingOverlay.md
topics/misc/BundleInfo.md
topics/misc/C API.md
topics/misc/CANN Kit(CANN 服务).md
topics/misc/CANN.md
topics/misc/CSS语法参考.md
topics/misc/Calendar Kit(日历服务).md
topics/misc/Call Service Kit(通话服务).md
topics/misc/CallerInfoQueryExtensionAbility (来去电信息查询扩展Ability).md
topics/misc/CallerInfoQueryExtensionContext (来去电信息查询扩展Context).md
topics/misc/CameraUpdate.md
topics/misc/CanvasGradient对象.md
topics/misc/CanvasRenderingContext2D对象.md
topics/misc/Car Kit(车服务).md
topics/misc/ChildProcess.md
topics/misc/Cloud Foundation Kit(云开发服务).md
topics/misc/CloudDisk.md
topics/misc/CloudDisk_ChangeData.md
topics/misc/CloudDisk_ChangesResult.md
topics/misc/CloudDisk_DisplayNameInfo.md
topics/misc/CloudDisk_FailedList.md
topics/misc/CloudDisk_FileSyncState.md
topics/misc/CloudDisk_PathInfo.md
topics/misc/CloudDisk_ResultList.md
topics/misc/CloudDisk_SyncFolder.md
topics/misc/ClusterOverlay.md
topics/misc/CommonEventData.md
topics/misc/CommonEventPublishData.md
topics/misc/CommonEventSubscribeInfo.md
topics/misc/CommonEvent_PublishInfo.md
topics/misc/CommonEvent_RcvData.md
topics/misc/CommonEvent_SubscribeInfo.md
topics/misc/ComponentContent.md
topics/misc/ConnectOptions.md
topics/misc/Console (控制台).md
topics/misc/Contacts Kit(联系人服务).md
topics/misc/Content.md
topics/misc/Context (FA模型的上下文基类).md
topics/misc/Context (Stage模型的上下文基类).md
topics/misc/ContinuationExtraParams.md
topics/misc/ContinuationResult.md
topics/misc/Core File Kit(文件基础服务).md
topics/misc/Core Speech Kit(基础语音服务).md
topics/misc/Core Vision Kit(基础视觉服务).md
topics/misc/CustomizeData.md
topics/misc/DDK_Ashmem.md
topics/misc/Data Augmentation Kit(数据增强服务).md
topics/misc/DataAbilityHelper.md
topics/misc/DataAbilityOperation.md
topics/misc/DataAbilityResult.md
topics/misc/Data_Asset.md
topics/misc/DateTimeRule.md
topics/misc/Desktop Extension Kit(桌面拓展服务).md
topics/misc/DeviceInfo.md
topics/misc/Driver Development Kit(驱动开发服务).md
topics/misc/DriverExtensionContext.md
topics/misc/EGL.md
topics/misc/ElementName.md
topics/misc/EmbeddableUIAbilityContext.md
topics/misc/Enterprise Space Kit(企业数字空间服务).md
topics/misc/EnterpriseAdminExtensionContext.md
topics/misc/Environment.md
topics/misc/ErrorObserver.md
topics/misc/EventHub.md
topics/misc/ExtensionAbilityInfo.md
topics/misc/ExtensionContext.md
topics/misc/FAST Kit(算法加速服务).md
topics/misc/FAST.md
topics/misc/FAST_Rect.md
topics/misc/FA模型能力的接口.md
topics/misc/FFRT.md
topics/misc/FG_AlgorithmModeInfo.md
topics/misc/FG_ContextDescription_VK.md
topics/misc/FG_Dimension2D.md
topics/misc/FG_DispatchDescription_GLES.md
topics/misc/FG_DispatchDescription_VK.md
topics/misc/FG_ImageFormat_VK.md
topics/misc/FG_ImageInfo_VK.md
topics/misc/FG_ImageSync_VK.md
topics/misc/FG_IntegrationInfo.md
topics/misc/FG_Mat4x4.md
topics/misc/FG_PerFrameExtendedCameraInfo.md
topics/misc/FG_ResolutionInfo.md
topics/misc/FG_Vec3D.md
topics/misc/File Manager Service Kit(文件管理服务).md
topics/misc/FileIO.md
topics/misc/FileShare_PolicyErrorResult.md
topics/misc/FileShare_PolicyInfo.md
topics/misc/FlowFieldOverlay.md
topics/misc/FontSizeAnimation.md
topics/misc/Form Kit(卡片开发服务).md
topics/misc/FormEditExtensionContext.md
topics/misc/FormExtensionContext.md
topics/misc/FrameNode.md
topics/misc/Function Flow Runtime Kit.md
topics/misc/Functions.md
topics/misc/Game Controller Kit(游戏控制器服务).md
topics/misc/Game Service Kit(游戏服务).md
topics/misc/GameController.md
topics/misc/GamePerformance.md
topics/misc/GlobalColorPicker.md
topics/misc/Graphics Accelerate Kit(图形加速服务).md
topics/misc/Graphics.md
topics/misc/GraphicsAccelerate.md
topics/misc/GuardService(屏幕时间守护服务).md
topics/misc/HML语法参考.md
topics/misc/HMS_GCP_Color.md
topics/misc/HMS_GCP_PickedColorInfo.md
topics/misc/HMS_SpatialRecon_DataFrame.md
topics/misc/HMS_SpatialRecon_ModelWriteInfo.md
topics/misc/HMS_SpatialRecon_Session.md
topics/misc/HandWrite.md
topics/misc/HandWrite_HistoricalPoint.md
topics/misc/HandwriteController (手写套件功能).md
topics/misc/HapModuleInfo.md
topics/misc/Health Service Kit(运动健康服务).md
topics/misc/Heatmap.md
topics/misc/HiAISingleOpDescriptor_ConvolutionParam.md
topics/misc/HiAI_SingleOpExecutorConvolutionParam.md
topics/misc/HiAI_SingleOpExecutorFusedConvolutionActivationParam.md
topics/misc/HiAppEvent.md
topics/misc/HiAppEvent_AppEventGroup.md
topics/misc/HiAppEvent_AppEventInfo.md
topics/misc/HiAppEvent_Config.md
topics/misc/HiAppEvent_Processor.md
topics/misc/HiAppEvent_Watcher.md
topics/misc/HiCollie.md
topics/misc/HiCollie_DetectionParam.md
topics/misc/HiCollie_SetTimerParam.md
topics/misc/HiDebug.md
topics/misc/HiDebug_Backtrace_Object___.md
topics/misc/HiDebug_GraphicsMemorySummary.md
topics/misc/HiDebug_JsStackFrame.md
topics/misc/HiDebug_MallocDispatch.md
topics/misc/HiDebug_MemoryLimit.md
topics/misc/HiDebug_NativeMemInfo.md
topics/misc/HiDebug_NativeStackFrame.md
topics/misc/HiDebug_ProcessSamplerConfig.md
topics/misc/HiDebug_StackFrame.md
topics/misc/HiDebug_SystemMemInfo.md
topics/misc/HiDebug_ThreadCpuUsage.md
topics/misc/HiLog.md
topics/misc/HiTrace.md
topics/misc/HiTraceId.md
topics/misc/HidDdk.md
topics/misc/Hid_AbsAxesArray.md
topics/misc/Hid_Device.md
topics/misc/Hid_DeviceHandle.md
topics/misc/Hid_EmitItem.md
topics/misc/Hid_EventProperties.md
topics/misc/Hid_EventTypeArray.md
topics/misc/Hid_KeyCodeArray.md
topics/misc/Hid_MscEventArray.md
topics/misc/Hid_RawDevInfo.md
topics/misc/Hid_RelAxesArray.md
topics/misc/JSVM.md
topics/misc/JSVM_CallbackInfo___.md
topics/misc/JSVM_CodeCache.md
topics/misc/JSVM_CompileOptions.md
topics/misc/JSVM_CompileProfile.md
topics/misc/JSVM_CpuProfiler___.md
topics/misc/JSVM_CreateVMOptions.md
topics/misc/JSVM_Data___.md
topics/misc/JSVM_Deferred___.md
topics/misc/JSVM_EnvScope___.md
topics/misc/JSVM_Env___.md
topics/misc/JSVM_EscapableHandleScope___.md
topics/misc/JSVM_ExtendedErrorInfo.md
topics/misc/JSVM_HandleScope___.md
topics/misc/JSVM_HeapStatistics.md
topics/misc/JSVM_InitOptions.md
topics/misc/JSVM_PropertyDescriptor.md
topics/misc/JSVM_PropertyHandler.md
topics/misc/JSVM_Ref___.md
topics/misc/JSVM_ScriptOrigin.md
topics/misc/JSVM_Script___.md
topics/misc/JSVM_TypeTag.md
topics/misc/JSVM_VMInfo.md
topics/misc/JSVM_VMScope___.md
topics/misc/JSVM_VM___.md
topics/misc/JSVM_Value___.md
topics/misc/JS服务卡片UI组件.md
topics/misc/JS组件.md
topics/misc/JS语法参考.md
topics/misc/Kernel Enhance Kit(内核增强能力).md
topics/misc/KioskStatus (Kiosk状态信息).md
topics/misc/LatLngBoundsUtils.md
topics/misc/LauncherAbilityInfo.md
topics/misc/Live View Kit(实况窗服务).md
topics/misc/LiveFormExtensionContext.md
topics/misc/LiveViewLockScreenExtensionAbility.md
topics/misc/LiveViewLockScreenExtensionContext.md
topics/misc/Localization Kit(本地化开发服务).md
topics/misc/Location Kit(位置服务).md
topics/misc/Location.md
topics/misc/Location_BasicInfo.md
topics/misc/Location_Info.md
topics/misc/Location_RequestConfig.md
topics/misc/LoopObserver.md
topics/misc/MDM Kit(企业设备管理服务).md
topics/misc/Map Kit(地图服务).md
topics/misc/MapArc.md
topics/misc/MapCircle.md
topics/misc/MapComponentController.md
topics/misc/MapEventManager.md
topics/misc/MapPolygon.md
topics/misc/MapPolyline.md
topics/misc/Marker.md
topics/misc/MarkerClusterInfo.md
topics/misc/MarkerDelegate.md
topics/misc/MassPointOverlay.md
topics/misc/MassPointOverlayCallback.md
topics/misc/Mechanic Kit(机械设备管理服务).md
topics/misc/Metadata.md
topics/misc/MindSpore Lite Kit(昇思推理框架服务).md
topics/misc/MindSpore.md
topics/misc/ModuleInfo.md
topics/misc/ModuleInstall.md
topics/misc/Multimodal Awareness Kit(多模态融合感知服务).md
topics/misc/MvtOverlay.md
topics/misc/NDK涉及的musl libc接口使用限制的说明.md
topics/misc/NNRTDeviceDesc.md
topics/misc/NN_QuantParam.md
topics/misc/NN_Tensor.md
topics/misc/NN_TensorDesc.md
topics/misc/Native api中导出的EGL符号列表.md
topics/misc/Native api中导出的ICU4C符号列表.md
topics/misc/Native api中导出的OpenGL ES 3.2符号列表.md
topics/misc/Native api中没有导出的符号列表.md
topics/misc/NativeChildProcess_Args.md
topics/misc/NativeChildProcess_Fd.md
topics/misc/NativeChildProcess_FdList.md
topics/misc/NativeChildProcess_Options.md
topics/misc/NativeDisplayManager_CutoutInfo.md
topics/misc/NativeDisplayManager_DisplayColorSpace.md
topics/misc/NativeDisplayManager_DisplayHdrFormat.md
topics/misc/NativeDisplayManager_DisplayInfo.md
topics/misc/NativeDisplayManager_DisplaysInfo.md
topics/misc/NativeDisplayManager_Rect.md
topics/misc/NativeDisplayManager_WaterfallDisplayAreaRects.md
topics/misc/NativeResourceManager.md
topics/misc/NativeWindow.md
topics/misc/Native_Bundle.md
topics/misc/Natural Language Kit(自然语言理解服务).md
topics/misc/Neural Network Runtime Kit(Neural Network运行时服务).md
topics/misc/NeuralNetworkRuntime.md
topics/misc/Node-API.md
topics/misc/NodeContent.md
topics/misc/NodeController.md
topics/misc/Notification Kit(用户通知服务).md
topics/misc/NotificationActionButton.md
topics/misc/NotificationCommonDef.md
topics/misc/NotificationContent.md
topics/misc/NotificationExtensionContent.md
topics/misc/NotificationExtensionSubscriptionInfo.md
topics/misc/NotificationFlags.md
topics/misc/NotificationInfo.md
topics/misc/NotificationRequest.md
topics/misc/NotificationSlot.md
topics/misc/NotificationTemplate.md
topics/misc/NotificationUserInput.md
topics/misc/OHBufferHandle.md
topics/misc/OHIPCDeathRecipient.md
topics/misc/OHIPCParcel.md
topics/misc/OHIPCRemoteObject.md
topics/misc/OHIPCRemoteProxy.md
topics/misc/OHIPCRemoteStub.md
topics/misc/OHIPCSkeleton.md
topics/misc/OH_AI_AllocatorHandle.md
topics/misc/OH_AI_CallBackParam.md
topics/misc/OH_AI_ContextHandle.md
topics/misc/OH_AI_DeviceInfoHandle.md
topics/misc/OH_AI_ModelHandle.md
topics/misc/OH_AI_ShapeInfo.md
topics/misc/OH_AI_TensorHandle.md
topics/misc/OH_AI_TensorHandleArray.md
topics/misc/OH_AI_TrainCfgHandle.md
topics/misc/OH_ArkUI_SurfaceCallback.md
topics/misc/OH_ArkUI_SurfaceHolder.md
topics/misc/OH_BatteryInfo.md
topics/misc/OH_CommonEvent.md
topics/misc/OH_Cursor.md
topics/misc/OH_Data_VBuckets.md
topics/misc/OH_Data_Value.md
topics/misc/OH_Data_Values.md
topics/misc/OH_DisplayManager.md
topics/misc/OH_IPC_MessageOption.md
topics/misc/OH_NNCompilation.md
topics/misc/OH_NNExecutor.md
topics/misc/OH_NNModel.md
topics/misc/OH_NN_Memory.md
topics/misc/OH_NN_QuantParam.md
topics/misc/OH_NN_Tensor.md
topics/misc/OH_NN_UInt32Array.md
topics/misc/OH_NativeBuffer.md
topics/misc/OH_NativeBundle_AbilityResourceInfo.md
topics/misc/OH_NativeBundle_ApplicationInfo.md
topics/misc/OH_NativeBundle_ElementName.md
topics/misc/OH_NativeBundle_Metadata.md
topics/misc/OH_NativeBundle_ModuleMetadata.md
topics/misc/OH_NativeXComponent Native XComponent.md
topics/misc/OH_NativeXComponent.md
topics/misc/OH_NativeXComponent_Callback.md
topics/misc/OH_NativeXComponent_ExpectedRateRange.md
topics/misc/OH_NativeXComponent_ExtraMouseEventInfo.md
topics/misc/OH_NativeXComponent_HistoricalPoint.md
topics/misc/OH_NativeXComponent_KeyEvent.md
topics/misc/OH_NativeXComponent_MouseEvent.md
topics/misc/OH_NativeXComponent_MouseEvent_Callback.md
topics/misc/OH_NativeXComponent_TouchEvent.md
topics/misc/OH_NativeXComponent_TouchPoint.md
topics/misc/OH_Pasteboard.md
topics/misc/OH_PasteboardObserver.md
topics/misc/OH_PixelmapNative.md
topics/misc/OH_PixelmapNative_.md
topics/misc/OH_Predicates.md
topics/misc/OH_Preferences.md
topics/misc/OH_PreferencesOption.md
topics/misc/OH_PreferencesPair.md
topics/misc/OH_PreferencesValue.md
topics/misc/OH_Print.md
topics/misc/OH_QoS_GewuCreateSessionResult.md
topics/misc/OH_QoS_GewuSubmitRequestResult.md
topics/misc/OH_RDB_ReturningContext.md
topics/misc/OH_RDB_TransOptions.md
topics/misc/OH_Rdb_Config.md
topics/misc/OH_Rdb_ConfigV2.md
topics/misc/OH_Rdb_CryptoParam.md
topics/misc/OH_Rdb_Store.md
topics/misc/OH_Rdb_Transaction.md
topics/misc/OH_Scan.md
topics/misc/OH_UdmfData.md
topics/misc/OH_UdmfDataLoadInfo.md
topics/misc/OH_UdmfDataLoadParams.md
topics/misc/OH_UdmfGetDataParams.md
topics/misc/OH_UdmfOptions.md
topics/misc/OH_UdmfProperty.md
topics/misc/OH_UdmfRecord.md
topics/misc/OH_UdmfRecordProvider.md
topics/misc/OH_Udmf_ProgressInfo.md
topics/misc/OH_UdsAppItem.md
topics/misc/OH_UdsArrayBuffer.md
topics/misc/OH_UdsContentForm.md
topics/misc/OH_UdsDetails.md
topics/misc/OH_UdsFileUri.md
topics/misc/OH_UdsHtml.md
topics/misc/OH_UdsHyperlink.md
topics/misc/OH_UdsPixelMap.md
topics/misc/OH_UdsPlainText.md
topics/misc/OH_Utd.md
topics/misc/OH_VBucket.md
topics/misc/OH_VObject.md
topics/misc/OffscreenCanvasRenderingContext2D对象.md
topics/misc/OffscreenCanvas对象.md
topics/misc/OpenGL ES.md
topics/misc/OpenGL.md
topics/misc/OpenGL符号列表.md
topics/misc/OpenGTX_ConfigDescription.md
topics/misc/OpenGTX_FrameRenderInfo.md
topics/misc/OpenGTX_GameSceneInfo.md
topics/misc/OpenGTX_NetworkInfo.md
topics/misc/OpenGTX_NetworkLatency.md
topics/misc/OpenGTX_ResolutionValue.md
topics/misc/OpenGTX_Vector3.md
topics/misc/OpenSL ES.md
topics/misc/OsAccount.md
topics/misc/OverlayModuleInfo.md
topics/misc/PDF Kit(PDF服务).md
topics/misc/POI类型值.md
topics/misc/ParamListNode_.md
topics/misc/Pasteboard.md
topics/misc/Pasteboard_GetDataParams.md
topics/misc/Pasteboard_ProgressInfo.md
topics/misc/Path2D对象.md
topics/misc/Pen Kit(手写笔服务).md
topics/misc/Performance Analysis Kit(性能分析服务).md
topics/misc/PermissionRequestResult.md
topics/misc/PhotoEditorExtensionContext.md
topics/misc/PictureInPicture_PipConfig.md
topics/misc/PlayImageAnimation.md
topics/misc/PointAnnotation.md
topics/misc/PointPredictor(报点预测功能).md
topics/misc/Preferences.md
topics/misc/Preview Kit(文件预览服务).md
topics/misc/Preview.md
topics/misc/Print_DefaultValue.md
topics/misc/Print_Margin.md
topics/misc/Print_PageSize.md
topics/misc/Print_PrintAttributes.md
topics/misc/Print_PrintDocCallback.md
topics/misc/Print_PrintJob.md
topics/misc/Print_PrinterCapability.md
topics/misc/Print_PrinterInfo.md
topics/misc/Print_Property.md
topics/misc/Print_PropertyList.md
topics/misc/Print_Range.md
topics/misc/Print_Resolution.md
topics/misc/Print_StringList.md
topics/misc/ProcessData.md
topics/misc/ProcessInfo.md
topics/misc/ProcessInformation.md
topics/misc/ProcessRunningInfo.md
topics/misc/Projection.md
topics/misc/PurgMem.md
topics/misc/Push Kit(推送服务).md
topics/misc/PushExtensionAbility(推送扩展Ability).md
topics/misc/PushExtensionContext(推送扩展Context).md
topics/misc/QoS.md
topics/misc/RDB.md
topics/misc/REST API.md
topics/misc/REST API参考.md
topics/misc/RawDir.md
topics/misc/RawFile64.md
topics/misc/RawFileDescriptor.md
topics/misc/RawFileDescriptor64.md
topics/misc/Rdb_ChangeInfo.md
topics/misc/Rdb_DataObserver.md
topics/misc/Rdb_DistributedConfig.md
topics/misc/Rdb_KeyData.md
topics/misc/Rdb_KeyInfo.md
topics/misc/Rdb_ProgressDetails.md
topics/misc/Rdb_ProgressObserver.md
topics/misc/Rdb_Statistic.md
topics/misc/Rdb_SubscribeCallback.md
topics/misc/Rdb_TableDetails.md
topics/misc/ReadStateCode(播报状态).md
topics/misc/Reader Kit(阅读服务).md
topics/misc/RemoteLocationExtensionAbility(定位扩展Ability).md
topics/misc/RemoteLocationExtensionContext(定位扩展Context).md
topics/misc/RemoteNotificationExtensionAbility(通知扩展Ability).md
topics/misc/RemoteNotificationExtensionContext(通知扩展Context).md
topics/misc/RenderNode.md
topics/misc/Resource.md
topics/misc/ResourceManager_Configuration.md
topics/misc/Retrieval.md
topics/misc/RotateAnimation.md
topics/misc/ScaleAnimation.md
topics/misc/Scan_PictureScanProgress.md
topics/misc/Scan_ScannerDevice.md
topics/misc/Scan_ScannerOptions.md
topics/misc/Scenario Fusion Kit(融合场景服务).md
topics/misc/Screen Time Guard Kit(屏幕时间守护服务).md
topics/misc/ScsiPeripheralDDK.md
topics/misc/ScsiPeripheral_BasicSenseInfo.md
topics/misc/ScsiPeripheral_CapacityInfo.md
topics/misc/ScsiPeripheral_Device.md
topics/misc/ScsiPeripheral_DeviceMemMap.md
topics/misc/ScsiPeripheral_IORequest.md
topics/misc/ScsiPeripheral_InquiryInfo.md
topics/misc/ScsiPeripheral_InquiryRequest.md
topics/misc/ScsiPeripheral_ReadCapacityRequest.md
topics/misc/ScsiPeripheral_Request.md
topics/misc/ScsiPeripheral_RequestSenseRequest.md
topics/misc/ScsiPeripheral_Response.md
topics/misc/ScsiPeripheral_TestUnitReadyRequest.md
topics/misc/ScsiPeripheral_VerifyRequest.md
topics/misc/SendableContext.md
topics/misc/SendableLruCache_K, V_.md
topics/misc/SendableResource.md
topics/misc/Sensor Service Kit(传感器服务).md
topics/misc/Sensor.md
topics/misc/Sensor_Event.md
topics/misc/Sensor_Info.md
topics/misc/Sensor_Subscriber.md
topics/misc/Sensor_SubscriptionAttribute.md
topics/misc/Sensor_SubscriptionId.md
topics/misc/Share Kit(分享服务).md
topics/misc/ShellCmdResult.md
topics/misc/ShortcutInfo.md
topics/misc/Skill.md
topics/misc/Spatial Recon Kit(空间建模服务).md
topics/misc/SpatialRecon.md
topics/misc/SpatialRelationUtil.md
topics/misc/Speech Kit(场景化语音服务).md
topics/misc/Stage模型能力的接口.md
topics/misc/StartAbilityParameter.md
topics/misc/StatusBarViewExtensionAbility(状态栏扩展Ability).md
topics/misc/SysCap (系统能力).md
topics/misc/Test Kit(应用测试服务).md
topics/misc/TextReader(朗读控件).md
topics/misc/TileOverlay.md
topics/misc/TimeArrayTimeZoneRule.md
topics/misc/TimeGuardExtensionAbility(屏幕时间守护扩展Ability).md
topics/misc/TimeGuardExtensionContext(屏幕时间守护扩展Context).md
topics/misc/TimeService.md
topics/misc/TimeZoneRuleQuery.md
topics/misc/TimeZoneRules.md
topics/misc/Timer (定时器).md
topics/misc/TraceOverlay.md
topics/misc/TransientTask.md
topics/misc/TransientTask_DelaySuspendInfo.md
topics/misc/TransientTask_TransientTaskInfo.md
topics/misc/TranslateAnimation.md
topics/misc/TriggerInfo.md
topics/misc/Types.md
topics/misc/UDMF.md
topics/misc/UI Design Kit(UI设计套件).md
topics/misc/UIAbilityContext.md
topics/misc/UIExtensionContext.md
topics/misc/UIServiceExtensionConnectCallback.md
topics/misc/UIServiceProxy.md
topics/misc/UI界面.md
topics/misc/USBSerialDDK.md
topics/misc/UsbConfigDescriptor.md
topics/misc/UsbControlRequestSetup.md
topics/misc/UsbDdk.md
topics/misc/UsbDdkConfigDescriptor.md
topics/misc/UsbDdkEndpointDescriptor.md
topics/misc/UsbDeviceDescriptor.md
topics/misc/UsbDeviceMemMap.md
topics/misc/UsbEndpointDescriptor.md
topics/misc/UsbRequestPipe.md
topics/misc/UsbSerial_Device.md
topics/misc/UsbSerial_Params.md
topics/misc/Usb_DeviceArray.md
topics/misc/Vibrator.md
topics/misc/Vibrator_Attribute.md
topics/misc/Vibrator_FileDescription.md
topics/misc/Vision Kit(场景化视觉服务).md
topics/misc/VisionBase(Core Vision Kit基类).md
topics/misc/VkExternalFormatOHOS.md
topics/misc/VkImportNativeBufferInfoOHOS.md
topics/misc/VkMemoryGetNativeBufferInfoOHOS.md
topics/misc/VkNativeBufferFormatPropertiesOHOS.md
topics/misc/VkNativeBufferOHOS.md
topics/misc/VkNativeBufferPropertiesOHOS.md
topics/misc/VkNativeBufferUsageOHOS.md
topics/misc/VkPhysicalDevicePresentationPropertiesOHOS.md
topics/misc/VkSurfaceCreateInfoOHOS.md
topics/misc/VkSwapchainImageCreateInfoOHOS.md
topics/misc/VoIPExtensionAbility(应用内通话消息扩展Ability).md
topics/misc/VoIPExtensionContext(应用内通话消息扩展Context).md
topics/misc/Vulkan External Memory开发指导.md
topics/misc/Vulkan Surface开发指导.md
topics/misc/Vulkan.md
topics/misc/Vulkan开发指导.md
topics/misc/Vulkan开发概述.md
topics/misc/Vulkan扩展能力.md
topics/misc/Vulkan支持能力.md
topics/misc/Wallet Kit(钱包服务).md
topics/misc/Want.md
topics/misc/WantAgentInfo.md
topics/misc/Wear Engine Kit(穿戴服务).md
topics/misc/Weather Service Kit(天气服务).md
topics/misc/WindowManager.md
topics/misc/WindowManager_AvoidArea.md
topics/misc/WindowManager_MainWindowInfo.md
topics/misc/WindowManager_Rect.md
topics/misc/WindowManager_WindowProperties.md
topics/misc/WindowManager_WindowSnapshotConfig.md
topics/misc/WindowManager(窗口管理).md
topics/misc/WorkSchedulerExtensionContext.md
topics/misc/XComponentNode.md
topics/misc/XEG_AdaptiveVRSCreateInfo.md
topics/misc/XEG_AdaptiveVRSDescription.md
topics/misc/XEG_DDGICreateInfo.md
topics/misc/XEG_DDGIDescription.md
topics/misc/XEG_DDGIVolumeEntryParameters.md
topics/misc/XEG_ExtensionProperties.md
topics/misc/XEG_HPSCreateInfo.md
topics/misc/XEG_HPSRadixSort.md
topics/misc/XEG_HPSRadixSortDescription.md
topics/misc/XEG_NNGICreateInfo.md
topics/misc/XEG_NNGIDescription.md
topics/misc/XEG_RTAOParameters.md
topics/misc/XEG_RTReflectionCreateInfo.md
topics/misc/XEG_RTReflectionDescription.md
topics/misc/XEG_RTShadowAOCreateInfo.md
topics/misc/XEG_RTShadowAODenoiserParameters.md
topics/misc/XEG_RTShadowAODescription.md
topics/misc/XEG_RTShadowParameters.md
topics/misc/XEG_SpatialUpscaleCreateInfo.md
topics/misc/XEG_SpatialUpscaleDescription.md
topics/misc/XEG_TemporalUpscaleCreateInfo.md
topics/misc/XEG_TemporalUpscaleDescription.md
topics/misc/XEngine Kit(GPU加速引擎服务).md
topics/misc/XEngine.md
topics/misc/ability.md
topics/misc/ability_access_control.h.md
topics/misc/ability_base_common.h.md
topics/misc/ability_resource_info.h.md
topics/misc/ability_runtime_common.h.md
topics/misc/abr_base.h.md
topics/misc/abr_gles.h.md
topics/misc/aip_error_code.h.md
topics/misc/aip_retrieval.h.md
topics/misc/aip_retrieval_condition.h.md
topics/misc/aip_retrieval_condition_vector.h.md
topics/misc/aip_retrieval_query.h.md
topics/misc/aip_retrieval_record.h.md
topics/misc/animate.md
topics/misc/animateMotion.md
topics/misc/animateTransform.md
topics/misc/app.js.md
topics/misc/app.md
topics/misc/appInfoManager(应用元数据管理服务).md
topics/misc/application.md
topics/misc/application_context.h.md
topics/misc/arEngine(AR增强现实能力).md
topics/misc/arViewController(AR场景管理能力).md
topics/misc/ar_engine_core.h.md
topics/misc/arkui.md
topics/misc/arkweb_error_code.h.md
topics/misc/arkweb_interface.h.md
topics/misc/arkweb_net_error_list.h.md
topics/misc/arkweb_scheme_handler.h.md
topics/misc/arkweb_type.h.md
topics/misc/assetDownloadManager(资源包下载管理).md
topics/misc/atomicService(融合场景化API).md
topics/misc/attributionManager(应用归因服务).md
topics/misc/attributionTestManager(应用归因接入调试功能).md
topics/misc/authentication (华为账号应用统一认证服务).md
topics/misc/background_process_manager.h.md
topics/misc/badge.md
topics/misc/bookParser(书籍解析能力).md
topics/misc/bundle.md
topics/misc/bundleManager.md
topics/misc/bundle_manager_common.h.md
topics/misc/button.md
topics/misc/c++标准库.md
topics/misc/calculateDistance.md
topics/misc/calendar.md
topics/misc/canvas组件.md
topics/misc/chart.md
topics/misc/circle.md
topics/misc/clock.md
topics/misc/cloudCommon (公共模块).md
topics/misc/cloudDatabase (云数据库模块).md
topics/misc/cloudFunction (云函数模块).md
topics/misc/cloudResPrefetch(预加载模块).md
topics/misc/cloudStorage (云存储模块).md
topics/misc/cloud_disk_error_code.h.md
topics/misc/commentManager(应用评论服务).md
topics/misc/commonEvent.md
topics/misc/commonEventSubscriber.md
topics/misc/condition_variable.h.md
topics/misc/context.h.md
topics/misc/context_constant.h.md
topics/misc/continuation.md
topics/misc/convertCoordinate.md
topics/misc/convertCoordinateSync.md
topics/misc/data_asset.h.md
topics/misc/data_rdb.md
topics/misc/data_type.h.md
topics/misc/ddk_api.h.md
topics/misc/ddk_types.h.md
topics/misc/deferredLink (延迟链接能力).md
topics/misc/deviceinfo.h.md
topics/misc/dialog.md
topics/misc/div.md
topics/misc/divider.md
topics/misc/drag_and_drop.h.md
topics/misc/drawable_descriptor.h.md
topics/misc/ellipse.md
topics/misc/error_code.h.md
topics/misc/errorcode.h.md
topics/misc/exerciseSequenceHelper(锻炼记录类型常量).md
topics/misc/extendService (华为账号增强服务).md
topics/misc/faceComparator(人脸比对).md
topics/misc/faceDetector(人脸检测).md
topics/misc/fast_ads_segment_map.h.md
topics/misc/fast_common_def.h.md
topics/misc/fast_solver_rect_partition.h.md
topics/misc/ffrt_cond_t.md
topics/misc/ffrt_condattr_t.md
topics/misc/ffrt_dependence_t.md
topics/misc/ffrt_deps_t.md
topics/misc/ffrt_fiber_t.md
topics/misc/ffrt_function_header_t.md
topics/misc/ffrt_loop_t.md
topics/misc/ffrt_mutex_t.md
topics/misc/ffrt_mutexattr_t.md
topics/misc/ffrt_queue_attr_t.md
topics/misc/ffrt_queue_t.md
topics/misc/ffrt_rwlock_t.md
topics/misc/ffrt_rwlockattr_t.md
topics/misc/ffrt_task_attr_t.md
topics/misc/ffrt_task_handle_t.md
topics/misc/fiber.h.md
topics/misc/fileManagerService.md
topics/misc/filePreview(文件预览).md
topics/misc/fileShare.md
topics/misc/fileUri.md
topics/misc/fileUriService(文件路径转换API).md
topics/misc/file_cache_boost.h.md
topics/misc/form.md
topics/misc/format.h.md
topics/misc/frame_generation_base.h.md
topics/misc/frame_generation_gles.h.md
topics/misc/frame_generation_vk.h.md
topics/misc/gameNearbyTransfer(游戏近场快传).md
topics/misc/gamePerformance (游戏场景感知).md
topics/misc/gamePlayer(基础游戏服务).md
topics/misc/game_controller_type.h.md
topics/misc/game_device.h.md
topics/misc/game_device_event.h.md
topics/misc/game_pad.h.md
topics/misc/game_pad_event.h.md
topics/misc/game_performance.h.md
topics/misc/getContext.md
topics/misc/global.md
topics/misc/grid-col.md
topics/misc/grid-container.md
topics/misc/grid-row.md
topics/misc/harmonyShare(华为分享).md
topics/misc/hdsDrawable.md
topics/misc/hdsEffect.md
topics/misc/hdsMaterial.md
topics/misc/healthDataTypes(运动健康数据类型常量).md
topics/misc/healthFields(运动健康数据字段).md
topics/misc/healthModels(运动健康数据模型).md
topics/misc/healthSequenceHelper(健康记录类型常量).md
topics/misc/healthService(运动健康联动服务).md
topics/misc/healthStore(运动健康数据服务).md
topics/misc/hiai_aipp_param.h.md
topics/misc/hiai_helper.h.md
topics/misc/hiai_options.h.md
topics/misc/hiai_single_op.h.md
topics/misc/hiai_tensor.h.md
topics/misc/hiappevent.h.md
topics/misc/hiappevent_cfg.h.md
topics/misc/hiappevent_event.h.md
topics/misc/hiappevent_param.h.md
topics/misc/hicollie.h.md
topics/misc/hid_ddk_api.h.md
topics/misc/hid_ddk_types.h.md
topics/misc/hidebug.h.md
topics/misc/hidebug_type.h.md
topics/misc/i18n.md
topics/misc/image-animator.md
topics/misc/image.md
topics/misc/imageFeaturePicker (全局取色功能).md
topics/misc/input.md
topics/misc/inputmethod_attach_options_capi.h.md
topics/misc/inputmethod_controller_capi.h.md
topics/misc/inputmethod_cursor_info_capi.h.md
topics/misc/inputmethod_inputmethod_proxy_capi.h.md
topics/misc/inputmethod_private_command_capi.h.md
topics/misc/inputmethod_text_avoid_info_capi.h.md
topics/misc/inputmethod_text_config_capi.h.md
topics/misc/inputmethod_text_editor_proxy_capi.h.md
topics/misc/inputmethod_types_capi.h.md
topics/misc/insightIntent.md
topics/misc/interactiveLiveness(人脸活体检测).md
topics/misc/invoiceAssistant (华为账号发票助手服务).md
topics/misc/ipc_cparcel.h.md
topics/misc/ipc_cremote_object.h.md
topics/misc/ipc_cskeleton.h.md
topics/misc/ipc_error_code.h.md
topics/misc/ipc_kit.h.md
topics/misc/jsonObject(实体的其他字段).md
topics/misc/jsvm.h.md
topics/misc/jsvm_types.h.md
topics/misc/js标签配置.md
topics/misc/knowledgeProcessor(知识加工).md
topics/misc/label.md
topics/misc/launchAcceleration(游戏启动加速).md
topics/misc/libc标准库.md
topics/misc/libuv.md
topics/misc/line.md
topics/misc/list-item-group.md
topics/misc/list-item.md
topics/misc/list.md
topics/misc/liveViewManager.md
topics/misc/loadNativeModule (同步动态加载系统库接口).md
topics/misc/localChatModel(端侧问答模型).md
topics/misc/log.h.md
topics/misc/loop.h.md
topics/misc/mapCommon(地图属性模型).md
topics/misc/map(地图显示功能).md
topics/misc/marquee.md
topics/misc/memory.md
topics/misc/menu.md
topics/misc/minorsProtection (华为账号未成年人模式).md
topics/misc/model.h.md
topics/misc/moduleInstallManager (产品特性按需分发).md
topics/misc/module_install.h.md
topics/misc/mutex.h.md
topics/misc/native_animate.h.md
topics/misc/native_child_process.h.md
topics/misc/native_dialog.h.md
topics/misc/native_gcp_api.h.md
topics/misc/native_gesture.h.md
topics/misc/native_handwrite_api.h.md
topics/misc/native_interface.h.md
topics/misc/native_interface_accessibility.h.md
topics/misc/native_interface_arkweb.h.md
topics/misc/native_interface_bundle.h.md
topics/misc/native_interface_focus.h.md
topics/misc/native_interface_xcomponent.h.md
topics/misc/native_key_event.h.md
topics/misc/native_node.h.md
topics/misc/native_node_napi.h.md
topics/misc/native_render.h.md
topics/misc/native_type.h.md
topics/misc/native_xcomponent_key_event.h.md
topics/misc/naviTurnMode.md
topics/misc/navigationInfoMgr(导航信息管理).md
topics/misc/navi(路径规划).md
topics/misc/neural_network_core.h.md
topics/misc/neural_network_runtime.h.md
topics/misc/neural_network_runtime_type.h.md
topics/misc/newCameraPosition.md
topics/misc/newLatLng.md
topics/misc/newLatLngBounds.md
topics/misc/notification.h.md
topics/misc/notification.md
topics/misc/numberIdentify (号码识别查询基本能力).md
topics/misc/objectDetection(多目标识别).md
topics/misc/oh_cloud_disk_manager.h.md
topics/misc/oh_commonevent.h.md
topics/misc/oh_commonevent_support.h.md
topics/misc/oh_cursor.h.md
topics/misc/oh_data_value.h.md
topics/misc/oh_data_values.h.md
topics/misc/oh_data_values_buckets.h.md
topics/misc/oh_display_capture.h.md
topics/misc/oh_display_info.h.md
topics/misc/oh_display_manager.h.md
topics/misc/oh_environment.h.md
topics/misc/oh_file_share.h.md
topics/misc/oh_file_uri.h.md
topics/misc/oh_fileio.h.md
topics/misc/oh_location.h.md
topics/misc/oh_location_type.h.md
topics/misc/oh_pasteboard.h.md
topics/misc/oh_pasteboard_err_code.h.md
topics/misc/oh_predicates.h.md
topics/misc/oh_preferences.h.md
topics/misc/oh_preferences_err_code.h.md
topics/misc/oh_preferences_option.h.md
topics/misc/oh_preferences_value.h.md
topics/misc/oh_rdb_crypto_param.h.md
topics/misc/oh_rdb_transaction.h.md
topics/misc/oh_rdb_types.h.md
topics/misc/oh_sensor.h.md
topics/misc/oh_sensor_type.h.md
topics/misc/oh_value_object.h.md
topics/misc/oh_values_bucket.h.md
topics/misc/oh_window.h.md
topics/misc/oh_window_comm.h.md
topics/misc/oh_window_event_filter.h.md
topics/misc/oh_window_pip.h.md
topics/misc/ohbattery_info.h.md
topics/misc/ohprint.h.md
topics/misc/ohresmgr.h.md
topics/misc/ohscan.h.md
topics/misc/openFileBoost(文件打开加速).md
topics/misc/open_file_boost.h.md
topics/misc/opengtx_base.h.md
topics/misc/option.md
topics/misc/os_account.h.md
topics/misc/os_account_common.h.md
topics/misc/panel.md
topics/misc/path.md
topics/misc/pdfService(PDF服务).md
topics/misc/pdfViewManager(PDF预览).md
topics/misc/petalMaps(拉起地图应用).md
topics/misc/picker-view.md
topics/misc/picker.md
topics/misc/piece.md
topics/misc/polygon.md
topics/misc/polyline.md
topics/misc/popup.md
topics/misc/postCardAction.md
topics/misc/preview_kit.h.md
topics/misc/privacyManager(隐私管理服务).md
topics/misc/productViewManager (应用市场推荐).md
topics/misc/progress.md
topics/misc/purgeable_memory.h.md
topics/misc/pushCommon(推送服务公共信息).md
topics/misc/pushService(推送服务基础能力).md
topics/misc/qos.h.md
topics/misc/qrcode.md
topics/misc/queue.h.md
topics/misc/quickBarManager(快捷栏管理服务).md
topics/misc/rag(检索增强生成).md
topics/misc/rating.md
topics/misc/raw_dir.h.md
topics/misc/raw_file.h.md
topics/misc/raw_file_manager.h.md
topics/misc/rawfile.md
topics/misc/readerCore(阅读核心能力).md
topics/misc/realName (华为账号实名认证服务).md
topics/misc/rect.md
topics/misc/rectifyCoordinate.md
topics/misc/refresh.md
topics/misc/relational_store.h.md
topics/misc/relational_store_error_code.h.md
topics/misc/resmgr_common.h.md
topics/misc/resourcemanager.md
topics/misc/resultSet (结果集).md
topics/misc/retrieval(智慧化数据平台).md
topics/misc/richtext.md
topics/misc/samplePointHelper(采样数据类型常量).md
topics/misc/sceneManager (生态查询服务).md
topics/misc/sceneMap(场景化控件).md
topics/misc/scrollBy.md
topics/misc/scsi_peripheral_api.h.md
topics/misc/scsi_peripheral_types.h.md
topics/misc/search.md
topics/misc/security.md
topics/misc/select.md
topics/misc/serviceNotification(服务通知).md
topics/misc/shared_mutex.h.md
topics/misc/shippingAddress (华为账号收货地址管理服务).md
topics/misc/site(地点搜索).md
topics/misc/skeletonDetection(骨骼点检测).md
topics/misc/sleep.h.md
topics/misc/slider.md
topics/misc/slot插槽.md
topics/misc/smartMobilityCommon(智慧出行场景).md
topics/misc/spaceDataTransfer (空间数据传输).md
topics/misc/spaceManager (空间管理).md
topics/misc/span.md
topics/misc/spatialRender.md
topics/misc/spatial_recon_interface.h.md
topics/misc/speechRecognizer(语音识别).md
topics/misc/stack.md
topics/misc/start_options.h.md
topics/misc/staticMap(静态图).md
topics/misc/status.h.md
topics/misc/statusBarManager(状态栏管理服务).md
topics/misc/stepper-item.md
topics/misc/stepper.md
topics/misc/styled_string.h.md
topics/misc/stylusInteraction (手写笔交互功能).md
topics/misc/subjectSegmentation(主体分割).md
topics/misc/svg.md
topics/misc/svg组件.md
topics/misc/swiper.md
topics/misc/switch.md
topics/misc/symbolRegister.md
topics/misc/syscap_ndk.h.md
topics/misc/systemShare(分享).md
topics/misc/tab-bar.md
topics/misc/tab-content.md
topics/misc/tabs.md
topics/misc/task.h.md
topics/misc/tensor.h.md
topics/misc/text.md
topics/misc/textPath.md
topics/misc/textProcessing(文本处理).md
topics/misc/textRecognition(文字识别).md
topics/misc/textToSpeech(文本转语音).md
topics/misc/textarea.md
topics/misc/time_service.h.md
topics/misc/timer.h.md
topics/misc/timezone.h.md
topics/misc/toggle.md
topics/misc/toolbar-item.md
topics/misc/toolbar.md
topics/misc/trace.h.md
topics/misc/trafficLane.md
topics/misc/transient_task_api.h.md
topics/misc/transient_task_type.h.md
topics/misc/tspan.md
topics/misc/type_def.h.md
topics/misc/types.h.md
topics/misc/udmf.h.md
topics/misc/udmf_err_code.h.md
topics/misc/udmf_meta.h.md
topics/misc/uds.h.md
topics/misc/ui_input_event.h.md
topics/misc/updateManager(更新功能).md
topics/misc/usb_ddk_api.h.md
topics/misc/usb_ddk_types.h.md
topics/misc/usb_serial_api.h.md
topics/misc/usb_serial_types.h.md
topics/misc/utd.h.md
topics/misc/vibrator.h.md
topics/misc/vibrator_type.h.md
topics/misc/visionImageAnalyzer(AI识图控件).md
topics/misc/voipCall (应用内通话管理).md
topics/misc/vulkan_ohos.h.md
topics/misc/walletPass(Pass卡片能力).md
topics/misc/walletTransitCard(交通卡能力).md
topics/misc/want.h.md
topics/misc/wantAgent.md
topics/misc/wearEngine(穿戴设备能力开放).md
topics/misc/weatherService(天气数据服务).md
topics/misc/web.md
topics/misc/wordTag(词性).md
topics/misc/xcomponent.md
topics/misc/xeg_extension_defs.h.md
topics/misc/xeg_gles_adaptive_vrs.h.md
topics/misc/xeg_gles_extension.h.md
topics/misc/xeg_gles_neural_upscale.h.md
topics/misc/xeg_gles_spatial_upscale.h.md
topics/misc/xeg_gles_temporal_upscale.h.md
topics/misc/xeg_vulkan_adaptive_vrs.h.md
topics/misc/xeg_vulkan_common.h.md
topics/misc/xeg_vulkan_extension.h.md
topics/misc/xeg_vulkan_hps.h.md
topics/misc/xeg_vulkan_rt_reflection.h.md
topics/misc/xeg_vulkan_rt_visible_mask.h.md
topics/misc/xeg_vulkan_rtgi.h.md
topics/misc/xeg_vulkan_spatial_upscale.h.md
topics/misc/xeg_vulkan_temporal_upscale.h.md
topics/misc/zlib.md
topics/misc/zoomBy.md
topics/misc/zoomIn.md
topics/misc/zoomOut.md
topics/misc/zoomTo.md
topics/misc/一键登录获取华为账号绑定号码和UnionID_OpenID.md
topics/misc/一键登录获取华为账号绑定号码和UnionID_OpenID(不推荐).md
topics/misc/事件.md
topics/misc/事件撤销.md
topics/misc/公共基础能力.md
topics/misc/公共接口.md
topics/misc/公共说明.md
topics/misc/其他.md
topics/misc/兼容JS的类Web开发范式(ArkUI.Full).md
topics/misc/兼容JS的类Web开发范式(ArkUI.Lite).md
topics/misc/刷新用户级凭证.md
topics/misc/功能介绍.md
topics/misc/动态创建组件.md
topics/misc/动画样式.md
topics/misc/原子布局.md
topics/misc/取消用户级凭证授权.md
topics/misc/响应参数.md
topics/misc/图形.md
topics/misc/图标格式说明.md
topics/misc/图片风控.md
topics/misc/场景化消息.md
topics/misc/城市码及区划代码表.md
topics/misc/基本概念.md
topics/misc/基础功能.md
topics/misc/基础组件.md
topics/misc/多语言支持.md
topics/misc/头文件.md
topics/misc/实名信息校验.md
topics/misc/实名认证.md
topics/misc/容器组件.md
topics/misc/屏幕管理.md
topics/misc/属性.md
topics/misc/已停止维护的接口.md
topics/misc/应用服务.md
topics/misc/应用框架.md
topics/misc/开放接口调用凭证.md
topics/misc/归因结果回传.md
topics/misc/意图共享.md
topics/misc/扩展能力.md
topics/misc/批量转换teamPlayerId.md
topics/misc/接口依赖的元素及定义.md
topics/misc/数字车钥匙接口.md
topics/misc/数据传递与处理.md
topics/misc/数据文件处理.md
topics/misc/数据类型说明.md
topics/misc/文件组织.md
topics/misc/无障碍.md
topics/misc/服务动态.md
topics/misc/服务动态参数说明.md
topics/misc/服务动态推送接口.md
topics/misc/服务通知.md
topics/misc/栅格组件.md
topics/misc/标准库.md
topics/misc/框架说明.md
topics/misc/概述.md
topics/misc/模块.md
topics/misc/模块描述.md
topics/misc/消息回执.md
topics/misc/消息撤回.md
topics/misc/消息频控.md
topics/misc/渐变样式.md
topics/misc/版本兼容适配.md
topics/misc/生命周期.md
topics/misc/生命周期定义.md
topics/misc/画布组件.md
topics/misc/硬件.md
topics/misc/窗口管理.md
topics/misc/系统.md
topics/misc/系统公共事件定义(待停用).md
topics/misc/系统定义的公共事件.md
topics/misc/组件描述.md
topics/misc/组件通用信息.md
topics/misc/继承样式.md
topics/misc/自定义字体样式.md
topics/misc/自定义组件.md
topics/misc/自定义组件使用说明.md
topics/misc/自定义组件的基本用法.md
topics/misc/获取OpenID Connect配置公开信息.md
topics/misc/获取华为账号用户信息-获取头像昵称.md
topics/misc/获取华为账号用户信息-获取手机号.md
topics/misc/获取实名信息.md
topics/misc/获取应用级凭证.md
topics/misc/获取玩家标识.md
topics/misc/获取用户信息.md
topics/misc/获取用户级凭证.md
topics/misc/获取用户风险等级.md
topics/misc/获取验证ID Token的JWT公钥信息.md
topics/misc/解析凭证.md
topics/misc/解绑账号.md
topics/misc/解绑账号通知.md
topics/misc/设备管理.md
topics/misc/设置主题样式.md
topics/misc/语法.md
topics/misc/请求体参数说明.md
topics/misc/请求体结构说明.md
topics/misc/请求示例.md
topics/misc/调测调优.md
topics/misc/账号管理.md
topics/misc/路径规划支持的国家_地区.md
topics/misc/转场样式.md
topics/misc/转换ID.md
topics/misc/运动健康数据类型常量及模型定义.md
topics/misc/进程线程通信.md
topics/misc/通用事件.md
topics/misc/通用属性.md
topics/misc/通用方法.md
topics/misc/通用样式.md
topics/misc/通用能力的接口(推荐).md
topics/misc/通过Authorization Code获取GroupUnionID.md
topics/misc/通过OpenID或UnionID获取GroupUnionID.md
topics/misc/通过OpenID获取UnionID.md
topics/misc/附录.md
topics/misc/验证ID Token有效性.md
topics/networking/ArkTS API.md
topics/networking/ArkTS API参考.md
topics/networking/ArkTS 组件.md
topics/networking/Bluetooth.md
topics/networking/C API.md
topics/networking/CollaborationCamera (跨设备互通组件).md
topics/networking/CollaborationDevicePicker (流转控件).md
topics/networking/CollaborationService (跨设备互通组件).md
topics/networking/Connectivity Kit(短距通信服务).md
topics/networking/DeviceManager.md
topics/networking/Distributed Service Kit(分布式管理服务).md
topics/networking/HMS_NetworkBoost_HandoverCallback.md
topics/networking/Http_Buffer.md
topics/networking/Http_ClientCert.md
topics/networking/Http_CustomProxy.md
topics/networking/Http_EventsHandler.md
topics/networking/Http_HeaderEntry.md
topics/networking/Http_HeaderValue.md
topics/networking/Http_Headers.md
topics/networking/Http_PerformanceTiming.md
topics/networking/Http_Proxy.md
topics/networking/Http_Request.md
topics/networking/Http_RequestOptions.md
topics/networking/Http_Response.md
topics/networking/NearLink Kit(星闪服务).md
topics/networking/NetConn_ConnectionProperties.md
topics/networking/NetConn_HttpProxy.md
topics/networking/NetConn_NetAddr.md
topics/networking/NetConn_NetCapabilities.md
topics/networking/NetConn_NetConnCallback.md
topics/networking/NetConn_NetHandle.md
topics/networking/NetConn_NetHandleList.md
topics/networking/NetConn_NetSpecifier.md
topics/networking/NetConn_ProbeResultInfo.md
topics/networking/NetConn_Route.md
topics/networking/NetConn_TraceRouteInfo.md
topics/networking/NetConn_TraceRouteOption.md
topics/networking/NetConnection.md
topics/networking/NetStack_CertBlob.md
topics/networking/NetStack_CertificatePinning.md
topics/networking/NetStack_Certificates.md
topics/networking/Netstack.md
topics/networking/Network Boost Kit(网络加速服务).md
topics/networking/Network Kit(网络服务).md
topics/networking/NetworkBoost.md
topics/networking/NetworkBoost_DataSpeedAction.md
topics/networking/NetworkBoost_HandoverComplete.md
topics/networking/NetworkBoost_HandoverStart.md
topics/networking/NetworkBoost_MultiPathQuota.md
topics/networking/NetworkBoost_MultiPathQuotaInfo.md
topics/networking/NetworkBoost_MultiPathRecommendation.md
topics/networking/NetworkBoost_MultiPathRequestResult.md
topics/networking/NetworkBoost_MultiPathStateChange.md
topics/networking/NetworkBoost_NetHandle.md
topics/networking/NetworkBoost_NetworkQos.md
topics/networking/NetworkBoost_NetworkQosArray.md
topics/networking/NetworkBoost_NetworkScene.md
topics/networking/NetworkBoost_SceneDesc.md
topics/networking/NetworkBoost_WeakSignalPrediction.md
topics/networking/Rcp_Buffer.md
topics/networking/Rcp_CertificateAuthority.md
topics/networking/Rcp_ClientCertificate.md
topics/networking/Rcp_Configuration.md
topics/networking/Rcp_ConnectionConfiguration.md
topics/networking/Rcp_ContentOrPathOrCallback.md
topics/networking/Rcp_CookieAttributeEntry.md
topics/networking/Rcp_Credential.md
topics/networking/Rcp_DebugInfo.md
topics/networking/Rcp_DnsConfiguration.md
topics/networking/Rcp_DnsOverHttps.md
topics/networking/Rcp_DnsRule.md
topics/networking/Rcp_DnsServers.md
topics/networking/Rcp_EventsHandler.md
topics/networking/Rcp_Exclusions.md
topics/networking/Rcp_FormFieldFileValue.md
topics/networking/Rcp_FormFieldValue.md
topics/networking/Rcp_HeaderEntry.md
topics/networking/Rcp_HeaderValue.md
topics/networking/Rcp_InfoToCollect.md
topics/networking/Rcp_Interceptor.md
topics/networking/Rcp_InterceptorArray.md
topics/networking/Rcp_IpAddress.md
topics/networking/Rcp_IpAndPort.md
topics/networking/Rcp_MultipartFormFieldValue.md
topics/networking/Rcp_OnBinaryReceiveCallback.md
topics/networking/Rcp_OnDataReceiveCallback.md
topics/networking/Rcp_OnHeaderReceiveCallback.md
topics/networking/Rcp_OnProgressCallback.md
topics/networking/Rcp_OnStatusCodeReceiveCallback.md
topics/networking/Rcp_OnVoidCallback.md
topics/networking/Rcp_ProxyConfiguration.md
topics/networking/Rcp_Request.md
topics/networking/Rcp_RequestContent.md
topics/networking/Rcp_RequestCookieEntry.md
topics/networking/Rcp_Response.md
topics/networking/Rcp_ResponseCallbackObject.md
topics/networking/Rcp_ResponseCookies.md
topics/networking/Rcp_SecurityConfiguration.md
topics/networking/Rcp_ServerAuthentication.md
topics/networking/Rcp_SessionConfiguration.md
topics/networking/Rcp_SessionListener.md
topics/networking/Rcp_StaticDnsRule.md
topics/networking/Rcp_StaticDnsRuleItem.md
topics/networking/Rcp_SyncInterceptor.md
topics/networking/Rcp_SyncInterceptorArray.md
topics/networking/Rcp_TimeInfo.md
topics/networking/Rcp_Timeout.md
topics/networking/Rcp_TracingConfiguration.md
topics/networking/Rcp_TransferConfiguration.md
topics/networking/Rcp_TransferRange.md
topics/networking/Rcp_Urls.md
topics/networking/Rcp_WebProxy.md
topics/networking/Remote Communication Kit(远场通信服务).md
topics/networking/RemoteCommunication.md
topics/networking/Service Collaboration Kit(协同服务).md
topics/networking/ServiceCollaboration.md
topics/networking/ServiceCollaborationCallback.md
topics/networking/ServiceCollaboration_CollaborationDeviceInfo.md
topics/networking/ServiceCollaboration_CollaborationDeviceInfoSets.md
topics/networking/ServiceCollaboration_SelectInfo.md
topics/networking/ServiceCollaboration_SelectInfoV2.md
topics/networking/Telephony Kit(蜂窝通信服务).md
topics/networking/Telephony.md
topics/networking/Telephony_NetworkState.md
topics/networking/VpnExtensionContext.md
topics/networking/WebSocket.md
topics/networking/WebSocket_CloseOption.md
topics/networking/WebSocket_CloseResult.md
topics/networking/WebSocket_ErrorResult.md
topics/networking/WebSocket_Header.md
topics/networking/WebSocket_OpenResult.md
topics/networking/WebSocket_RequestOptions.md
topics/networking/Wifi.md
topics/networking/advertising(星闪广播能力).md
topics/networking/constant(星闪公共常量定义).md
topics/networking/dataTransfer(星闪数传能力).md
topics/networking/devicePicker (设备选择控制器).md
topics/networking/manager(星闪开关能力).md
topics/networking/netBoost(网络加速).md
topics/networking/netHandover(连接迁移).md
topics/networking/netQuality(网络质量).md
topics/networking/net_connection.h.md
topics/networking/net_connection_type.h.md
topics/networking/net_http.h.md
topics/networking/net_http_type.h.md
topics/networking/net_ssl_c.h.md
topics/networking/net_ssl_c_type.h.md
topics/networking/net_websocket.h.md
topics/networking/net_websocket_type.h.md
topics/networking/network_boost.h.md
topics/networking/network_boost_handover.h.md
topics/networking/network_boost_quality.h.md
topics/networking/nfctech (标准NFC-Tag Nfc 技术).md
topics/networking/oh_bluetooth.h.md
topics/networking/oh_device_manager.h.md
topics/networking/oh_device_manager_err_code.h.md
topics/networking/oh_wifi.h.md
topics/networking/rcp.h.md
topics/networking/rcp.md
topics/networking/remoteDevice(对端设备的连接能力).md
topics/networking/scan(星闪扫描能力).md
topics/networking/service_collaboration_api.h.md
topics/networking/ssap(星闪SSAP连接能力).md
topics/networking/tag.md
topics/networking/tagSession (标准NFC-Tag TagSession).md
topics/networking/telephony_data.h.md
topics/networking/telephony_radio.h.md
topics/networking/telephony_radio_type.h.md
topics/networking/urpc.md
topics/networking/头文件.md
topics/networking/已停止维护的接口.md
topics/networking/模块.md
topics/networking/网络.md
topics/payment/ArkTS API.md
topics/payment/Payment Kit(鸿蒙支付服务).md
topics/payment/REST API.md
topics/payment/ecnyPaymentService (数字人民币服务).md
topics/payment/paymentService (鸿蒙支付服务).md
topics/payment/promotionService(营销服务).md
topics/payment/realNameService(身份验证服务).md
topics/payment/thirdPaymentService(三方支付服务).md
topics/payment/人脸核身实人预验证.md
topics/payment/人脸核身实人验证.md
topics/payment/人脸核身实人验证结果查询.md
topics/payment/代扣结果回调通知.md
topics/payment/公共说明.md
topics/payment/关闭合单支付订单.md
topics/payment/关闭订单.md
topics/payment/合单支付结果回调通知.md
topics/payment/合单支付(仅支持平台类商户).md
topics/payment/基础支付.md
topics/payment/实名信息授权结果查询.md
topics/payment/实名信息预验证.md
topics/payment/实名信息验证与授权.md
topics/payment/实名信息验证结果查询.md
topics/payment/对返回结果验签.md
topics/payment/平台类商户_服务商.md
topics/payment/应用购买记录相关支付订单查询.md
topics/payment/延迟订阅续订日期.md
topics/payment/接收退款申请事件通知.md
topics/payment/支付并签约.md
topics/payment/支付结果回调通知.md
topics/payment/数据模型说明.md
topics/payment/数据类型说明.md
topics/payment/服务端关键事件通知.md
topics/payment/服务端通知记录查询.md
topics/payment/查询代扣订单.md
topics/payment/查询合单支付订单.md
topics/payment/查询对账单.md
topics/payment/查询支付订单.md
topics/payment/查询用户可用平台券.md
topics/payment/查询用户的历史购买记录.md
topics/payment/查询签约订单.md
topics/payment/查询结算账单.md
topics/payment/查询退款订单.md
topics/payment/根据交易号查询订单状态信息.md
topics/payment/测试服务端通知.md
topics/payment/生成优惠签名购买参数.md
topics/payment/生成服务端请求的token.md
topics/payment/申请免密代扣.md
topics/payment/申请解约.md
topics/payment/申请退款.md
topics/payment/直连商户.md
topics/payment/签约代扣.md
topics/payment/签约结果回调通知.md
topics/payment/获取应用级凭证.md
topics/payment/营销服务.md
topics/payment/解约结果回调通知.md
topics/payment/订单状态查询(消耗型_非消耗型_非续期订阅商品).md
topics/payment/订单确认发货(消耗型_非消耗型_非续期订阅商品).md
topics/payment/订阅状态查询.md
topics/payment/订阅确认发货.md
topics/payment/账单.md
topics/payment/返回退款审核结果.md
topics/payment/退款申请通知与处理.md
topics/payment/退款结果回调通知.md
topics/payment/通用接口.md
topics/payment/通过combinedMercOrderNo查询订单信息.md
topics/payment/通过combinedSysTransOrderNo查询订单信息.md
topics/payment/通过contractId查询签约信息.md
topics/payment/通过contractId查询签约订单信息.md
topics/payment/通过mercContractCode查询签约信息.md
topics/payment/通过mercContractCode查询签约订单信息.md
topics/payment/通过mercOrderNo查询订单信息.md
topics/payment/通过mercRefundOrderNo查询退款订单信息.md
topics/payment/通过sysRefundOrderNo查询退款订单信息.md
topics/payment/通过sysTransOrderNo查询订单信息.md
topics/payment/附录.md
topics/payment/预下单.md
topics/payment/预签约.md
topics/security/AntifraudPicker(反诈选择器).md
topics/security/ArkTS API.md
topics/security/Asset Store Kit(关键资产存储服务).md
topics/security/AssetApi.md
topics/security/AssetType.md
topics/security/Asset_Attr.md
topics/security/Asset_Blob.md
topics/security/Asset_Result.md
topics/security/Asset_ResultSet.md
topics/security/Asset_SyncResult.md
topics/security/Asset_Value.md
topics/security/AuthenticationExtensionsClientOutputs.md
topics/security/BusinessRiskIntelligentDetection(业务风险检测).md
topics/security/C API.md
topics/security/CertManager.md
topics/security/CertManagerType.md
topics/security/Crypto Architecture Kit(加解密算法框架服务).md
topics/security/CryptoArchitectureKit.md
topics/security/CryptoAsymCipherApi.md
topics/security/CryptoAsymKeyApi.md
topics/security/CryptoCommonApi.md
topics/security/CryptoDigestApi.md
topics/security/CryptoKdfApi.md
topics/security/CryptoKeyAgreementApi.md
topics/security/CryptoMacApi.md
topics/security/CryptoRandApi.md
topics/security/CryptoSignatureApi.md
topics/security/CryptoSymCipherApi.md
topics/security/CryptoSymKeyApi.md
topics/security/Crypto_DataBlob.md
topics/security/Data Protection Kit(数据保护服务).md
topics/security/Device Certificate Kit(设备证书服务).md
topics/security/Device Security Kit(设备安全服务).md
topics/security/DeviceSecurityMode.md
topics/security/DeviceVerify(应用设备状态检测).md
topics/security/DlpAntiPeep(防窥保护).md
topics/security/DlpPermissionApi.md
topics/security/Enterprise Data Guard Kit(企业数据保护服务).md
topics/security/FIDO.md
topics/security/FIDO2_AttestationFormatsArray.md
topics/security/FIDO2_AuthenticatorAttestationResponse.md
topics/security/FIDO2_AuthenticatorMetadata.md
topics/security/FIDO2_AuthenticatorMetadataArray.md
topics/security/FIDO2_AuthenticatorResponse.md
topics/security/FIDO2_AuthenticatorSelectionCriteria.md
topics/security/FIDO2_AuthenticatorTransportArray.md
topics/security/FIDO2_Capability.md
topics/security/FIDO2_CapabilityArray.md
topics/security/FIDO2_CredentialCreationOptionArray.md
topics/security/FIDO2_CredentialCreationOptions.md
topics/security/FIDO2_CredentialRequestOptions.md
topics/security/FIDO2_PublicKeyAssertionCredential.md
topics/security/FIDO2_PublicKeyAttestationCredential.md
topics/security/FIDO2_PublicKeyCredentialCreationOptions.md
topics/security/FIDO2_PublicKeyCredentialDescriptor.md
topics/security/FIDO2_PublicKeyCredentialDescriptorArray.md
topics/security/FIDO2_PublicKeyCredentialHintArray.md
topics/security/FIDO2_PublicKeyCredentialParameters.md
topics/security/FIDO2_PublicKeyCredentialRequestOptions.md
topics/security/FIDO2_PublicKeyCredentialRpEntity.md
topics/security/FIDO2_PublicKeyCredentialUserEntity.md
topics/security/FIDO2_TokenBinding.md
topics/security/HuksExternalCryptoApi.md
topics/security/HuksExternalCryptoTypeApi.md
topics/security/HuksKeyApi.md
topics/security/HuksParamSetApi.md
topics/security/HuksTypeApi.md
topics/security/OH_CM_Blob.md
topics/security/OH_CM_Credential.md
topics/security/OH_CM_CredentialDetailList.md
topics/security/OH_CM_UkeyInfo.md
topics/security/OH_CryptoAsymCipher.md
topics/security/OH_CryptoAsymKeyGenerator.md
topics/security/OH_CryptoAsymKeyGeneratorWithSpec.md
topics/security/OH_CryptoAsymKeySpec.md
topics/security/OH_CryptoDigest.md
topics/security/OH_CryptoEcPoint.md
topics/security/OH_CryptoEccSignatureSpec.md
topics/security/OH_CryptoKdf.md
topics/security/OH_CryptoKdfParams.md
topics/security/OH_CryptoKeyAgreement.md
topics/security/OH_CryptoKeyPair.md
topics/security/OH_CryptoMac.md
topics/security/OH_CryptoPrivKey.md
topics/security/OH_CryptoPrivKeyEncodingParams.md
topics/security/OH_CryptoPubKey.md
topics/security/OH_CryptoRand.md
topics/security/OH_CryptoSign.md
topics/security/OH_CryptoSm2CiphertextSpec.md
topics/security/OH_CryptoSymCipher.md
topics/security/OH_CryptoSymCipherParams.md
topics/security/OH_CryptoSymKey.md
topics/security/OH_CryptoSymKeyGenerator.md
topics/security/OH_CryptoVerify.md
topics/security/OH_Huks_Blob.md
topics/security/OH_Huks_CertChain.md
topics/security/OH_Huks_ExternalCryptoParam.md
topics/security/OH_Huks_ExternalCryptoParamSet.md
topics/security/OH_Huks_KeyAliasSet.md
topics/security/OH_Huks_KeyInfo.md
topics/security/OH_Huks_KeyMaterial25519.md
topics/security/OH_Huks_KeyMaterialDh.md
topics/security/OH_Huks_KeyMaterialDsa.md
topics/security/OH_Huks_KeyMaterialEcc.md
topics/security/OH_Huks_KeyMaterialRsa.md
topics/security/OH_Huks_Param.md
topics/security/OH_Huks_ParamSet.md
topics/security/OH_Huks_PubKeyInfo.md
topics/security/OH_Huks_Result.md
topics/security/Online Authentication Kit(在线认证服务).md
topics/security/REST API.md
topics/security/SOTER.md
topics/security/SafetyDetect(安全检测).md
topics/security/SecurityAntivirus.md
topics/security/SecurityAntivirus_Antivirus.md
topics/security/SecurityAudit.md
topics/security/SecurityAudit_Event.md
topics/security/SecurityAudit_Filter.md
topics/security/SecurityAudit(安全审计).md
topics/security/SuperPrivacyMode(超级隐私模式).md
topics/security/TrustedAppService(可信应用服务).md
topics/security/TrustedAuthentication(数字盾服务).md
topics/security/Uint8Buff.md
topics/security/Universal Keystore Kit(密钥管理服务).md
topics/security/User Authentication Kit(用户认证服务).md
topics/security/asset_api.h.md
topics/security/asset_type.h.md
topics/security/cm_native_api.h.md
topics/security/cm_native_type.h.md
topics/security/crypto_architecture_kit.h.md
topics/security/crypto_asym_cipher.h.md
topics/security/crypto_asym_key.h.md
topics/security/crypto_common.h.md
topics/security/crypto_digest.h.md
topics/security/crypto_kdf.h.md
topics/security/crypto_key_agreement.h.md
topics/security/crypto_mac.h.md
topics/security/crypto_rand.h.md
topics/security/crypto_signature.h.md
topics/security/crypto_sym_cipher.h.md
topics/security/crypto_sym_key.h.md
topics/security/device_security_mode.h.md
topics/security/dlp_permission_api.h.md
topics/security/fido2_api.h.md
topics/security/fileGuard (文件分级管控).md
topics/security/native_huks_api.h.md
topics/security/native_huks_external_crypto_api.h.md
topics/security/native_huks_external_crypto_type.h.md
topics/security/native_huks_param.h.md
topics/security/native_huks_type.h.md
topics/security/recoveryKey(企业恢复密钥).md
topics/security/security_antivirus.h.md
topics/security/security_audit.h.md
topics/security/删除设备标记状态.md
topics/security/头文件.md
topics/security/安全.md
topics/security/已停止维护的接口.md
topics/security/更新设备标记状态.md
topics/security/查询设备标记状态.md
topics/security/模块.md
topics/security/通行密钥.md
topics/security/验证deviceToken.md
types/classes/Class (AVCastPickerHelper).md
types/classes/Class (AdsBlockManager).md
types/classes/Class (Array).md
types/classes/Class (ArrayBuffer).md
types/classes/Class (BackForwardCacheOptions).md
types/classes/Class (BackForwardCacheSupportedFeatures).md
types/classes/Class (BitVector).md
types/classes/Class (Brush).md
types/classes/Class (Canvas).md
types/classes/Class (ClientAuthenticationHandler).md
types/classes/Class (ColorFilter).md
types/classes/Class (ComponentSnapshot).md
types/classes/Class (ComponentUtils).md
types/classes/Class (ConsoleMessage).md
types/classes/Class (ContextMenuController).md
types/classes/Class (ControllerHandler).md
types/classes/Class (CursorController).md
types/classes/Class (DataResubmissionHandler).md
types/classes/Class (DragController).md
types/classes/Class (DynamicSyncScene).md
types/classes/Class (EventResult).md
types/classes/Class (FileSelectorParam).md
types/classes/Class (FileSelectorResult).md
types/classes/Class (Float32Array).md
types/classes/Class (FocusController).md
types/classes/Class (Font).md
types/classes/Class (FrameCallback).md
types/classes/Class (FullScreenExitHandler).md
types/classes/Class (GeolocationPermissions).md
types/classes/Class (HttpAuthHandler).md
types/classes/Class (ImageFilter).md
types/classes/Class (Int16Array).md
types/classes/Class (Int32Array).md
types/classes/Class (Int8Array).md
types/classes/Class (JsGeolocation).md
types/classes/Class (JsMessageExt).md
types/classes/Class (JsResult).md
types/classes/Class (Lattice).md
types/classes/Class (LiteResultSet).md
types/classes/Class (Magnifier).md
types/classes/Class (Map).md
types/classes/Class (MarqueeDynamicSyncScene).md
types/classes/Class (MaskFilter).md
types/classes/Class (Matrix).md
types/classes/Class (MeasureUtils).md
types/classes/Class (MediaAlbumChangeRequest).md
types/classes/Class (MediaAssetChangeRequest).md
types/classes/Class (MediaAssetManager).md
types/classes/Class (MediaQuery).md
types/classes/Class (MediaSourceInfo).md
types/classes/Class (NativeMediaPlayerSurfaceInfo).md
types/classes/Class (OverlayManager).md
types/classes/Class (Path).md
types/classes/Class (PathEffect).md
types/classes/Class (PathIterator).md
types/classes/Class (PdfData).md
types/classes/Class (Pen).md
types/classes/Class (PermissionRequest).md
types/classes/Class (PhotoViewPicker).md
types/classes/Class (PrefetchOptions).md
types/classes/Class (PromptAction).md
types/classes/Class (ProxyConfig).md
types/classes/Class (ProxyController).md
types/classes/Class (ProxyRule).md
types/classes/Class (RdbPredicates).md
types/classes/Class (RectUtils).md
types/classes/Class (Region).md
types/classes/Class (ResolvedUIContext).md
types/classes/Class (RoundRect).md
types/classes/Class (Router).md
types/classes/Class (SamplingOptions).md
types/classes/Class (ScreenCaptureHandler).md
types/classes/Class (Set).md
types/classes/Class (ShaderEffect).md
types/classes/Class (ShadowLayer).md
types/classes/Class (SslErrorHandler).md
types/classes/Class (SwiperDynamicSyncScene).md
types/classes/Class (TextBlob).md
types/classes/Class (TextMenuController).md
types/classes/Class (Tool).md
types/classes/Class (Typeface).md
types/classes/Class (TypefaceArguments).md
types/classes/Class (UIContext).md
types/classes/Class (UIInspector).md
types/classes/Class (UIObserver).md
types/classes/Class (Uint16Array).md
types/classes/Class (Uint32Array).md
types/classes/Class (Uint8Array).md
types/classes/Class (Uint8ClampedArray).md
types/classes/Class (VerifyPinHandler).md
types/classes/Class (WebContextMenuParam).md
types/classes/Class (WebContextMenuResult).md
types/classes/Class (WebController).md
types/classes/Class (WebCookie).md
types/classes/Class (WebCookieManager).md
types/classes/Class (WebDataBase).md
types/classes/Class (WebDownloadDelegate).md
types/classes/Class (WebDownloadItem).md
types/classes/Class (WebDownloadManager).md
types/classes/Class (WebHttpBodyStream).md
types/classes/Class (WebKeyboardController).md
types/classes/Class (WebMessageExt).md
types/classes/Class (WebResourceError).md
types/classes/Class (WebResourceHandler).md
types/classes/Class (WebResourceRequest).md
types/classes/Class (WebResourceResponse).md
types/classes/Class (WebSchemeHandler).md
types/classes/Class (WebSchemeHandlerRequest).md
types/classes/Class (WebSchemeHandlerResponse).md
types/classes/Class (WebStorage).md
types/classes/Class (WebviewController).md
types/classes/Classes (其他).md
types/classes/JSVM_DefineClassOptions.md
types/enums/Enums.md
types/interfaces/IAP Kit(应用内支付服务).md
types/interfaces/IAP.md
types/interfaces/ICU4C.md
types/interfaces/IFAA.md
types/interfaces/IME Kit(输入法开发服务).md
types/interfaces/IPC Kit(进程间通信服务).md
types/interfaces/IPCKit.md
types/interfaces/Image Kit(图片处理服务).md
types/interfaces/Image.md
types/interfaces/ImageAnimator.md
types/interfaces/ImageBitmap.md
types/interfaces/ImageBitmap对象.md
types/interfaces/ImageData.md
types/interfaces/ImageData对象.md
types/interfaces/ImageEffect.md
types/interfaces/ImageEffect_Any.md
types/interfaces/ImageEffect_DataValue.md
types/interfaces/ImageEffect_FilterDelegate.md
types/interfaces/ImageEffect_FilterNames.md
types/interfaces/ImageEffect_Region.md
types/interfaces/ImageEffect_Size.md
types/interfaces/ImageNative_.md
types/interfaces/ImageOverlay.md
types/interfaces/ImagePacker_Native_.md
types/interfaces/ImagePacker_Opts_.md
types/interfaces/ImageProcessing.md
types/interfaces/ImageProcessing_ColorSpaceInfo.md
types/interfaces/ImageReceiverNative_.md
types/interfaces/ImageSourceNative_.md
types/interfaces/ImageSpan.md
types/interfaces/Image_NativeModule.md
types/interfaces/Image_PositionArea.md
types/interfaces/Image_Region.md
types/interfaces/Image_Scale.md
types/interfaces/Image_Size.md
types/interfaces/Image_String.md
types/interfaces/Image对象.md
types/interfaces/Indicator.md
types/interfaces/IndoorMapInfo.md
types/interfaces/Init.md
types/interfaces/InitialTimeZoneRule.md
types/interfaces/Input Kit(多模输入服务).md
types/interfaces/InputMethod.md
types/interfaces/InputMethod_AttachOptions.md
types/interfaces/InputMethod_CursorInfo.md
types/interfaces/InputMethod_InputMethodProxy.md
types/interfaces/InputMethod_PrivateCommand.md
types/interfaces/InputMethod_TextAvoidInfo.md
types/interfaces/InputMethod_TextConfig.md
types/interfaces/InputMethod_TextEditorProxy.md
types/interfaces/Input_AxisEvent.md
types/interfaces/Input_CursorConfig.md
types/interfaces/Input_CursorInfo.md
types/interfaces/Input_CustomCursor.md
types/interfaces/Input_DeviceInfo.md
types/interfaces/Input_DeviceListener.md
types/interfaces/Input_Hotkey.md
types/interfaces/Input_InterceptorEventCallback.md
types/interfaces/Input_InterceptorOptions.md
types/interfaces/Input_KeyEvent.md
types/interfaces/Input_KeyState.md
types/interfaces/Input_MouseEvent.md
types/interfaces/Input_TouchEvent.md
types/interfaces/InsightIntentUIExtensionAbility (意图调用UI扩展能力).md
types/interfaces/InstantShapeGenerator(一笔成形功能).md
types/interfaces/Intents Kit(意图框架服务).md
types/interfaces/Interface (AVCastController).md
types/interfaces/Interface (AVImageGenerator).md
types/interfaces/Interface (AVMetadataExtractor).md
types/interfaces/Interface (AVPlayer).md
types/interfaces/Interface (AVRecorder).md
types/interfaces/Interface (AVScreenCaptureRecorder).md
types/interfaces/Interface (AVSession).md
types/interfaces/Interface (AVSessionController).md
types/interfaces/Interface (AVTranscoder).md
types/interfaces/Interface (AbsAlbum).md
types/interfaces/Interface (Album).md
types/interfaces/Interface (AtomicServiceBar).md
types/interfaces/Interface (AudioCapturer).md
types/interfaces/Interface (AudioLoopback).md
types/interfaces/Interface (AudioManager).md
types/interfaces/Interface (AudioRenderer).md
types/interfaces/Interface (AudioRoutingManager).md
types/interfaces/Interface (AudioSessionManager).md
types/interfaces/Interface (AudioSpatializationManager).md
types/interfaces/Interface (AudioStreamManager).md
types/interfaces/Interface (AudioVolumeGroupManager).md
types/interfaces/Interface (AudioVolumeManager).md
types/interfaces/Interface (AutoDeviceSwitch).md
types/interfaces/Interface (AutoDeviceSwitchQuery).md
types/interfaces/Interface (AutoExposure).md
types/interfaces/Interface (AutoExposureQuery).md
types/interfaces/Interface (AuxiliaryPicture).md
types/interfaces/Interface (BackForwardList).md
types/interfaces/Interface (CameraInput).md
types/interfaces/Interface (CameraManager).md
types/interfaces/Interface (CameraOutput).md
types/interfaces/Interface (CapturePhoto).md
types/interfaces/Interface (ColorManagement).md
types/interfaces/Interface (ColorManagementQuery).md
types/interfaces/Interface (ConcatArray).md
types/interfaces/Interface (ControlCenter).md
types/interfaces/Interface (ControlCenterQuery).md
types/interfaces/Interface (FetchResult).md
types/interfaces/Interface (Flash).md
types/interfaces/Interface (FlashQuery).md
types/interfaces/Interface (Focus).md
types/interfaces/Interface (FocusQuery).md
types/interfaces/Interface (Image).md
types/interfaces/Interface (ImageCreator).md
types/interfaces/Interface (ImagePacker).md
types/interfaces/Interface (ImageReceiver).md
types/interfaces/Interface (ImageSource).md
types/interfaces/Interface (Macro).md
types/interfaces/Interface (MacroQuery).md
types/interfaces/Interface (MediaAssetDataHandler).md
types/interfaces/Interface (MediaAssetProgressHandler).md
types/interfaces/Interface (MediaKeySession).md
types/interfaces/Interface (MediaKeySystem).md
types/interfaces/Interface (MediaSource).md
types/interfaces/Interface (MediaSourceLoadingRequest).md
types/interfaces/Interface (Metadata).md
types/interfaces/Interface (MetadataOutput).md
types/interfaces/Interface (MovingPhoto).md
types/interfaces/Interface (NativeMediaPlayerBridge).md
types/interfaces/Interface (NativeMediaPlayerHandler).md
types/interfaces/Interface (Photo).md
types/interfaces/Interface (PhotoAccessHelper).md
types/interfaces/Interface (PhotoAsset).md
types/interfaces/Interface (PhotoOutput).md
types/interfaces/Interface (PhotoSession).md
types/interfaces/Interface (Picture).md
types/interfaces/Interface (PixelMap).md
types/interfaces/Interface (PreviewOutput).md
types/interfaces/Interface (QuickImageDataHandler).md
types/interfaces/Interface (RdbStore).md
types/interfaces/Interface (ResultSet).md
types/interfaces/Interface (SecureSession).md
types/interfaces/Interface (Session).md
types/interfaces/Interface (Stabilization).md
types/interfaces/Interface (StabilizationQuery).md
types/interfaces/Interface (Transaction).md
types/interfaces/Interface (VideoOutput).md
types/interfaces/Interface (VideoSession).md
types/interfaces/Interface (WebMessagePort).md
types/interfaces/Interface (WhiteBalance).md
types/interfaces/Interface (WhiteBalanceQuery).md
types/interfaces/Interface (Window).md
types/interfaces/Interface (WindowStage).md
types/interfaces/Interface (Zoom).md
types/interfaces/Interface (ZoomQuery).md
types/interfaces/Interfaces (其他).md
types/interfaces/Interfaces(其他).md
types/interfaces/InterstitialDialogAction.md
types/interfaces/UsbDdkInterface.md
types/interfaces/UsbDdkInterfaceDescriptor.md
types/interfaces/UsbInterfaceDescriptor.md
types/interfaces/废弃的Interface (AudioPlayer, deprecated).md
types/interfaces/废弃的Interface (AudioRecorder, deprecated).md
types/interfaces/废弃的Interface (CaptureSession, deprecated).md
types/interfaces/废弃的Interface (VideoPlayer, deprecated).md
types/structs/JSVM_CallbackStruct.md
types/structs/JSVM_CallbackStruct_.md
types/structs/JSVM_PropertyHandlerConfigurationStruct.md
types/structs/JSVM_PropertyHandlerConfigurationStruct_.md
types/structs/OH_AVMetadataBuilderStruct.md
types/structs/OH_AVMetadataStruct.md
types/structs/OH_AudioCapturerStruct.md
types/structs/OH_AudioCapturer_Callbacks_Struct.md
types/structs/OH_AudioNodeBuilderStruct.md
types/structs/OH_AudioNodeStruct.md
types/structs/OH_AudioRendererStruct.md
types/structs/OH_AudioRenderer_Callbacks_Struct.md
types/structs/OH_AudioStreamBuilderStruct.md
types/structs/OH_AudioSuiteEngineStruct.md
types/structs/OH_AudioSuitePipelineStruct.md
types/structs/OH_Drawing_FontStyleStruct.md
types/structs/头文件和结构体.md
types/structs/结构体.md
SKILL.md
---
name: harmony-next
description: Use for HarmonyOS NEXT development help and local DevEco automation. Covers ArkTS/ArkUI/NDK API lookup, offline guide navigation, DevEco Studio and HarmonyOS Emulator tasks, hdc/uitest/aa/bm/hilog/hidumper diagnostics, ArkWeb/WebView DevTools and CDP evidence, and private DevEco interfaces such as CodeGenie, MCP, LanceDB, devecostudio://, ArkUI Inspector, Previewer, Profiler, Doctor, and UxTestService offline UI/UX audits.
metadata:
version: "1.3.37"
---
# HarmonyOS NEXT Agent Guide
Use this skill to answer HarmonyOS NEXT questions with the bundled offline references. Keep context small: route the request first, then open only the specific Markdown files needed for the answer or action.
Paths like `references/...` and `scripts/...` are relative to this skill directory: the directory that contains this `SKILL.md`. Resolve that directory once as `HARMONY_NEXT_SKILL_DIR`. Do not assume `harmony-next/` exists at the current repository root. Official scan locations include `$REPO_ROOT/.agents/skills/harmony-next`, `$HOME/.agents/skills/harmony-next`, and `/etc/codex/skills/harmony-next`.
```bash
# Directory containing this SKILL.md (the file you loaded).
HARMONY_NEXT_SKILL_DIR="<skill-dir>"
```
Use `$HARMONY_NEXT_SKILL_DIR` from any working directory, including a normal application repository root. Bundled playbooks must use this variable for executable paths; treat any hard-coded repository-root skill prefix in a bundled playbook as a portability bug.
## Version
Current local skill version: `v1.3.37`.
Reference snapshot: bundled `references/` are an offline HarmonyOS API 12-23 snapshot, not live web docs. HarmonyOS SDK 26.0.0 (API 26.0.0) reached Release on 2026-08-29; API 26 declaration pages are bundled under `references/JsEtsAPIReference/api26/`; full guides and examples remain pending.
For "latest", "current", new API, or online-doc parity questions, compare this local version with GitHub Releases or nightly, and verify API behavior against Huawei online docs when precision matters.
API 26 release tracking and adaptation notes: `references/harmonyos-releases/api-26-release.md`.
Install/update entrypoints:
- Vercel Labs skills CLI: `npx skills add linhay/harmony-next.skills --skill harmony-next`; add `-a claude-code -g -y --copy` for a non-interactive global Claude Code install, or `-a codex -g -y --copy` for Codex.
- Gemini CLI: `gemini skills install https://github.com/linhay/harmony-next.skills --path harmony-next --scope user`
- Claude Code: use `npx skills add linhay/harmony-next.skills --skill harmony-next -a claude-code -g -y --copy`; Claude.ai can still use the release `harmony-next.skill.zip` upload flow.
- Codex: use `npx skills add linhay/harmony-next.skills --skill harmony-next -a codex -g -y --copy`, or put/symlink `harmony-next/` into an official Codex scan location such as `$REPO_ROOT/.agents/skills/harmony-next`, `$HOME/.agents/skills/harmony-next`, or `/etc/codex/skills/harmony-next`; for reusable installable distribution, package it as a Codex plugin.
## Routing
1. **Classify the user request**
- API, component, error, or code example: use `KITS.md`, `TASK_MAP.md`, and `INDEX.md`; do not read the DevEco playbooks.
- Minimal project fixture, Empty Ability scaffold, HDC/uitest smoke app, or copyable HarmonyOS test project: use `references/quickStart/ets/minimal-project-scaffold.md` and `references/templates/empty-ability-app/`.
- DevEco Studio IDE, plugins, local services, CodeGenie, MCP, LanceDB, `devecostudio://`, UxTestService, or offline UI/UX audit: read the IDE playbook.
- HarmonyOS Command Line Tools download, archive install, PATH setup, or `codelinter -v` validation: read `references/ideGuides/独立命令行工具配置手册.md` and use `scripts/commandline_tools_manager.py`.
- HarmonyOS Emulator, HVD, hdc, uitest, aa, bm, hilog, or hidumper automation: read the Emulator playbook.
- ArkWeb/WebView DevTools forwarding, CDP `Runtime.evaluate`, or H5 bridge field-arrival proof: read `references/ideGuides/ArkWeb WebView CDP调试与字段到达证明.md`.
- Unknown domain: start with `references/TASK_MAP.md`, then refine through `references/INDEX.md`.
2. **Choose the smallest index**
- Kit 导航:`references/KITS.md`
- 任务导向:`references/TASK_MAP.md`
3. **Find the target file**
- 全库路径清单:`references/INDEX.md`
- JS/ETS API 分桶清单:`references/JsEtsAPIReference/INDEX.md`
4. **Open only target references**
`references/JsEtsAPIReference/` 目前以 `modules/`、`topics/`、`types/`、`errors/`、`guides/` 为主。
- `guides/` contains offline guide pages that replace common official online guide links.
## Lookup Commands
After resolving `HARMONY_NEXT_SKILL_DIR` from this `SKILL.md`:
- 先按关键词命中路径:`rg -n "UIAbility|AbilityStage|Want" "$HARMONY_NEXT_SKILL_DIR/references/INDEX.md" | head`
- 查某个 `@ohos.*` 模块:`rg -n "@ohos\\.app\\.ability\\.|@ohos\\.ability\\." "$HARMONY_NEXT_SKILL_DIR/references/INDEX.md" | rg "JsEtsAPIReference/" | head`
- 查 NDK/C API 头文件:`rg -n "JsEtsAPIReference/topics/.*/.*\\.h\\.md$" "$HARMONY_NEXT_SKILL_DIR/references/INDEX.md" | rg "(napi|arkui|window|ability)" | head`
## Tooling Script Skills
Use these script-backed skill entries before hand-writing DevEco setup commands. They are intentionally small wrappers around unstable local tooling and should return structured status when the environment is missing.
| User intent | Script skill | Agent first command | User handoff |
| --- | --- | --- | --- |
| Download, install, configure, or validate HarmonyOS Command Line Tools | `commandline_tools_manager.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/commandline_tools_manager.py" doctor --tools-root <dir> --json` | If the user gives a Huawei download center page URL, return the script's blocked result and ask the user to log in, copy the direct archive URL, or provide a local archive. |
| List, clone, delete, diagnose, or launch local DevEco HVD instances | `hvd_manager.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/hvd_manager.py" doctor --json` | If HVD root, Emulator, SDK/image root, or trace startup data is missing, report the `issues`, `recommendations`, and `missingConfig` fields and ask the user to pass `--root`, `--emulator`, `--sdk-root` / `--image-root`, or matching env vars. |
| Collect bounded HDC device evidence or diagnose WebView DevTools forwarding | `device_evidence_bundle.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/device_evidence_bundle.py" doctor --deveco-app <DevEco-Studio.app> --json` | Use `capture ... --artifact-dir <dir>` only when raw local screenshots, layout trees, app state, and bounded logs may be stored locally. Use `webview-devtools ... --artifact-dir <dir>` for socket/fport/HTTP discovery classification. |
| Perform one bounded UI action with before/after evidence | `device_ui_action.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/device_ui_action.py" tap --deveco-app <DevEco-Studio.app> --target <target> --artifact-dir .hvigor/outputs/<run> --text "<visible-text>" --json` | Require exactly one target selector or raw device coordinate. Treat returned screenshot dimensions as the coordinate space; never reuse scaled preview coordinates. |
| Capture a running HarmonyOS page and run an offline UI/UX audit report | `ux_audit_pipeline.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/ux_audit_pipeline.py" doctor --deveco-app <DevEco-Studio.app> --python <python-with-ux-deps> --json` | Use `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/ux_audit_pipeline.py" capture-audit --deveco-app <DevEco-Studio.app> --python <python-with-ux-deps> --target <target> --artifact-dir .hvigor/outputs/<run> --json` for the one-shot path. If Python image-processing modules are missing, report `missingConfig=["uxPythonDependencies"]` instead of treating UxTestService as broken. |
| Convert offline DevEco Profiler trace files into SQLite evidence summaries | `profiler_trace_audit.py` | `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/profiler_trace_audit.py" doctor --deveco-app <DevEco-Studio.app> --json` | If `trace_streamer` or the input trace is missing, report the machine-readable `blocked` payload. Use `audit --input <trace> --output-dir .hvigor/outputs/<run> --json` only for existing `.ftrace` / `.htrace` / bytrace / rawtrace artifacts. |
Boundaries:
- `commandline_tools_manager.py` may download only a direct archive URL; a download center page URL is a login-gated page, not an archive.
- `hvd_manager.py launch-preflight` prints a guarded Emulator command plan when an external trace helper is already ready.
- `hvd_manager.py launch` currently creates a startup trace socket, detaches Emulator and a trace holder, starts Emulator with `-t <trace-name>`, and waits for HDC/boot/stability unless `--no-wait-target` is passed.
- `device_evidence_bundle.py` is evidence capture, not app lifecycle control: it may save real UI/layout/log artifacts to an explicit artifact directory, but it does not install, uninstall, start, stop, or mutate apps.
- `device_evidence_bundle.py webview-devtools` may create one bounded `fport`; by default it removes only the forward created by that run. It emits socket, stale-forward, HTTP reset/refusal/timeout, and invalid-JSON failure codes.
- `device_ui_action.py` performs exactly one `uitest uiInput` tap, swipe, or key event between before/after layout, screenshot, and bounded log capture. Coordinates must be raw device pixels from layout bounds or explicit device-space input.
- `ux_audit_pipeline.py` composes `device_evidence_bundle.py` with DevEco `UxTestService`: it copies `tools/UxTestService` into the artifact directory before import so the DevEco `.app` bundle is not modified.
- If either wrapper returns `blocked`, agents should try official HarmonyOS CLI evidence commands before giving up: `hdc list targets -v`, `hdc -t <target> shell uitest dumpLayout ...`, `screenCap`, `file recv`, `bm dump`, `aa dump`, and bounded `hilog`.
- If a wrapper is blocked, misleading, or missing a useful workflow, use the scenario-specific GitHub issue form from the script's `feedback` JSON field or `ISSUE_GUIDE.md`; when GitHub access and enough context are available, create or comment on the issue directly with `gh`, preserving structured fields and following the redaction rules.
- `profiler_trace_audit.py` is offline only: it runs DevEco `trace_streamer`, writes SQLite/JSON artifacts outside the DevEco `.app` bundle, and does not launch DevEco Studio, connect devices, or claim GUI Profiler headless import.
- Lifecycle direction: prefer an attached terminal-scoped launch mode for future CLI work, where the foreground runner owns the trace socket, waits for readiness, and calls `Emulator -stop <hvd-name> -path <hvd-root>` when the terminal session ends; keep detached mode only as an explicit compatibility path.
- `hvd_manager.py download-image` reports HVD image download as machine-readable `blocked`; current verified path is DevEco Studio SDK Manager UI, not a stable non-UI CLI.
- For cross-machine support, prefer `doctor --json` output over hard-coded macOS paths in answers and docs.
API 26 declaration snapshot sync: run `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/sync_api26_snapshot.py" --deveco-app <DevEco-Studio.app>`, then rebuild indexes with `python3 "$HARMONY_NEXT_SKILL_DIR/scripts/reference_compat.py" generate`.
## Minimal Empty Ability Scaffold
Use when an agent needs a copyable HarmonyOS NEXT smoke fixture without opening DevEco Studio:
- Scaffold guide: `references/quickStart/ets/minimal-project-scaffold.md`
- Copyable template: `references/templates/empty-ability-app/`
- Defaults: bundleName `com.example.emptyability`, module `entry`, ability `EntryAbility`, Compatible SDK `5.0.0(12)`, target SDK `5.0.0(12)`.
- Route/component split: `pages/Index.ets` is only the `@Entry` route page and mounts `SmokeCounter()`; `components/SmokeCounter.ets` owns the smoke UI state and node IDs.
- Validation entrypoints: `ohpm install`, `hvigorw --mode module -p module=entry@default assembleHap`, HDC install/start, `uitest dumpLayout`, and `uitest screenCap`.
- SDK override validation: for a target SDK such as HarmonyOS 6.0.2 / API 22, set the copied fixture's `compatibleSdkVersion` and `targetSdkVersion` to `6.0.2(22)` and set `DEVECO_SDK_HOME` to the SDK root, for example `DEVECO_SDK_HOME=/Applications/DevEco-Studio.app/Contents/sdk`, not `sdk/default`.
- API 22 schema compatibility depends on app and Ability icons: keep `AppScope/resources/base/media/app_icon.png`, app `icon`, Ability `icon`, and `startWindowIcon` in the template.
- Stable smoke UI signals: `Harmony Smoke Ready`, `smoke-title`, `smoke-counter`, `smoke-increment`.
- Interactive smoke: after launch, use `uitest uiInput click` on the `smoke-increment` bounds and verify `tapCount=1` / `Harmony Smoke Tapped` from a fresh `dumpLayout`.
## Command Line Tools Setup
Use when the user asks to download or configure HarmonyOS Command Line Tools without DevEco Studio.
- Official boundary: Huawei's "获取命令行工具" page points agents to the Command Line Tools download center, says HarmonyOS SDK is embedded in the package, and configures `${Command Line Tools解压路径}/command-line-tools/bin` in `PATH`.
- This skill provides `scripts/commandline_tools_manager.py` for a controlled local flow: `download --url <direct-archive-url>`, `install --archive <zip> --dest <dir> --profile auto`, `bootstrap --url <direct-archive-url> ...`, `configure --tools-root <dir> --profile auto`, and `doctor --tools-root <dir>`.
- The script requires a direct archive URL copied from Huawei's download center or a local archive path. If given the download center page URL, it returns machine-readable `blocked` instead of pretending to resolve the current package.
- Use `--sha256 <digest>` when Huawei's integrity value is available.
## DevEco Emulator Automation
Use when the user asks to start or inspect HarmonyOS Emulator without the IDE, operate the emulator from command line, diagnose hdc/uitest/aa/bm/hilog/hidumper automation, or debug simulator traffic capture with HTTP proxy tools such as Charles, mitmproxy, or Proxyman.
Only read this playbook for Emulator/HVD/hdc/uitest/aa/bm/hilog/hidumper intent. For ordinary ArkTS, ArkUI, API, component, or error-code lookup, stay in the API indexes.
Read `references/ideGuides/DevEco模拟器私有接口与AI自动化.md` before acting. Treat it as an agent playbook for private, version-sensitive behavior; verify the local DevEco/Emulator version before relying on paths, flags, output fields, or ports.
Default boundary:
- 优先使用只读探测:`Emulator -version`、`Emulator -list -details`、`hdc list targets -v`、`uitest dumpLayout -p /dev/null -a`。
- UI 操作优先走 `hdc -t <target> shell uitest uiInput`;do not use blind desktop-coordinate clicks.
- 用户问“模拟器本机沙盒/应用沙盒在哪里”时,先区分 HVD 本机目录与应用沙箱:HVD 默认在 `~/.Huawei/Emulator/deployed`;应用沙箱在模拟器系统内,优先用 `aa dump -l` 找前台 bundle,再用 `Context.filesDir/cacheDir/databaseDir` 或 `/data/app/el2/<USERID>/base/<bundleName>` 这类物理映射定位。`shell -b <bundleName> pwd` 可能只返回 debug_hap 工作目录,不能当数据沙箱路径。
- 直接 CLI 启动 Emulator 不能把 `Emulator -hvd ... -path ... -imageRoot ...` 当成完整命令;必须先通过已验证 helper 准备并持有 `-t <trace-name>` 对应的 trace pipe。缺少该前置条件时可能弹出“模拟器启动失败 / 请在DevEco Studio中登录华为账号,并从设备管理中启动模拟器”,应归类为不完整 CLI 启动路径,而不是先要求用户登录。
- 区分 `riskLevel` 与执行模式:用户默认拥有完整执行权限;skill 不做授权或确认拦截。`HARMONY_NEXT_AUTOMATION_POLICY`、`--policy` 和 `.harmony-next-policy.json` 只描述本次 run 的自动化模式、产物目录与脱敏契约。
- 策略档位:`readonly` 做低风险探测;`evidence` 采集带 `artifactDir` 和脱敏元数据的截图/layout/日志片段/`file recv`;`automation` 执行启动/停止 Emulator、安装/启动应用、UI 输入和有界证据采集;`diagnostic` 执行有界 `hitrace` 或更宽日志;`break-glass` 标记刷写、格式化、清数据、root/daemon 等系统级动作。
- 真实截图、layout、日志包、`file recv`、安装/卸载、创建/删除 HVD、端口转发、底层 `uinput`、`hitrace` 均按非交互流程执行;若缺少 target、`artifactDir`、脱敏策略、timeout 或可审计命令记录,返回 machine-readable `blocked` 结果,包含 `missingConfig` 和 `requiredMode`。
- 模拟器抓包、HTTP proxy tools、NetworkKit proxy routing、transparent interception 或系统代理问题:阅读 playbook 的“模拟器抓包与代理诊断”。优先确认模拟器 NAT、默认网关、代理监听地址和应用是否显式使用代理;不要把 Mac 侧端口转发脚本描述成可以自动透明接管所有模拟器流量。
- 多 target 时必须显式选择 `127.0.0.1:<port>`;只选择 `Connected`,忽略 `Offline`。
- 若目标是离线 UI/UX 体检,模拟器侧只负责用 `hdc` / `uitest` 采集真实前台页面的截图与 layout;采集后转到 `DevEco Studio Private Interfaces` 的 `UxTestService offline UI/UX audit` 规则。
- 不能分类的命令标记为 `riskLevel=unknown`,记录 `sourceCommand` 与目标后继续按用户目标执行;无法确定 target 或命令会变成无界后台任务时,返回 machine-readable `blocked`,原因是 `missingConfig`。
HVD manager command map:
| Command | Purpose | Important output |
| --- | --- | --- |
| `doctor --json` | Probe HVD root, Emulator, build SDK root, emulator image root, HDC, Emulator version, and local HVDs | `issues`, `recommendations`, `hvdRoot`, `emulator`, `sdkRoot`, `imageRoot`, `hdc` |
| `list --json` | List registered HVDs without exposing UUIDs | `name`, `device_type`, `api_version`, `hdc_port`, `image_sub_path`, `exists` |
| `launch-preflight --name <hvd> --image-root <dir> --trace-name <name> --trace-helper-ready-file <file> --json` | Validate trace helper readiness and image root without starting Emulator | `decision`, `missingConfig`, `emulatorCommand` |
| `launch --name <hvd> --image-root <dir> --trace-name <name> --json` | Current implementation: create trace socket, detach Emulator and trace holder, then wait for HDC, boot, and stability | `traceHolder`, `hdcWait`, `bootWait`, `stabilityWait`, `logPath` |
| `device_evidence_bundle.py doctor --deveco-app <DevEco-Studio.app> --json` | Locate `hdc` and summarize connected targets | `connectedTargets`, `missingConfig`, `issues` |
| `device_evidence_bundle.py capture --deveco-app <DevEco-Studio.app> --target <target> --artifact-dir .hvigor/outputs/<run> --json` | Collect boot state, `bm` / `aa` summaries, bounded `hilog`, `uitest dumpLayout`, screenshot, and command ledger | `summary`, `artifacts`, `layoutSummary`, `commandLedger` |
| `device_evidence_bundle.py webview-devtools --target <target> --artifact-dir .hvigor/outputs/<run> --json` | Enumerate WebView DevTools sockets, classify stale forwards, create one bounded fport, and probe `/json` plus `/json/version` | `sockets`, `staleForwards`, `fportStatus`, `httpProbe`, `failureCode` |
| `device_ui_action.py tap --target <target> --artifact-dir .hvigor/outputs/<run> --text "<text>" --json` | Resolve raw bounds, execute one tap, and capture before/after evidence | `coordinateSpace`, `action`, `before`, `after`, `commandLedger` |
| `ux_audit_pipeline.py doctor --deveco-app <DevEco-Studio.app> --python <python> --json` | Locate `hdc`, UxTestService, connected targets, and Python UX dependencies | `uxService`, `uxPython`, `connectedTargets`, `missingConfig` |
| `ux_audit_pipeline.py capture-audit --deveco-app <DevEco-Studio.app> --python <python> --target <target> --artifact-dir .hvigor/outputs/<run> --json` | Capture layout/screenshot/log evidence, infer foreground bundle, run UxTestService, and write a Markdown/JSON report | `captureSummary`, `auditSummary`, `report`, `resultCounts`, `bundleName` |
| `ux_audit_pipeline.py audit --evidence-summary <summary.json> --artifact-dir .hvigor/outputs/<run> --json` | Re-run UxTestService against an existing evidence bundle without touching the device | `checkParam`, `uxResult`, `uxSummary`, `report`, `resultCounts` |
| `launch --accept-license ... --json` | Explicitly answer yes to the first-run Huawei Emulator agreement prompt after the operator has reviewed it | `result=started` or `result=license-agreement-required` |
HVD launch rules:
- `--sdk-root` / `DEVECO_SDK_HOME` is the DevEco build SDK root. Do not treat it as the emulator image root.
- `--image-root` / `HARMONY_EMULATOR_IMAGE_ROOT` is the emulator image root. On macOS this is commonly `~/Library/Huawei/Sdk`.
- `launch` and `launch-preflight` validate `<image-root>/<imageSubPath>` from HVD `config.ini`; failures return `missingConfig=["imageRootSystemImage"]`.
- Current `launch` defaults: trace holder stays alive for 1800 seconds, and the post-boot stability check runs for 60 seconds.
- First-run Emulator license/agreement prompts are classified as `result="license-agreement-required"` with `missingConfig=["emulatorLicenseAgreement"]`; do not silently accept them. Use `--accept-license` only as an explicit opt-in after the agreement has been reviewed.
- HDC readiness failures are classified with `failureCode`: `emulator_kernel_panic`, `emulator_crashed`, `stale_hdc_target`, or `hdc_wait_timeout`. Image and trace preconditions use `image_root_missing`, `license_agreement_required`, and `trace_helper_unavailable`.
- If another process needs to install HAPs, deep link, screenshot, or dump layout after current detached `launch`, use the returned `hdcWait.target` and keep the trace holder alive long enough with `--trace-hold-seconds`.
- Attached lifecycle checklist: the runner must stay foreground, keep the trace socket in-process, trap `SIGINT` / `SIGTERM` / `SIGHUP`, call `Emulator -stop`, close the socket, remove only its own trace path, and verify `hdc list targets -v` no longer reports the selected target.
- Failure/timeout diagnostics should include `logPath`, `processExitCode`, `hvdRuntime`, `hdcSnapshot`, `hdcWait`, `bootWait`, and `stabilityWait` when present.
### ArkWeb / WebView CDP field-arrival evidence
Read `references/ideGuides/ArkWeb WebView CDP调试与字段到达证明.md` when the task is to prove that H5 code inside HarmonyOS ArkWeb received native bridge fields.
- Prefer an already available TritonKit Harmony runtime; fall back to HDC/WebView CDP only when the higher-level runtime is unavailable.
- Run `device_evidence_bundle.py webview-devtools` first. Multiple sockets require explicit `--remote-socket`; stale forwards are reported without global cleanup.
- Use the selected page `webSocketDebuggerUrl` with CDP `Runtime.evaluate`, `awaitPromise=true`, and `returnByValue=true`.
- Treat the small, redacted bridge callback JSON as primary proof. Do not block on `Page.captureScreenshot`.
- Use `aa dump`, layout, and screenshot only as supporting foreground evidence. Ignore lock-screen or non-target captures.
## DevEco Studio Private Interfaces
Use when the user asks about DevEco Studio internals or automation for CodeGenie, local AI/RAG/MCP, `devecostudio://`, Previewer, ArkUI Inspector, Profiler, Doctor, Diagnostic, FaultLog, UxTestService, plugin actions, tool windows, or services.
Only read this playbook for DevEco Studio IDE/private-interface intent. For ordinary HarmonyOS API lookup, do not load it.
Read `references/ideGuides/DevEco Studio IDE私有接口与AI自动化.md` before acting. Treat it as a safety-first playbook, not as a stable public API reference. Reconfirm the installed DevEco version and local paths before using any plugin ID, class name, URL scheme, port range, handler, cache path, or local service.
Default boundary:
- 只读允许:枚举 DevEco 包内文件、解析 `Info.plist` / `product-info.json` / 插件 XML、扫描 jar 类名和字符串、分析离线 `.htrace` / faultlog / stacktrace / `.arkli` / `.preview` 产物。
- 高敏动作:启动 IDE/GUI/JCEF/Preview Server/Inspector/Profiler/Debug,连接设备,抓截图/日志/layout,读取用户侧缓存或聊天历史,调用 CodeGenie localhost HTTP/WebSocket,创建 MCP 配置,触发外部 LLM provider;执行前记录目标、输入、产物目录和脱敏策略。
- 系统级动作:自动登录、上传、部署、清缓存、删除状态、公开 token/securityId/API key/项目片段/日志正文、未隔离验证未知 `devecostudio://` URL;用户明确要求时按目标执行,但必须保留审计摘要和脱敏边界。
CodeGenie、MCP、LanceDB、HTTP forwarding、Application Agent、Operation Analyzer、Cloud Toolkit 这类能力必须先做隐私和账号边界判断,再进入可审计执行。
### UxTestService offline UI/UX audit
Use when the user asks for offline UI/UX review, UI/UX audit, visual/layout checks, clickable hotspot checks, DevEco `UxTestService`, or a simulator-backed UI quality report.
Verified boundary:
- Prefer `scripts/ux_audit_pipeline.py` for repeatable runs. It supports `doctor`, `capture-audit`, and `audit`; pass `--python` or `HARMONY_UX_PYTHON` when the default Python lacks `cv2`, `numpy`, `PIL`, `requests`, `scipy`, `skimage`, `werkzeug`, or `opencc`.
- `capture-audit` is the validated one-shot workflow: it captures real device evidence with `hdc`, infers the non-system foreground bundle from the layout, copies UxTestService into an artifact-local runtime, writes `check_param.json`, runs `ux_detect.main(check_param=...)`, then emits `ux_result.json`, `ux_summary.json`, `report.md`, and `summary.json`.
- `audit --evidence-summary <summary.json>` is the validated offline re-run path for an existing `device_evidence_bundle.py` capture.
- On failure, prefer official CLI recovery before abandoning the audit: manually capture `layout.json` and `screen.png` with `hdc` / `uitest`, receive them locally with `hdc file recv`, then retry `ux_audit_pipeline.py audit --layout ... --screenshot ... --bundle ...`.
- For blocked results, confusing rule output, or unsupported DevEco/UxTestService versions, create or comment on a repository issue using the `feedback` section in `summary.json` / `report.md` when GitHub access and enough context are available; ask the user to file it only when auth/network is blocked or required details are missing. Never attach raw screenshots, raw layout JSON, full logs, or marked images without verified redaction.
- Treat DevEco `tools/UxTestService/ux_detect.py` as a private, version-sensitive engine. Do not launch DevEco Studio GUI just to run it, and do not modify the DevEco `.app` bundle.
- Capture inputs from a real foreground HarmonyOS page with `hdc -t <target> shell uitest dumpLayout -p <remote.json> -a` and `hdc -t <target> shell uitest screenCap -p <remote.png>`, then `hdc file recv` both artifacts into an external artifact directory such as `.hvigor/outputs/...`.
- Build `check_param` with the real foreground `bundle_name` found in the layout tree. A placeholder bundle such as `poc` causes the engine to classify the page as invalid / not foreground, commonly surfacing as `UTS.0300`.
- Use `extend_infos.language="zh"` for local runs. `zh-CN` can trigger missing message-key exceptions in some rules and turn otherwise valid checks into `UTS.0201`.
- Write logs, result JSON, screenshots, and marked images outside the DevEco app bundle. Some DevEco app bundle copies are not writable and should not be changed because that can disturb app signing.
- Start with the proven static subset: `7.1.1.2.1` basic layout subrules, `7.1.1.2.2` hole adaptation, `7.1.1.3.3` hotspot size, `7.1.1.4.4` icon size, `7.1.1.4.5` icon clarity, `7.1.2.1.1` navigation bar, `7.1.2.6.1` status bar, `7.2.2.1.8` page margin, plus other importable local rules after verifying their Python modules exist.
- Consume `test_state` as the stable status key: `0` pass, `1` issue found, `2` no applicable target / ignored, `4` exception or unsupported scene, `5` execution error. For failures, use `detail.Issues`, `detail.IssueComponents`, `detail.ErrorPath`, and `detail.CustomDrawPath` as developer-facing evidence.
- This is not a static config precheck. It analyzes actual screenshot + layout artifacts from a running page and can produce marked images for debugging.
Do not over-claim coverage:
- Rules listed in `config/rule_config_en.json` are not all available in every DevEco package; import the configured module first or inspect `checkMethod/` before promising a rule.
- Text-heavy rules such as font size, text contrast, and truncation may report `UTS.0306` with plain `uitest dumpLayout` input because ArkUI font/style metadata can be missing. Document that as "no applicable target in this capture mode", not as a product defect.
- Launcher, lockscreen, loading pages, high-white-rate pages, keyboard pages, Web/Flutter pages, or bundle/layout mismatches can be intentionally rejected by the engine.
- Negative-path validation should use isolated fixture artifacts or a dedicated test app, not mutated production files. A useful smoke is shrinking one copied clickable node's `bounds` / `origBounds` in a temporary layout JSON and verifying hotspot rule output includes `Issues`, `IssueComponents`, `ErrorPath`, and `CustomDrawPath`.
### Profiler trace offline evidence audit
Use when the user has an existing HarmonyOS Profiler / bytrace / htrace / ftrace / rawtrace artifact and wants offline performance evidence, long-span summaries, or a machine-readable report without opening DevEco Studio.
Verified boundary:
- Use `scripts/profiler_trace_audit.py`; start with `doctor --json` to locate DevEco `tools/profiler/dic_server/trace_streamer`.
- `audit --input <trace> --output-dir .hvigor/outputs/<run> --json` converts the trace to SQLite via `trace_streamer -e`, then writes `summary.json`, `tables.txt`, `meta.json`, `trace_range.json`, `counts.json`, `top_callstack.json`, threshold span JSON files, and `frame_slice.json`.
- Default thresholds are `16.67ms` and `33.34ms`; pass repeated `--threshold-ms` flags for stricter or looser budgets.
- Keep outputs outside any `.app` bundle. The script refuses output paths inside `.app` directories to avoid disturbing DevEco app signatures or bundled files.
- This is a verified CLI wrapper around `trace_streamer`, not a headless DevEco Profiler GUI import path. Do not claim timeline UI features, IDE session import, or device trace capture unless separately verified on a connected target.
- Prefer existing real traces for product diagnosis. Synthetic traces only prove the conversion/query loop and should be labeled as smoke evidence.
## Answering Constraints
- **不要全量读取**:先在 `INDEX.md` 命中路径,再打开对应 `.md`。
- **不确定就查文档**:API 签名、入参、返回值以 `references/` 内文本为准,不凭经验补全。
- **ArkUI 优先声明式**:示例优先使用 `@Entry` / `@Component` / `build()`(除非文档明确是 NDK 或系统服务)。
- **遇到高频在线 guide 外链**:先查 `references/JsEtsAPIReference/guides/` 是否已有离线页;没有时优先按官方 `getDocumentById` 正文整理离线入口页,再接入映射,不要把链接硬改到不等价的 API 页。
<!-- version: 1.3.37 -->