diff --git a/en/application-dev/file-management/Readme-EN.md b/en/application-dev/file-management/Readme-EN.md
index f512a935bae109a31ae3ea1b530608c5dadf6864..f976a47e09917c74f143a5cd84f3e7824825dc47 100644
--- a/en/application-dev/file-management/Readme-EN.md
+++ b/en/application-dev/file-management/Readme-EN.md
@@ -19,6 +19,12 @@
- Selecting and Saving User Files (FilePicker)
- [Selecting User Files](select-user-file.md)
- [Saving User Files](save-user-file.md)
+ - Album Management (photoAccessHelper)
+ - [photoAccessHelper Overview](photoAccessHelper-overview.md)
+ - [Media Asset (Image and video) Management](photoAccessHelper-resource-guidelines.md)
+ - [User Album Management](photoAccessHelper-userAlbum-guidelines.md)
+ - [System Album Management](photoAccessHelper-systemAlbum-guidelines.md)
+ - [Media Asset Change Notification Management](photoAccessHelper-notify-guidelines.md)
- [Developing a FileManager Application (for System Applications Only)](dev-user-file-manager.md)
- [Managing External Storage Devices (for System Applications Only)](manage-external-storage.md)
- Distributed File System
diff --git a/en/application-dev/file-management/photoAccessHelper-notify-guidelines.md b/en/application-dev/file-management/photoAccessHelper-notify-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..6e85789e72b92b991a654482a232100017cc0cbd
--- /dev/null
+++ b/en/application-dev/file-management/photoAccessHelper-notify-guidelines.md
@@ -0,0 +1,200 @@
+# Media Asset (Image, Video, and Album) Change Notification Management
+
+The **photoAccessHelper** module provides APIs for listening for media asset changes.
+
+> **NOTE**
+>
+> Before you start, refer to [photoAccessHelper Overview](photoAccessHelper-overview.md) to learn how to obtain a **photoAccessHelper** instance and apply for permissions required.
+> By default, the **photoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **photoAccessHelper** APIs are used. If the code for obtaining the **photoAccessHelper** instance is not added, an error indicating that **photoAccessHelper** is not defined is reported.
+
+The APIs related to media asset change notifications can be called asynchronously only in callback mode. This topic describes how to use some APIs. For more information about the APIs, see [Album Management](../reference/apis/js-apis-photoAccessHelper.md).
+Unless otherwise specified, all the media assets to be obtained in this document exist in the database. If no media asset is obtained when the sample code is executed, check whether the media assets exist in the database.
+
+## Listening for the Specified URI
+
+Use [registerChange](../reference/apis/js-apis-photoAccessHelper.md#registerchange) to listen for the specified URI. When the observed object changes, the value of the listener callback will be returned.
+
+### Registering a Listener for a File Asset
+
+Registers a listener for the specified file asset. When the observed file asset changes, the listener callback will be invoked to return the change.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Register a listener for an image. When the image is favorited, the listener callback will be invoked.
+
+**How to Develop**
+
+1. [Obtain a media asset](photoAccessHelper-resource-guidelines.md#obtaining-the-specified-media-assets).
+2. Register a listener for the media asset obtained.
+3. Add the media asset to **Favorites**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+predicates.equalTo(photoAccessHelper.ImageVideoKey.DISPLAY_NAME, 'test.jpg');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.uri : ' + fileAsset.uri);
+
+ let onCallback = (changeData) => {
+ console.info('onCallback successfully, changData: ' + JSON.stringify(changeData));
+ }
+ phAccessHelper.registerChange(fileAsset.uri, false, onCallback);
+
+ await fileAsset.favorite(true);
+ fetchResult.close();
+} catch (err) {
+ console.error('onCallback failed with err: ' + err);
+}
+```
+
+### Registering a Listener for an Album
+
+Registers a listener for an album. When the observed album changes, the listener callback will be invoked to return the change.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Register a listener for a user album. When the album is renamed, the listener callback will be invoked.
+
+**How to Develop**
+
+1. [Obtain the user album](photoAccessHelper-userAlbum-guidelines.md#obtaining-a-use-album].
+2. Register a listener for the user album.
+3. Rename the user album.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+predicates.equalTo(albumName, 'albumName');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, fetchOptions);
+ let album = await fetchResult.getFirstObject();
+ console.info('getAlbums successfullyfully, albumName: ' + album.albumUri);
+
+ let onCallback = (changeData) => {
+ console.info('onCallback successfully, changData: ' + JSON.stringify(changeData));
+ }
+ phAccessHelper.registerChange(album.albumUri, false, onCallback);
+
+ album.albumName = 'newAlbumName' + Date.now();
+ await album.commitModify();
+ fetchResult.close();
+} catch (err) {
+ console.error('onCallback failed with err: ' + err);
+}
+```
+
+## Fuzzy Listening
+
+You can set **forChildUris** to **true** to register fuzzy listening. When **uri** is an album URI, the value **true** of **forChildUris** listens for the changes of the files in the album, and the value **false** listens for only the changes of the album itself.
If **uri** is the URI of a **fileAsset**, there is no difference between **true** and **false** for **forChildUris**.
If **uri** is **DefaultChangeUri**, **forChildUris** must be set to **true**. If **forChildUris** is **false**, the URI cannot be found and no message can be received.
+
+### Registering a Listener for All FileAssets
+
+Register listening for all FileAssets. When an observed FileAsset changes, the listener callback will be invoked.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Register a listener for all FileAssets. When an observed FileAsset is favorited, the listener callback will be invoked.
+
+**How to Develop**
+
+1. Register a listener for all FileAssets.
+2. [Obtain a media asset](photoAccessHelper-resource-guidelines.md#obtaining-the-specified-media-assets).
+3. Add the media asset obtained to **Favorites**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let onCallback = (changeData) => {
+ console.info('onCallback successfully, changData: ' + JSON.stringify(changeData));
+}
+phAccessHelper.registerChange(photoAccessHelper.DefaultChangeUri.DEFAULT_PHOTO_URI, true, onCallback);
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.uri : ' + fileAsset.uri);
+ await fileAsset.favorite(true);
+ fetchResult.close();
+} catch (err) {
+ console.error('onCallback failed with err: ' + err);
+}
+```
+
+## Unregistering the Listening for a URI
+
+Use [unRegisterChange](../reference/apis/js-apis-photoAccessHelper.md#unregisterchange) to unregister the listening for the specified URI. Multiple listeners can be registered for a URI. If multiple listener callbacks exist, you can unregister a listener callback registered. If callback is not specified, all listeners of the URI will be unregistered.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Unregister the listening for an image. After that, the corresponding listener callback is not triggered when the image favorites status is changed.
+
+**How to Develop**
+
+1. [Obtain a media asset](photoAccessHelper-resource-guidelines.md#obtaining-the-specified-media-assets).
+2. Unregister the listening for the URI of the media asset obtained.
+3. Add the media asset obtained to **Favorites**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+predicates.equalTo(photoAccessHelper.ImageVideoKey.DISPLAY_NAME, 'test.jpg');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.uri : ' + fileAsset.uri);
+
+ let onCallback1 = (changeData) => {
+ console.info('onCallback1, changData: ' + JSON.stringify(changeData));
+ }
+ let onCallback2 = (changeData) => {
+ console.info('onCallback2, changData: ' + JSON.stringify(changeData));
+ }
+ phAccessHelper.registerChange(fileAsset.uri, false, onCallback1);
+ phAccessHelper.registerChange(fileAsset.uri, false, onCallback2);
+ phAccessHelper.unRegisterChange(fileAsset.uri, onCallback1);
+
+ await fileAsset.favorite(true);
+ fetchResult.close();
+} catch (err) {
+ console.error('onCallback failed with err: ' + err);
+}
+```
diff --git a/en/application-dev/file-management/photoAccessHelper-overview.md b/en/application-dev/file-management/photoAccessHelper-overview.md
new file mode 100644
index 0000000000000000000000000000000000000000..48bb753cf4c1b5d10132c4bb1b12e7cf9290fd4c
--- /dev/null
+++ b/en/application-dev/file-management/photoAccessHelper-overview.md
@@ -0,0 +1,123 @@
+# PhotoAccessHelper Overview
+
+**PhotoAccessHelper** provides album management capabilities, including creating and accessing an album and accessing and modifying media data in albums. You can use the APIs provided by **PhotoAccessHelper** to manage:
+
+- [Media assets (images and videos)](photoAccessHelper-resource-guidelines.md), including:
+ - Obtaining the specified media assets.
+ - Obtaining an image or video thumbnail.
+ - Creating a media asset.
+ - Renaming a media asset.
+ - Moving a media asset to the trash.
+- [User Albums](photoAccessHelper-userAlbum-guidelines.md), including:
+ - Creating a user album.
+ - Obtaining a user album.
+ - Renaming a user album.
+ - Adding images and videos to a user album.
+ - Obtaining images and videos from a user album.
+ - Removing images and videos from a user album.
+ - Deleting a user album.
+- [System albums](photoAccessHelper-systemAlbum-guidelines.md), including:
+ - Favorites
+ - Video album
+ - Screenshot album
+- [Media asset (image, video, and album) change notifications](photoAccessHelper-notify-guidelines.md), including:
+ - Registering listening for a specified URI.
+ - Unregistering the listening for a specified URI.
+
+> **NOTE**
+>
+> The **PhotoAccessHelper** development guides apply only to API version 10 based on the stage model.
+
+An application needs to obtain a **photoAccessHelper** instance before accessing and modifying the media data in an album. User personal data is involved in the **photoAccessHelper** module. Therefore, the application needs to apply for the related read and write permissions. Unless otherwise specified, the APIs of the **photoAccessHelper** module apply to **pages/index.ets** of the project or other customized .ets files by default.
+
+Before using the **PhotoAccessHelper** APIs, you need to:
+
+- [Obtain a **photoAccessHelper** instance.](#obtaining-a-photoaccesshelper-instance)
+- [Apply for permissions.](#applying-for-permissions)
+
+## Obtaining a photoAccessHelper Instance
+
+The application needs to call [getPhotoAccessHelper](../reference/apis/js-apis-photoAccessHelper.md#photoaccesshelpergetphotoaccesshelper) to obtain a **photoAccessHelper** instance based on the application context. The instance obtained can be used to access or modify the media data (such as image and videos) in an album.
+
+**How to Develop**
+
+1. Import the **photoAccessHelper** module.
+2. Use **getContext** to obtain the application context.
+3. Obtain a **photoAccessHelper** instance.
+
+```ts
+import photoAccessHelper from '@ohos.file.photoAccessHelper';
+
+// The phAccessHelper instance obtained here is a global object. By default, the object obtained here is used in subsequent operations. If the code is not added, an undefined error will be reported.
+const context = getContext(this);
+let phAccessHelper = photoAccessHelper.getPhotoAccessHelper(context);
+```
+
+## Applying for Permissions
+
+Before applying for permission, ensure that the [basic principles for permission management](../security/accesstoken-overview.md#basic-principles-for-permission-management) are complied with. Apply for the following permissions.
+
+| Permission | Description | Authorization Mode |
+| ------------------------------ | ------------------------------------------ | ---------- |
+| ohos.permission.READ_IMAGEVIDEO | Allows an app to read image and video file information from a user's external storage.| user_grant |
+| ohos.permission.WRITE_IMAGEVIDEO | Allows an app to read and write image and video file information on a user's external storage.| user_grant |
+
+The required permissions must be authorized by the user (user_grant). You need to add the permissions in the **module.json5** file, and use [abilityAccessCtrl.requestPermissionsFromUser](../reference/apis/js-apis-abilityAccessCtrl.md#requestpermissionsfromuser9) to check whether the required permissions are granted by the user. If yes, the application can access the data. Otherwise, a dialog box will be displayed to request user authorization.
+
+> **NOTE**
Even if the user has granted the permission, the permission will still be checked before an API protected by the permission is called. The permission granted status should not be persisted, because the user can revoke the permission through the system application **Settings**.
+
+**How to Develop**
+
+1. Declare the permissions in the **module.json5** file.
Add **requestPermissions** under **module** in the file, and add the required permissions. For details, see [Applying for Permissions](../security/accesstoken-guidelines.md).
+
+ ```json
+ {
+ "module": {
+ "requestPermissions": [
+ {
+ "name": "ohos.permission.READ_IMAGEVIDEO",
+ "reason": "Permissions required for photoAccessHelper related operations",
+ "usedScene": {
+ "abilities": [
+ "EntryAbility"
+ ],
+ "when": "always"
+ }
+ },
+ {
+ "name": "ohos.permission.WRITE_IMAGEVIDEO",
+ "reason": "Permissions required for photoAccessHelper related operations",
+ "usedScene": {
+ "abilities": [
+ "EntryAbility"
+ ],
+ "when": "always"
+ }
+ },
+ ]
+ }
+ }
+ ```
+
+2. Call **requestPermissionsFromUser** in the **onWindowStageCreate** callback of **Ability.ts** to check for the required permissions. If the permissions are not granted, display a dialog box to request user authorization dynamically.
+
+ ```ts
+ import UIAbility from '@ohos.app.ability.UIAbility';
+ import abilityAccessCtrl, {Permissions} from '@ohos.abilityAccessCtrl';
+
+ export default class EntryAbility extends UIAbility {
+ onWindowStageCreate(windowStage) {
+ let list : Array = ['ohos.permission.READ_IMAGEVIDEO', 'ohos.permission.WRITE_IMAGEVIDEO'];
+ let permissionRequestResult;
+ let atManager = abilityAccessCtrl.createAtManager();
+ atManager.requestPermissionsFromUser(this.context, list, (err, result) => {
+ if (err) {
+ console.error('requestPermissionsFromUserError: ' + JSON.stringify(err));
+ } else {
+ permissionRequestResult = result;
+ console.info('permissionRequestResult: ' + JSON.stringify(permissionRequestResult));
+ }
+ });
+ }
+ }
+ ```
diff --git a/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md b/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..d145589c1ad96aa8c9e4cc11d3112e40f4772678
--- /dev/null
+++ b/en/application-dev/file-management/photoAccessHelper-resource-guidelines.md
@@ -0,0 +1,283 @@
+# Media Asset Management
+
+Applications can call **photoAccessHelper** APIs to manage media assets (images and videos).
+
+> **NOTE**
+>
+> Before you start, refer to [photoAccessHelper Overview](photoAccessHelper-overview.md) to learn how to obtain a **photoAccessHelper** instance and apply for permissions required.
+> By default, the **photoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **photoAccessHelper** APIs are used. If the code for obtaining the **photoAccessHelper** instance is not added, an error indicating that **photoAccessHelper** is not defined is reported.
+
+To ensure application running efficiency, most **PhotoAccessHelper** calls are asynchronous in callback or promise mode. The following code samples use promise-based APIs. For details about the APIs, see [Album Management](../reference/apis/js-apis-photoAccessHelper.md).
+
+## Obtaining the Specified Media Assets
+
+You can query media assets by media type, date, or album name.
+
+Use [PhotoAccessHelper.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets) with the [FetchOptions](../reference/apis/js-apis-photoAccessHelper.md#fetchoptions) object to specify search criteria. Unless otherwise specified, all the media assets to be obtained in this document exist in the database. If no media asset is obtained when the sample code is executed, check whether the media assets exist in the database.
+
+To obtain the object at the specified position (for example, the first, the last, or object with the specified index) in the result set, use [FetchFileResult](../reference/apis/js-apis-photoAccessHelper.md#fetchresult).
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+- The [dataSharePredicates](../reference/apis/js-apis-data-dataSharePredicates.md) module is imported.
+
+### Obtaining an Image or Video by Name
+
+Example: Obtain the image **test.jpg**.
+
+**How to Develop**
+
+Create a **FetchOptions** object and specify **test.jpg**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+predicates.equalTo(photoAccessHelper.PhotoKeys.DISPLAY_NAME, 'test.jpg');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+```
+
+Call **PhotoAccessHelper.getAssets** to obtain the image asset.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.displayName : ' + fileAsset.displayName);
+ fetchResult.close();
+} catch (err) {
+ console.error('getAssets failed with err: ' + err);
+}
+```
+
+### Obtaining an Image or Video by URI
+
+Example: Obtain the image with the file URI **file://media/Photo/1**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+predicates.equalTo(photoAccessHelper.PhotoKeys.URI, 'file://media/Photo/1');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+```
+
+Call **PhotoAccessHelper.getAssets** to obtain the image asset.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.uri : ' + fileAsset.uri);
+ fetchResult.close();
+} catch (err) {
+ console.error('getAssets failed with err: ' + err);
+}
+```
+
+
+### Obtaining Images or Videos by Time
+
+Example: Obtain the media assets added from 2022-06-01 to 2023-06-01.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let startTime = Date.parse(new Date('2022-06-01').toString()) / 1000; // The value of the start time is the number of seconds elapsed since the Epoch time.
+let endTime = Date.parse(new Date('2023-06-01').toString()) / 1000; // The value of the end time is the number of seconds elapsed since the Epoch time.
+let date_added = photoAccessHelper.PhotoKeys.DATE_ADDED;
+predicates.between(date_added, startTime, endTime);
+predicates.orderByDesc(date_added); // The query results are sorted in descending order.
+let fetchOptions = {
+ fetchColumns: [date_added], // The date_added attribute is not a default option and needs to be added.
+ predicates: predicates
+};
+```
+
+Call **PhotoAccessHelper.getAssets** to obtain the image assets.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ console.info('getAssets count: ' + fetchResult.getCount());
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.displayName : ' + fileAsset.displayName);
+ fetchResult.close();
+} catch (err) {
+ console.error('getAssets failed with err: ' + err);
+}
+```
+
+## Obtaining an Image or Video Thumbnail
+
+Use [FileAsset.getThumbnail](../reference/apis/js-apis-photoAccessHelper.md#getthumbnail) with the thumbnail size passed in to obtain the image or video thumbnail. The thumbnails offer a quick preview on images and videos.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+- The [dataSharePredicates](../reference/apis/js-apis-data-dataSharePredicates.md) module is imported.
+
+### Obtaining the Thumbnail of an Image
+
+Your application may need to obtain the thumbnail of an image or video for preview purposes.
+
+Example: Obtain the thumbnail of 720 x 720 of an image.
+
+**How to Develop**
+
+1. Set the fetch options.
+2. Call **PhotoAccessHelper.getAssets** to obtain image assets.
+3. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the result set.
+4. Call **getThumbnail** to obtain the [PixelMap](../reference/apis/js-apis-image.md#pixelmap7) of the thumbnail of the image.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.displayName : ' + fileAsset.displayName);
+ let size = { width: 720, height: 720 };
+ let pixelMap = await fileAsset.getThumbnail(size);
+ let imageInfo = await pixelMap.getImageInfo()
+ console.info('getThumbnail successful, pixelMap ImageInfo size: ' + JSON.stringify(imageInfo.size));
+ fetchResult.close();
+} catch (err) {
+ console.error('getThumbnail failed with err: ' + err);
+}
+```
+
+## Creating a Media Asset
+
+Use [createAsset](../reference/apis/js-apis-photoAccessHelper.md#createasset) to create a media asset.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.WRITE_IMAGEVIDEO** permission.
+
+### Creating an Image or Video Asset
+
+Example: Create an image asset.
+
+**How to Develop**
+
+1. Set the file name and create **createOption** for setting attributes for the image asset to create.
+2. Call **createAsset** to create an image asset.
+
+```ts
+try {
+ let displayName = 'testPhoto' + Date.now() + '.jpg';
+ let createOption = {
+ subType: photoAccessHelper.PhotoSubtype.DEFAULT
+ };
+
+ let fileAsset = await phAccessHelper.createAsset(displayName, createOption);
+ console.info('createAsset successfully, file displayName: ' + fileAsset.displayName);
+} catch (err) {
+ console.error('createAsset failed, message = ', err);
+}
+```
+
+## Renaming a Media Asset
+
+Set the **FileAsset.displayName** attribute to modify the file name (including the file name extension) displayed.
+
+After the modification, use [FileAsset.commitModify](../reference/apis/js-apis-photoAccessHelper.md#commitmodify) to update the modification to the database.
+
+Before renaming a file, use [FetchResult](../reference/apis/js-apis-photoAccessHelper.md#fetchresult) to obtain the file.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.WRITE_IMAGEVIDEO** and **ohos.permission.READ_IMAGEVIDEO** permissions.
+
+Example: Rename the first file in the obtained image assets.
+
+**How to Develop**
+
+1. Set the fetch options.
+2. Call **getAssets** to obtain image assets.
+3. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the obtained file assets.
+4. Call **FileAsset.set** to rename the image.
+5. Call **FileAsset.commitModify** to update the modified image attributes to the database.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: ['title'],
+ predicates: predicates
+};
+let newTitle = 'newTestPhoto';
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ let title = photoAccessHelper.PhotoKeys.TITLE;
+ let fileAssetTitle = fileAsset.get(title);
+ console.info('getAssets fileAsset.title : ' + fileAssetTitle);
+ fileAsset.set(title, newTitle);
+ await fileAsset.commitModify();
+ fetchResult.close();
+} catch (err) {
+ console.error('commitModify failed with err: ' + err);
+}
+```
+
+## Moving Media Assets to the Trash
+
+You can use [deleteAssets](../reference/apis/js-apis-photoAccessHelper.md#deleteassets) to move files to the trash.
+
+The files moved to the trash will be retained for 30 days, and deleted permanently after 30 days. Before a file is deleted permanently from the trash, the user can restore it using the system application **File Manager** or **Gallery**.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained
+- The application has the **ohos.permission.WRITE_IMAGEVIDEO** and **ohos.permission.READ_IMAGEVIDEO** permissions.
+
+Example: Move the first file in the result set to the trash.
+
+**How to Develop**
+
+1. Set the fetch options.
+2. Call **PhotoAccessHelper.getAssets** to obtain image assets.
+3. Call [**FetchResult.getFirstObject**](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image, that is, the image object to be moved to the trash.
+4. Call **deleteAssets** to move the file to the trash.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await fetchResult.getFirstObject();
+ console.info('getAssets fileAsset.uri : ' + fileAsset.uri);
+ await phAccessHelper.deleteAssets([fileAsset.uri]);
+ fetchResult.close();
+} catch (err) {
+ console.error('deleteAssets failed with err: ' + err);
+}
+```
diff --git a/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md b/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..7c98b2f674aba77a5359179e2a56b56819784eb1
--- /dev/null
+++ b/en/application-dev/file-management/photoAccessHelper-systemAlbum-guidelines.md
@@ -0,0 +1,306 @@
+# System Album Management
+
+The **photoAccessHelper** module provides APIs for managing system albums, including the **Favorites**, video album, and screenshot album.
+
+> **NOTE**
+>
+> Before you start, refer to [photoAccessHelper Overview](photoAccessHelper-overview.md) to learn how to obtain a **photoAccessHelper** instance and apply for permissions required.
+> By default, the **photoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **photoAccessHelper** APIs are used. If the code for obtaining the **photoAccessHelper** instance is not added, an error indicating that **photoAccessHelper** is not defined is reported.
+
+To ensure application running efficiency, most **photoAccessHelper** calls are asynchronous in callback or promise mode. The following code samples use promise-based APIs. For details about the APIs, see [Album Management](../reference/apis/js-apis-photoAccessHelper.md).
+Unless otherwise specified, all the media assets to be obtained in this document exist in the database. If no media asset is obtained when the sample code is executed, check whether the media assets exist in the database.
+
+## Favorites
+
+The **Favorites** is a system album. When you favorite a photo or video, the photo or video is added to **Favorites**. When you favorite a photo or video, the photo or video is removed from **Favorites**.
+
+### Obtaining a Favorites Object
+
+Use [getAlbums](../reference/apis/js-apis-photoAccessHelper.md#getalbums) to obtain a **Favorites** object.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+**How to Develop**
+
+1. Set the album type to **photoAccessHelper.AlbumType.SYSTEM** and the album subtype to **photoAccessHelper.AlbumSubtype.FAVORITE**.
+2. Call **getAlbums** to obtain a **Favorites** object.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE);
+ let album = await fetchResult.getFirstObject();
+ console.info('get favorite Album successfully, albumUri: ' + album.albumUri);
+ fetchResult.close();
+} catch (err) {
+ console.error('get favorite Album failed with err: ' + err);
+}
+```
+
+### Favoriting an Image or Video
+
+Use [setFavorite](../reference/apis/js-apis-photoAccessHelper.md#setfavorite) to add images or videos to **Favorites**.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Favorite an image.
+
+**How to Develop**
+
+1. [Obtain media assets](photoAccessHelper-resource-guidelines.md#obtaining-the-specified-media-assets).
+2. Set **favoriteState** to **true** to favorite the image.
+3. Use **FileAsset.setFavorite** to add the image to **Favorites**.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+predicates.equalTo(photoAccessHelper.ImageVideoKey.DISPLAY_NAME, 'test.jpg');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let photoFetchResult = await phAccessHelper.getAssets(fetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('getAssets fileAsset.displayName : ' + fileAsset.displayName);
+ let favoriteState = true;
+ await fileAsset.setFavorite(favoriteState);
+} catch (err) {
+ console.error('setFavorite failed with err: ' + err);
+}
+```
+
+### Obtaining Images and Videos in Favorites
+
+[Obtain a **Favorites** object](#obtaining-a-favorites-object), and call [Album.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets-2) to obtain the assets in **Favorites**.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+Example: Obtain an image from **Favorites**.
+
+**How to Develop**
+
+1. [Obtain a **Favorites** object](#obtaining-a-favorites-object).
+2. Set **fetchOptions** for obtaining the image.
+3. Call **Album.getAssets** to obtain the image assets.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the result set.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('get favorite Album successfully, albumUri: ' + album.albumUri);
+
+ let photoFetchResult = await album.getAssets(fetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('favorite album getAssets successfully, albumName: ' + fileAsset.displayName);
+ photoFetchResult.close();
+ albumFetchResult.close();
+} catch (err) {
+ console.error('favorite failed with err: ' + err);
+}
+```
+
+### Unfavoriting an Image or Video
+
+Use [setFavorite](../reference/apis/js-apis-photoAccessHelper.md#setfavorite) to remove an image or video from **Favorites**.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Unfavorite an image.
+
+**How to Develop**
+
+1. [Obtain the image and videos in **Favorites**](#obtaining-images-and-videos-in-favorites).
+2. Set **isFavorite** to **false**.
+3. Use **FileAsset.favorite** to remove the image from **Favorites**.
+
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.FAVORITE);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('get favorite Album successfully, albumUri: ' + album.albumUri);
+
+ let photoFetchResult = await album.getAssets(fetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('favorite album getAssets successfully, albumName: ' + fileAsset.displayName);
+ let favoriteState = false;
+ await fileAsset.setFavorite(favoriteState);
+ photoFetchResult.close();
+ albumFetchResult.close();
+} catch (err) {
+ console.error('setFavorite failed with err: ' + err);
+}
+```
+
+## Video Album
+
+The video album is a system album. The media assets of the video type in user files are automatically added to the video album.
+
+### Obtaining a Video Album Object
+
+Use [getAlbums](../reference/apis/js-apis-photoAccessHelper.md#getalbums) to obtain a video album object.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+**How to Develop**
+
+1. Set the album type to **photoAccessHelper.AlbumType.SYSTEM** and the album subtype to **photoAccessHelper.AlbumSubtype.VIDEO**.
+2. Use **getAlbums** to obtain the video album object.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.VIDEO);
+ let album = await fetchResult.getFirstObject();
+ console.info('get video Album successfully, albumUri: ' + album.albumUri);
+ fetchResult.close();
+} catch (err) {
+ console.error('get video Album failed with err: ' + err);
+}
+```
+
+### Obtaining Videos from the Video Album
+
+[Obtain a video album object](#obtaining-a-video-album-object). Use [Album.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets-2) to obtain video assets in the video album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+Example: Obtain a video in the video album.
+
+**How to Develop**
+
+1. [Obtain a video album object](#obtaining-a-video-album-object).
+2. Set **fetchOptions** for obtaining the video.
+3. Call **Album.getAssets** to obtain video assets.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first video.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.VIDEO);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('get video Album successfully, albumUri: ' + album.albumUri);
+
+ let videoFetchResult = await album.getAssets(fetchOptions);
+ let fileAsset = await videoFetchResult.getFirstObject();
+ console.info('video album getAssets successfully, albumName: ' + fileAsset.displayName);
+ videoFetchResult.close();
+ albumFetchResult.close();
+} catch (err) {
+ console.error('video failed with err: ' + err);
+}
+```
+
+## Screenshot Album
+
+The screenshot album is a system album. The user's screenshots and screen recording files are automatically added to this album.
+
+### Obtaining a Screenshot Album Object
+
+Use [getAlbums](../reference/apis/js-apis-photoAccessHelper.md#getalbums) to obtain a screenshot album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+**How to Develop**
+
+1. Set the album type to **photoAccessHelper.AlbumType.SYSTEM** and the album subtype to **photoAccessHelper.AlbumSubtype.SCREENSHOT**.
+2. Use **getAlbums** to obtain a screenshot album object.
+
+```ts
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.SCREENSHOT);
+ let album = await fetchResult.getFirstObject();
+ console.info('get screenshot Album successfully, albumUri: ' + album.albumUri);
+ fetchResult.close();
+} catch (err) {
+ console.error('get screenshot Album failed with err: ' + err);
+}
+```
+
+### Obtaining Media Assets in the Screenshot Album
+
+[Obtain a screenshot album object](#obtaining-a-screenshot-album-object), and call [Album.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets-2) to obtain the media assets in the album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+Example: Obtain a media asset from the screenshot album.
+
+**How to Develop**
+
+1. [Obtain a screenshot album object](#obtaining-a-screenshot-album-object).
+2. Set **fetchOptions** for obtaining the media asset.
+3. Call **Album.getAssets** to obtain media assets.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first media asset.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.SYSTEM, photoAccessHelper.AlbumSubtype.SCREENSHOT);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('get screenshot album successfully, albumUri: ' + album.albumUri);
+
+ let screenshotFetchResult = await album.getAssets(fetchOptions);
+ let fileAsset = await screenshotFetchResult.getFirstObject();
+ console.info('screenshot album getAssets successfully, albumName: ' + fileAsset.displayName);
+ screenshotFetchResult.close();
+ albumFetchResult.close();
+} catch (err) {
+ console.error('screenshot album failed with err: ' + err);
+}
+```
diff --git a/en/application-dev/file-management/photoAccessHelper-userAlbum-guidelines.md b/en/application-dev/file-management/photoAccessHelper-userAlbum-guidelines.md
new file mode 100644
index 0000000000000000000000000000000000000000..57bed20da0011c46f9172a87c121adc5f5c37f41
--- /dev/null
+++ b/en/application-dev/file-management/photoAccessHelper-userAlbum-guidelines.md
@@ -0,0 +1,329 @@
+# User Album Management
+
+The **photoAccessHelper** module provides APIs for user album management, including creating or deleting a user album, adding images and videos to a user album, and deleting image and videos from a user album.
+
+> **NOTE**
+>
+> Before you start, refer to [photoAccessHelper Overview](photoAccessHelper-overview.md) to learn how to obtain a **photoAccessHelper** instance and apply for permissions required.
+> By default, the **photoAccessHelper** instance obtained in [photoAccessHelper Overview](photoAccessHelper-overview.md) is used when **photoAccessHelper** APIs are used. If the code for obtaining the **photoAccessHelper** instance is not added, an error indicating that **photoAccessHelper** is not defined is reported.
+
+To ensure application running efficiency, most **PhotoAccessHelper** calls are asynchronous in callback or promise mode. The following code samples use promise-based APIs. For details about the APIs, see [Album Management](../reference/apis/js-apis-photoAccessHelper.md).
+Unless otherwise specified, all the media assets to be obtained in this document exist in the database. If no media asset is obtained when the sample code is executed, check whether the media assets exist in the database.
+
+## Creating a User Album
+
+Use [createAlbum](../reference/apis/js-apis-photoAccessHelper.md#createalbum) to create a user album.
+
+The album name must meet the following requirements:
+
+- The album name is a string of 1 to 255 characters.
+- The album name cannot contain any of the following characters:
\ / : * ? " ' ` < > | { } [ ]
+- The album name is case-insensitive.
+- Duplicate album names are not allowed.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.WRITE_IMAGEVIDEO** permission.
+
+Example: Create a user album.
+
+**How to Develop**
+
+1. Set the name of the album to create.
+2. Use **createAlbum** to create an album.
+
+```ts
+try {
+ let albumName = 'albumName';
+ let album = await phAccessHelper.createAlbum(albumName);
+ console.info('createAlbum successfully, album: ' + album.albumName + ' album uri: ' + album.albumUri);
+} catch (err) {
+ console.error('createAlbum failed with err: ' + err);
+}
+```
+
+## Obtaining a User Album
+
+Use [getAlbums](../reference/apis/js-apis-photoAccessHelper.md#getalbums) to obtain a user album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** permission.
+
+Example: Obtain a user album named **albumName**.
+
+**How to Develop**
+
+1. Set **fetchOptions** for obtaining the user album.
+2. Call **getAlbums** to obtain user albums.
+3. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first user album.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+predicates.equalTo(albumName, 'albumName');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, fetchOptions);
+ let album = await fetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ fetchResult.close();
+} catch (err) {
+ console.error('getAlbums failed with err: ' + err);
+}
+```
+
+## Renaming a User Album
+
+Modify the **Albums.albumName** attribute of the album,
+
+and use [Album.commitModify](../reference/apis/js-apis-photoAccessHelper.md#commitmodify-2) to update the modification to the database.
+
+Before renaming a user album, you need to obtain an album object. You can use the [FetchResult](../reference/apis/js-apis-photoAccessHelper.md#fetchresult) APIs to obtain the user album of the corresponding location.
+
+The new user album names must also comply with the user name requirements in [Creating a User Album](#creating-a-user-album).
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Rename an album named **albumName**.
+
+**How to Develop**
+
+1. Set **fetchOptions** for obtaining the user album.
+2. Call **getAlbums** to obtain user albums.
+3. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first user album.
+4. Set a new album name.
+5. Call **Album.commitModify** to update the modified album attributes to the database.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+predicates.equalTo(albumName, 'albumName');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, fetchOptions);
+ let album = await fetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ album.albumName = 'newAlbumName';
+ await album.commitModify();
+ fetchResult.close();
+} catch (err) {
+ console.error('commitModify failed with err: ' + err);
+}
+```
+
+## Adding Images and Videos to a User Album
+
+[Obtain a user album](#obtaining-a-user-album) and the array of the images or videos to be added to the album, and then call [Album.addAssets](../reference/apis/js-apis-photoAccessHelper.md#addassets) to add the images or videos to the user album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Add an image to the album named **albumName**.
+
+**How to Develop**
+
+1. Set **albumFetchOptions** for obtaining the user album.
+2. Set **photoFetchOptions** for obtaining the image.
+3. Call **getAlbums** to obtain user albums.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first user album.
+5. Call [PhotoAccessHelper.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets) to obtain image assets.
+6. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the result set.
+7. Call **Album.addAssets** to add the image to the user album.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let albumPredicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+albumPredicates.equalTo(albumName, 'albumName');
+let albumFetchOptions = {
+ fetchColumns: [],
+ predicates: albumPredicates
+};
+
+let photoPredicates = new dataSharePredicates.DataSharePredicates();
+let photoFetchOptions = {
+ fetchColumns: [],
+ predicates: photoPredicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, albumFetchOptions);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ let photoFetchResult = await phAccessHelper.getAssets(photoFetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('getAssets successfully, albumName: ' + fileAsset.displayName);
+ await album.addAssets([fileAsset]);
+ albumFetchResult.close();
+ photoFetchResult.close();
+} catch (err) {
+ console.error('addAssets failed with err: ' + err);
+}
+```
+
+## Obtaining Images and Videos in a User Album
+
+[Obtain the user album](#obtaining-a-user-album) object, and call [Album.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets-2) to obtain the media assets in the user album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Obtain an image in a user album named **albumName**.
+
+**How to Develop**
+
+1. Set **albumFetchOptions** for obtaining the user album.
+2. Set **photoFetchOptions** for obtaining the image.
+3. Call **getAlbums** to obtain user albums.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first user album.
+5. Call **Album.getAssets** to obtain the image assets in the user album.
+6. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the result set.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let albumPredicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+albumPredicates.equalTo(albumName, 'albumName');
+let albumFetchOptions = {
+ fetchColumns: [],
+ predicates: albumPredicates
+};
+
+let photoPredicates = new dataSharePredicates.DataSharePredicates();
+let photoFetchOptions = {
+ fetchColumns: [],
+ predicates: photoPredicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, albumFetchOptions);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ let photoFetchResult = await album.getAssets(photoFetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('album getAssets successfully, albumName: ' + fileAsset.displayName);
+ albumFetchResult.close();
+ photoFetchResult.close();
+} catch (err) {
+ console.error('album getAssets failed with err: ' + err);
+}
+```
+
+## Removing Images and Videos from a User Album
+
+[Obtain the user album](#obtaining-a-user-album) object, and call [Album.getAssets](../reference/apis/js-apis-photoAccessHelper.md#getassets-2) to obtain the media assets in the user album.
+
+Use [Album.removeAssets](../reference/apis/js-apis-photoAccessHelper.md#removeassets) to remove the specified images.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Remove an image from the album named **albumName**.
+
+**How to Develop**
+
+1. Set **albumFetchOptions** for obtaining the user album.
+2. Set **photoFetchOptions** for obtaining the image.
+3. Call **getAlbums** to obtain user albums.
+4. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first user album.
+5. Call **Album.getAssets** to obtain the image assets.
+6. Call [FetchResult.getFirstObject](../reference/apis/js-apis-photoAccessHelper.md#getfirstobject) to obtain the first image from the result set.
+7. Call **Album.removeAssets** to remove the image from the user album.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let albumPredicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+albumPredicates.equalTo(albumName, 'albumName');
+let albumFetchOptions = {
+ fetchColumns: [],
+ predicates: albumPredicates
+};
+
+let photoPredicates = new dataSharePredicates.DataSharePredicates();
+let photoFetchOptions = {
+ fetchColumns: [],
+ predicates: photoPredicates
+};
+
+try {
+ let albumFetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, albumFetchOptions);
+ let album = await albumFetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ let photoFetchResult = await album.getAssets(photoFetchOptions);
+ let fileAsset = await photoFetchResult.getFirstObject();
+ console.info('album getAssets successfully, albumName: ' + fileAsset.displayName);
+ await album.removeAssets([fileAsset]);
+ albumFetchResult.close();
+ photoFetchResult.close();
+} catch (err) {
+ console.error('removeAssets failed with err: ' + err);
+}
+```
+
+## Deleting a User Album
+
+[Obtain the user album](#obtaining-a-user-album) object, and call [deleteAlbums](../reference/apis/js-apis-photoAccessHelper.md#deletealbums) to delete the user album.
+
+**Prerequisites**
+
+- A **photoAccessHelper** instance is obtained.
+- The application has the **ohos.permission.READ_IMAGEVIDEO** and **ohos.permission.WRITE_IMAGEVIDEO** permissions.
+
+Example: Delete a user album named **albumName**.
+
+**How to Develop**
+
+1. Set **fetchOptions** for obtaining the user album.
+2. Call **getAlbums** to obtain user albums.
+3. Call **FetchResult.getFirstObject** to obtain the first user album.
+4. Call **deleteAlbums** to delete the user album.
+
+```ts
+import dataSharePredicates from '@ohos.data.dataSharePredicates';
+
+let predicates = new dataSharePredicates.DataSharePredicates();
+let albumName = photoAccessHelper.AlbumKey.ALBUM_NAME;
+predicates.equalTo(albumName, '%albumName%');
+let fetchOptions = {
+ fetchColumns: [],
+ predicates: predicates
+};
+
+try {
+ let fetchResult = await phAccessHelper.getAlbums(photoAccessHelper.AlbumType.USER, photoAccessHelper.AlbumSubtype.USER_GENERIC, fetchOptions);
+ let album = await fetchResult.getFirstObject();
+ console.info('getAlbums successfully, albumName: ' + album.albumName);
+ phAccessHelper.deleteAlbums([album]);
+ fetchResult.close();
+} catch (err) {
+ console.error('deleteAlbums failed with err: ' + err);
+}
+```