未验证 提交 2306804e 编写于 作者: O openharmony_ci 提交者: Gitee

!21723 翻译完成:21104 新增设备待机模块api文档+website+readme修改

Merge pull request !21723 from wusongqing/TR21104
......@@ -21,6 +21,7 @@
- [EnterpriseAdminExtensionAbility](enterprise-extensionAbility.md)
- [InputMethodExtensionAbility](inputmethodextentionability.md)
- [WindowExtensionAbility (for System Applications Only)](windowextensionability.md)
- [DriverExtensionAbility](driverextensionability.md)
- Service Widget Development in Stage Model
- [Service Widget Overview](service-widget-overview.md)
- Developing an ArkTS Widget
......@@ -43,6 +44,7 @@
- Widget Data Interaction
- [Widget Data Interaction Overview](arkts-ui-widget-interaction-overview.md)
- [Configuring a Widget to Update Periodically](arkts-ui-widget-update-by-time.md)
- [Updating Widget Content Through a Proxy](arkts-ui-widget-update-by-proxy.md)
- [Updating Local and Online Images in the Widget](arkts-ui-widget-image-update.md)
- [Updating Widget Content by State](arkts-ui-widget-update-by-status.md)
- [Updating Widget Content by Widget Host (for System Applications Only)](arkts-ui-widget-content-update.md)
......@@ -62,7 +64,6 @@
- [Cross-Device Migration (for System Applications Only)](hop-cross-device-migration.md)
- [Multi-device Collaboration (for System Applications Only)](hop-multi-device-collaboration.md)
- [Subscribing to System Environment Variable Changes](subscribe-system-environment-variable-changes.md)
- [Setting Atomic Services to Support Sharing](atomic-services-support-sharing.md)
- Process Model
- [Process Model Overview](process-model-stage.md)
- Common Events
......
# Setting Atomic Services to Support Sharing
## How to Develop
1. An application calls [UIAbility.onShare()](../reference/apis/js-apis-app-ability-uiAbility.md#onshare), a lifecycle callback provided by the UIAbility component, to set the data to share. In this lifecycle callback, **ohos.extra.param.key.contentTitle** indicates the title of the content to share in the sharing box, **ohos.extra.param.key.shareAbstract** provides an abstract description of the content, and **ohos.extra.param.key.shareUrl** indicates the online address of the service. You need to set these three items as objects, with the key set to **title**, **abstract**, and **url**, respectively.
```ts
import AbilityConstant from '@ohos.app.ability.AbilityConstant';
class MyUIAbility extends UIAbility {
onShare(wantParams) {
console.log('onShare');
wantParams['ohos.extra.param.key.contentTitle'] = {title: "OA"};
wantParams['ohos.extra.param.key.shareAbstract'] = {abstract: "communication for company employee"};
wantParams['ohos.extra.param.key.shareUrl'] = {url: "oa.example.com"};
}
}
```
2. A system dialog box calls [abilityManager.acquireShareData()](../reference/apis/js-apis-app-ability-abilityManager.md#acquiresharedata) to obtain data shared through atomic service sharing. Specifically, the system finds the UIAbility based on the mission ID and calls the **OnShare()** lifecycle of the UIAbility to obtain the shared data.
```ts
import abilityManager from '@ohos.app.ability.abilityManager';
try {
abilityManager.acquireShareData(1, (err, wantParam) => {
if (err) {
console.error(`acquireShareData fail, err: ${JSON.stringify(err)}`);
} else {
console.log(`acquireShareData success, data: ${JSON.stringify(wantParam)}`);
}
});
} catch (paramError) {
console.error(`error.code: ${JSON.stringify(paramError.code)}, error.message: ${JSON.stringify(paramError.message)}`);
}
```
# Native APIs
- [Using Native APIs in Application Projects](napi-guidelines.md)
- [Drawing Development](drawing-guidelines.md)
- [Raw File Development](rawfile-guidelines.md)
- [Native Window Development](native-window-guidelines.md)
- [Using MindSpore Lite for Model Inference](mindspore-lite-guidelines.md)
- [Using MindSpore Lite for Offline Model Conversion and Inference](mindspore-lite-offline-model-guidelines.md)
- [Connecting the Neural Network Runtime to an AI Inference Framework](neural-network-runtime-guidelines.md)
- [Purgeable Memory Development](purgeable-memory-guidelines.md)
- [USB DDK Development](usb-ddk-guidelines.md)
\ No newline at end of file
- Graphics
- [Drawing Development](drawing-guidelines.md)
- [NativeBuffer Development](native-buffer-guidelines.md)
- [NativeImage Development](native-image-guidelines.md)
- [NativeVsync Development](native-vsync-guidelines.md)
- [NativeWindow Development](native-window-guidelines.md)
- [Vulkan Development](vulkan-guidelines.md)
- Resource Management
- [Raw File Development](rawfile-guidelines.md)
- AI
- [Using MindSpore Lite for Model Inference](mindspore-lite-guidelines.md)
- [Using MindSpore Lite for Offline Model Conversion and Inference](mindspore-lite-offline-model-guidelines.md)
- [Connecting the Neural Network Runtime to an AI Inference Framework](neural-network-runtime-guidelines.md)
- Memory Management
- [Purgeable Memory Development](purgeable-memory-guidelines.md)
- Device Management
- [USB DDK Development](usb-ddk-guidelines.md)
......@@ -1674,7 +1674,7 @@ between the GUI components.
The following example provides a complete ArkUI-based application as an
illustration of GUI programming capabilities. For more details about ArkUI
features, please refer to the ArkUI
[tutorial](../arkts-get-started.md).
[tutorial](arkts-get-started.md).
```typescript
// ViewModel classes ---------------------------
......
......@@ -8,6 +8,7 @@
- [@ohos.app.ability.AbilityConstant (AbilityConstant)](js-apis-app-ability-abilityConstant.md)
- [@ohos.app.ability.abilityLifecycleCallback (AbilityLifecycleCallback)](js-apis-app-ability-abilityLifecycleCallback.md)
- [@ohos.app.ability.AbilityStage (AbilityStage)](js-apis-app-ability-abilityStage.md)
- [@ohos.app.ability.ApplicationStateChangeCallback (ApplicationStateChangeCallback)](js-apis-app-ability-applicationStateChangeCallback.md)
- [@ohos.app.ability.common (Context)](js-apis-app-ability-common.md)
- [@ohos.app.ability.contextConstant (ContextConstant)](js-apis-app-ability-contextConstant.md)
- [@ohos.app.ability.EnvironmentCallback (EnvironmentCallback)](js-apis-app-ability-environmentCallback.md)
......@@ -151,8 +152,19 @@
- [Common Events of the Bundle Management Subsystem](common_event/commonEvent-bundleManager.md)
- [Common Events of the Notification Service](common_event/commonEvent-ans.md)
- [Common Events of the Resource Scheduler Subsystem](common_event/commonEvent-resourceschedule.md)
- [Common Events of the Window Management Subsystem](common_event/commonEvent-window.md)
- [Common Events of the Network Management Subsystem](common_event/commonEvent-netmanager.md)
- [Common Events of the SMS Application](common_event/commonEvent-mms.md)
- [Common Events of the Telephony Subsystem](common_event/commonEvent-telephony.md)
- [Common Events of the Power Management Subsystem](common_event/commonEvent-powermgr.md)
- [Common Events of the NFC Subsystem](common_event/commonEvent-nfc.md)
- [Common Events of the Wi-Fi Subsystem](common_event/commonEvent-wifi.md)
- [Common Events of the USB Subsystem](common_event/commonEvent-usb.md)
- [Common Events of the File Management Subsystem](common_event/commonEvent-filemanagement.md)
- [Common Events of the Theme Framework - Lock Screen](common_event/commonEvent-screenlock.md)
- [Common Events of the Time and Time Zone Subsystem](common_event/commonEvent-time.md)
- [Common Events of the Account Subsystem](common_event/commonEvent-account.md)
- Bundle Management
- [@ohos.bundle.appControl (appControl)](js-apis-appControl.md)
- [@ohos.bundle.bundleManager (bundleManager)](js-apis-bundleManager.md)
......@@ -186,7 +198,10 @@
- UI Page
- [@ohos.animator (Animator)](js-apis-animator.md)
- [@ohos.arkui.componentSnapshot (Component Snapshot)](js-apis-arkui-componentSnapshot.md)
- [@ohos.arkui.dragController (DragController)](js-apis-arkui-dragController.md)
- [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](js-apis-arkui-drawableDescriptor.md)
- [@ohos.arkui.inspector (Layout Callback)](js-apis-arkui-inspector.md)
- [@ohos.arkui.UIContext (UIContext)](js-apis-arkui-UIContext.md)
- [@ohos.curves (Interpolation Calculation)](js-apis-curve.md)
- [@ohos.font (Custom Font Registration)](js-apis-font.md)
- [@ohos.matrix4 (Matrix Transformation)](js-apis-matrix4.md)
......@@ -208,6 +223,7 @@
- webgl
- [WebGL](js-apis-webgl.md)
- [WebGL2](js-apis-webgl2.md)
- Multimedia
- [@ohos.multimedia.audio (Audio Management)](js-apis-audio.md)
- [@ohos.multimedia.avsession (AVSession Management)](js-apis-avsession.md)
......@@ -267,6 +283,7 @@
- [@ohos.file.fileuri (File URI)](js-apis-file-fileuri.md)
- [@ohos.file.fs (File Management)](js-apis-file-fs.md)
- [@ohos.file.hash (File Hash Processing)](js-apis-file-hash.md)
- [@ohos.file.photoAccessHelper (Album Management)](js-apis-photoAccessHelper.md)
- [@ohos.file.picker (File Picker)](js-apis-file-picker.md)
- [@ohos.file.securityLabel (Data Label)](js-apis-file-securityLabel.md)
- [@ohos.file.statvfs (File System Space Statistics)](js-apis-file-statvfs.md)
......@@ -275,6 +292,9 @@
- [@ohos.filemanagement.userFileManager (User Data Management)](js-apis-userFileManager.md)
- [@ohos.fileshare (File Sharing)](js-apis-fileShare.md)
- AI
- [@ohos.ai.mindSporeLite (Inference)](js-apis-mindSporeLite.md)
- Telephony Service
- [@ohos.contact (Contacts)](js-apis-contact.md)
- [@ohos.telephony.call (Call)](js-apis-call.md)
......@@ -288,6 +308,7 @@
- [@ohos.net.connection (Network Connection Management)](js-apis-net-connection.md)
- [@ohos.net.ethernet (Ethernet Connection Management)](js-apis-net-ethernet.md)
- [@ohos.net.http (Data Request)](js-apis-http.md)
- [@ohos.net.policy (Network Policy Management)](js-apis-net-policy.md)
- [@ohos.net.mdns (mDNS Management)](js-apis-net-mdns.md)
- [@ohos.net.sharing (Network Sharing)](js-apis-net-sharing.md)
- [@ohos.net.socket (Socket Connection)](js-apis-socket.md)
......@@ -303,7 +324,7 @@
- [@ohos.nfc.controller (Standard NFC)](js-apis-nfcController.md)
- [@ohos.nfc.tag (Standard NFC Tags)](js-apis-nfcTag.md)
- [@ohos.rpc (RPC)](js-apis-rpc.md)
- [@ohos.secureElement (SE Channel Management)](js-apis-secureElement.md)
- [@ohos.secureElement (SE Management)](js-apis-secureElement.md)
- [@ohos.wifiManager (WLAN) (Recommended)](js-apis-wifiManager.md)
- [@ohos.wifiManagerExt (WLAN Extension) (Recommended)](js-apis-wifiManagerExt.md)
- [@ohos.wifi (WLAN) (To Be Deprecated Soon)](js-apis-wifi.md)
......@@ -318,6 +339,7 @@
- [@ohos.accessibility.GesturePath (Gesture Path)](js-apis-accessibility-GesturePath.md)
- [@ohos.accessibility.GesturePoint (Gesture Point)](js-apis-accessibility-GesturePoint.md)
- [@ohos.application.AccessibilityExtensionAbility (AccessibilityExtensionAbility)](js-apis-application-accessibilityExtensionAbility.md)
- [@ohos.base (Public Callback Information)](js-apis-base.md)
- [@ohos.faultLogger (FaultLogger)](js-apis-faultLogger.md)
- [@ohos.hichecker (HiChecker)](js-apis-hichecker.md)
- [@ohos.hidebug (HiDebug)](js-apis-hidebug.md)
......@@ -337,6 +359,7 @@
- [@ohos.systemDateTime (System Time and Time Zone)](js-apis-system-date-time.md)
- [@ohos.systemTimer (System Timer)](js-apis-system-timer.md)
- [@ohos.wallpaper (Wallpaper)](js-apis-wallpaper.md)
- [@ohos.WallpaperExtensionAbility (WallpaperExtensionAbility)](js-apis-WallpaperExtensionAbility.md)
- [@ohos.web.webview (Webview)](js-apis-webview.md)
- [Console](js-apis-logs.md)
- [Timer](js-apis-timer.md)
......@@ -345,6 +368,7 @@
- [AccessibilityExtensionContext](js-apis-inner-application-accessibilityExtensionContext.md)
- Device Management
- [@ohos.app.ability.DriverExtensionAbility (DriverExtensionAbility)](js-apis-app-ability-driverExtensionAbility.md)
- [@ohos.batteryInfo (Battery Information)](js-apis-battery-info.md)
- [@ohos.batteryStatistics (Battery Statistics)](js-apis-batteryStatistics.md)
- [@ohos.brightness (Screen Brightness)](js-apis-brightness.md)
......@@ -356,6 +380,7 @@
- [@ohos.distributedHardware.deviceManager (Device Management)](js-apis-device-manager.md)
- [@ohos.driver.deviceManager (Peripheral Management)](js-apis-driver-deviceManager.md)
- [@ohos.geoLocationManager (Geolocation Manager)](js-apis-geoLocationManager.md)
- [@ohos.multimodalInput.gestureEvent (Gesture Input Event)](js-apis-multimodalinput-gestureevent.md)
- [@ohos.multimodalInput.inputConsumer (Input Consumer)](js-apis-inputconsumer.md)
- [@ohos.multimodalInput.inputDevice (Input Device)](js-apis-inputdevice.md)
- [@ohos.multimodalInput.inputDeviceCooperate (Screen Hopping) (To Be Deprecated Soon)](js-apis-cooperate.md)
......@@ -380,10 +405,12 @@
- [@ohos.update (Update)](js-apis-update.md)
- [@ohos.usbManager (USB Manager)](js-apis-usbManager.md)
- [@ohos.vibrator (Vibrator)](js-apis-vibrator.md)
- application
- [DriverExtensionContext](js-apis-inner-application-driverExtensionContext.md)
- Account Management
- [@ohos.account.appAccount (App Account Management)](js-apis-appAccount.md)
- [@ohos.account.appAccount.AuthorizationExtensionAbility (App Account AuthorizationExtensionAbility)](js-apis-appAccount-authorizationExtensionAbility.md)
- [@ohos.account.appAccount.AuthorizationExtensionAbility (App AuthorizationExtensionAbility)](js-apis-appAccount-authorizationExtensionAbility.md)
- [@ohos.account.distributedAccount (Distributed Account Management)](js-apis-distributed-account.md)
- [@ohos.account.osAccount (OS Account Management)](js-apis-osAccount.md)
......@@ -391,6 +418,7 @@
- [@ohos.configPolicy (Configuration Policy)](js-apis-configPolicy.md)
- Enterprise Device Management
- [Enterprise Device Management Overview (for System Applications Only)](enterpriseDeviceManagement-overview.md)
- [@ohos.enterprise.accountManager(Account Management)](js-apis-enterprise-accountManager.md)
- [@ohos.enterprise.adminManager (Enterprise Device Management)](js-apis-enterprise-adminManager.md)
- [@ohos.enterprise.applicationManager (Application Management)](js-apis-enterprise-applicationManager.md)
......
# @ohos.resourceschedule.deviceStandby (Device Standby)
A device enters standby mode if it is unused for a long period of time or after the Power button is pressed. The standby mode prolongs the battery life without affecting the use of applications. The **deviceStandby** module provides APIs for you to check whether a device is in standby mode and request or cancel standby resource control for an application.
> **NOTE**
>
> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import
```js
import deviceStandby from '@ohos.resourceschedule.deviceStandby';
```
## deviceStandby.getExemptedApps
getExemptedApps(resourceTypes: number, callback: AsyncCallback<Array&lt;ExemptedAppInfo&gt;>): void;
Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ------------------------------ |
| [ResourceTypes](#resourcetype)|number | Yes | Types of resources that can be used.|
| callback | AsyncCallback<Array&lt;[ExemptedAppInfo](#exemptedappinfo)&gt;> | Yes |Callback used to return the exempted application information.|
**Error codes**
For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md).
| ID | Error Message |
| ---- | --------------------- |
| 9800001 | Memory operation failed. |
| 9800002 | Parcel operation failed. |
| 9800003 | Inner transact failed. |
| 9800004 | System service operation failed. |
| 18700001 | Caller information verification failed. |
**Example**
```js
try{
deviceStandby.getExemptedApps(resourceTypes, (err, res) => {
if (err) {
console.log('DEVICE_STANDBY getExemptedApps callback failed. code is: ' + err.code + ',message is: ' + err.message);
} else {
console.log('DEVICE_STANDBY getExemptedApps callback success.');
for (let i = 0; i < res.length; i++) {
console.log('DEVICE_STANDBY getExemptedApps callback result ' + JSON.stringify(res[i]));
}
}
});
} catch (error) {
console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message);
}
```
## deviceStandby.getExemptedApps
getExemptedApps(resourceTypes: number): Promise<Array&lt;ExemptedAppInfo&gt;>;
Obtains the list of applications that can still use resources of the specified types when the device is in standby mode. This API uses a promise to return the result.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ------------------------------ |
| [ResourceTypes](#resourcetype)|number | Yes |Types of resources that can be used.|
**Return value**
| Type | Description |
| --------------------- | ---------------------------------------- |
| Promise<Array&lt;[ExemptedAppInfo](#exemptedappinfo)&gt;> | Promise used to return the exempted application information.|
**Error codes**
For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md).
| ID | Error Message |
| ---- | --------------------- |
| 9800001 | Memory operation failed. |
| 9800002 | Parcel operation failed. |
| 9800003 | Inner transact failed. |
| 9800004 | System service operation failed. |
| 18700001 | Caller information verification failed. |
**Example**
```js
try{
deviceStandby.getExemptedApps(resourceTypes).then( res => {
console.log('DEVICE_STANDBY getExemptedApps promise success.');
for (let i = 0; i < res.length; i++) {
console.log('DEVICE_STANDBY getExemptedApps promise result ' + JSON.stringify(res[i]));
}
}).catch( err => {
console.log('DEVICE_STANDBY getExemptedApps promise failed. code is: ' + err.code + ',message is: ' + err.message);
});
} catch (error) {
console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message);
}
```
## deviceStandby.requestExemptionResource
requestExemptionResource(request: ResourceRequest): void;
Requests exemption, so that the application can use restricted resources when the device is in standby mode.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ------------------------------ |
| request |[ResourceRequest](#resourcerequest)| Yes | Request body.|
**Error codes**
For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md).
| ID | Error Message |
| ---- | --------------------- |
| 9800001 | Memory operation failed. |
| 9800002 | Parcel operation failed. |
| 9800003 | Inner transact failed. |
| 9800004 | System service operation failed. |
| 18700001 | Caller information verification failed. |
**Example**
```js
let resRequest = {
resourceTypes: 1,
uid:10003,
name:"com.example.app",
duration:10,
reason:"apply",
};
// Promise mode
try{
deviceStandby.requestExemptionResource(resRequest).then( () => {
console.log('DEVICE_STANDBY requestExemptionResource promise succeeded.');
}).catch( err => {
console.log('DEVICE_STANDBY requestExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message);
});
} catch (error) {
console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message);
}
// Asynchronous callback mode
try{
deviceStandby.requestExemptionResource(resRequest, (err) => {
if (err) {
console.log('DEVICE_STANDBY requestExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message);
} else {
console.log('DEVICE_STANDBY requestExemptionResource callback succeeded.');
}
});
} catch (error) {
console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message);
}
```
## deviceStandby.releaseExemptionResource
releaseExemptionResource(request: ResourceRequest): void;
Cancels exemption for the application.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**Required permissions**: ohos.permission.DEVICE_STANDBY_EXEMPTION
**System API**: This is a system API.
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ------------------------------ |
| request |[ResourceRequest](#resourcerequest)| Yes | Request body.|
**Error codes**
For details about the error codes, see [Background Task Management Error Codes](../errorcodes/errorcode-backgroundTaskMgr.md).
| ID | Error Message |
| ---- | --------------------- |
| 9800001 | Memory operation failed. |
| 9800002 | Parcel operation failed. |
| 9800003 | Inner transact failed. |
| 9800004 | System service operation failed. |
| 18700001 | Caller information verification failed. |
**Example**
```js
let resRequest = {
resourceTypes: 1,
uid:10003,
name:"com.demo.app",
duration:10,
reason:"unapply",
};
// Promise mode
try{
deviceStandby.releaseExemptionResource(resRequest).then( () => {
console.log('DEVICE_STANDBY releaseExemptionResource promise succeeded.');
}).catch( err => {
console.log('DEVICE_STANDBY releaseExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message);
});
} catch (error) {
console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message);
}
// Asynchronous callback mode
try{
deviceStandby.releaseExemptionResource(resRequest, (err) => {
if (err) {
console.log('DEVICE_STANDBY releaseExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message);
} else {
console.log('DEVICE_STANDBY releaseExemptionResource callback succeeded.');
}
});
} catch (error) {
console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message);
}
```
## ResourceType
Enumerates the types of resources that can be used by exempted applications.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**System API**: This is a system API.
|Name |Value |Description|
| ------------ | ------------ |--------------|
|NETWORK |1 |Network access resource.|
|RUNNING_LOCK |2 |CPU running lock resource.|
|TIMER |4 | Timer task resource.|
|WORK_SCHEDULER |8 | Work task resource.|
|AUTO_SYNC |16 | Automatic synchronization resource.|
|PUSH |32 | Push kit resource.|
|FREEZE |64 | Freezing application resource.|
## ExemptedAppInfo
Defines the information about an exempted application.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**System API**: This is a system API.
|Name |Type | Mandatory |Description |
| ------------ | ------------ |------------ | ------------ |
|[resourceTypes](#resourcetype) | number | Yes |Types of resources that can be used. |
|name |string | Yes | Name of the application. |
|duration | number | Yes | Exemption duration.|
## ResourceRequest
Defines the message used to request to be an exempted application.
**System capability**: SystemCapability.ResourceSchedule.DeviceStandby
**System API**: This is a system API.
|Name |Type | Mandatory |Description |
| ------------ | ------------ |------------| ------------ |
|[resourceTypes](#resourcetype) | number | Yes |Types of resources that can be used. |
|uid | number | Yes |UID of the application. |
|name |string | Yes | Name of the application. |
|duration | number | Yes | Exemption duration.|
|reason |string | Yes | Reason for the request. |
......@@ -4,7 +4,7 @@
- Quick Start
- Getting Started
- [Before You Start](quick-start/start-overview.md)
- [Getting Started with ArkTS in Stage Model](quick-start/start-with-ets-stage.md)
- [Building the First ArkTS Application in Stage Model](quick-start/start-with-ets-stage.md)
- Development Fundamentals
- Application Package Fundamentals
- [Application Package Overview](quick-start/application-package-overview.md)
......@@ -43,8 +43,8 @@
- [Resource Categories and Access](quick-start/resource-categories-and-access.md)
- Learning ArkTS
- [Getting Started with ArkTS](quick-start/arkts-get-started.md)
- [Introduction to ArkTS]quick-start/arkts/introduction-to-arkts.md)
- [TypeScript to ArkTS Migration](quick-start/arkts/typescript-to-arkts-migration-guide.md)
- [Introduction to ArkTS](quick-start/introduction-to-arkts.md)
- [TypeScript to ArkTS Migration](quick-start/typescript-to-arkts-migration-guide.md)
- UI Paradigm
- Basic Syntax
- [Basic Syntax Overview](quick-start/arkts-basic-syntax-overview.md)
......@@ -147,7 +147,6 @@
- [Cross-Device Migration (for System Applications Only)](application-models/hop-cross-device-migration.md)
- [Multi-device Collaboration (for System Applications Only)](application-models/hop-multi-device-collaboration.md)
- [Subscribing to System Environment Variable Changes](application-models/subscribe-system-environment-variable-changes.md)
- [Setting Atomic Services to Support Sharing](application-models/atomic-services-support-sharing.md)
- Process Model
- [Process Model Overview](application-models/process-model-stage.md)
- Common Events
......@@ -289,14 +288,26 @@
- [Drawing Geometric Shapes (Shape)](ui/arkts-geometric-shape-drawing.md)
- [Drawing Custom Graphics on the Canvas (Canvas)](ui/arkts-drawing-customization-on-canvas.md)
- Using Animation
- [Animation Overview](ui/arkts-animation-overview.md)
- Animation Within a Page
- [Layout Update Animation](ui/arkts-layout-update-animation.md)
- [Transition Animation Within a Component](ui/arkts-transition-animation-within-component.md)
- [Spring Curve Animation](ui/arkts-spring-animation.md)
- Animation Between Pages
- [Zoom Animation](ui/arkts-zoom-animation.md)
- [Page Transition Animation](ui/arkts-page-transition-animation.md)
- [Animation Overview](ui/arkts-animation.md)
- Property Animation
- [Property Animation Overview](ui/arkts-attribute-animation-overview.md)
- [Property Animation APIs](ui/arkts-attribute-animation-apis.md)
- [Custom Property Animation](ui/arkts-custom-attribute-animation.md)
- Transition Animation
- [Transition Animation Overview](ui/arkts-transition-overview.md)
- [Enter/Exit Transition](ui/arkts-enter-exit-transition.md)
- [Navigation Transition](ui/arkts-navigation-transition.md)
- [Modal Transition](ui/arkts-modal-transition.md)
- [Shared Element Transition](ui/arkts-shared-element-transition.md)
- [Component Animation](ui/arkts-component-animation.md)
- Animation Curve
- [Traditional Curve](ui/arkts-traditional-curve.md)
- [Spring Curve](ui/arkts-spring-curve.md)
- [Animation Smoothing](ui/arkts-animation-smoothing.md)
- Animation Effects
- [Blur Effect](ui/arkts-blur-effect.md)
- [Shadow Effect](ui/arkts-shadow-effect.md)
- [Color Effect](ui/arkts-color-effect.md)
- Using Interaction Events
- [Interaction Event Overview](ui/arkts-event-overview.md)
- Universal Events
......@@ -544,6 +555,7 @@
- [Ethernet Connection](connectivity/net-ethernet.md)
- [Network Connection Management](connectivity/net-connection-manager.md)
- [MDNS Management](connectivity/net-mdns.md)
- [Traffic Management](connectivity/net-statistics.md)
- IPC & RPC
- [IPC & RPC Overview](connectivity/ipc-rpc-overview.md)
- [IPC & RPC Development](connectivity/ipc-rpc-development-guideline.md)
......@@ -574,7 +586,7 @@
- [Unified Data Definition](database/unified-data-definition.md)
- One-to-Many Data Sharing (for System Applications Only)
- [Sharing Data Using DataShareExtensionAbility](database/share-data-by-datashareextensionability.md)
- [Data Sharing Through Silent Access](database/share-data-by-silent-access.md)
- [Silent Access via the DatamgrService](database/share-data-by-silent-access.md)
- Many-to-Many Data Sharing
- [Sharing Data via Unified Data Channels](database/unified-data-channels.md)
- File Management
......@@ -896,7 +908,6 @@
- [@ohos.arkui.drawableDescriptor (DrawableDescriptor)](reference/apis/js-apis-arkui-drawableDescriptor.md)
- [@ohos.arkui.inspector (Layout Callback)](reference/apis/js-apis-arkui-inspector.md)
- [@ohos.arkui.UIContext (UIContext)](reference/apis/js-apis-arkui-UIContext.md)
- [@ohos.componentUtils (componentUtils)](reference/apis/js-apis-componentUtils.md)
- [@ohos.curves (Interpolation Calculation)](reference/apis/js-apis-curve.md)
- [@ohos.font (Custom Font Registration)](reference/apis/js-apis-font.md)
- [@ohos.matrix4 (Matrix Transformation)](reference/apis/js-apis-matrix4.md)
......@@ -994,6 +1005,7 @@
- [@ohos.net.connection (Network Connection Management)](reference/apis/js-apis-net-connection.md)
- [@ohos.net.ethernet (Ethernet Connection Management)](reference/apis/js-apis-net-ethernet.md)
- [@ohos.net.http (Data Request)](reference/apis/js-apis-http.md)
- [@ohos.net.policy (Network Policy Management)](reference/apis/js-apis-net-policy.md)
- [@ohos.net.mdns (mDNS Management)](reference/apis/js-apis-net-mdns.md)
- [@ohos.net.sharing (Network Sharing)](reference/apis/js-apis-net-sharing.md)
- [@ohos.net.socket (Socket Connection)](reference/apis/js-apis-socket.md)
......@@ -1058,6 +1070,7 @@
- [@ohos.cooperate (Screen Hopping)](reference/apis/js-apis-devicestatus-cooperate.md)
- [@ohos.deviceAttest (Device Attestation)](reference/apis/js-apis-deviceAttest.md)
- [@ohos.deviceInfo (Device Information)](reference/apis/js-apis-device-info.md)
- [@ohos.distributedDeviceManager (Device Management)](reference/apis/js-apis-distributedDeviceManager.md)
- [@ohos.distributedHardware.deviceManager (Device Management)](reference/apis/js-apis-device-manager.md)
- [@ohos.driver.deviceManager (Peripheral Management)](reference/apis/js-apis-driver-deviceManager.md)
- [@ohos.geoLocationManager (Geolocation Manager)](reference/apis/js-apis-geoLocationManager.md)
......@@ -1076,6 +1089,7 @@
- [@ohos.multimodalInput.touchEvent (Touch Event)](reference/apis/js-apis-touchevent.md)
- [@ohos.multimodalInput.shortKey (Shortcut Key)](reference/apis/js-apis-shortKey.md)
- [@ohos.power (System Power Management)](reference/apis/js-apis-power.md)
- [@ohos.resourceschedule.deviceStandby (Device Standby)](reference/apis/js-apis-resourceschedule-deviceStandby.md)
- [@ohos.runningLock (Runninglock)](reference/apis/js-apis-runninglock.md)
- [@ohos.sensor (Sensor)](reference/apis/js-apis-sensor.md)
- [@ohos.settings (Data Item Settings)](reference/apis/js-apis-settings.md)
......@@ -1100,6 +1114,7 @@
- [@ohos.enterprise.accountManager (Account Management)](reference/apis/js-apis-enterprise-accountManager.md)
- [@ohos.enterprise.adminManager (Enterprise Device Management)](reference/apis/js-apis-enterprise-adminManager.md)
- [@ohos.enterprise.applicationManager (Application Management)](reference/apis/js-apis-enterprise-applicationManager.md)
- [@ohos.enterprise.browser (Browser Management)](reference/apis/js-apis-enterprise-browser.md)
- [@ohos.enterprise.bundleManager (Bundle Management)](reference/apis/js-apis-enterprise-bundleManager.md)
- [@ohos.enterprise.dateTimeManager (System Time Management)](reference/apis/js-apis-enterprise-dateTimeManager.md)
- [@ohos.enterprise.deviceControl (Device Control Management)](reference/apis/js-apis-enterprise-deviceControl.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册