• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Introduction to Media Library Kit
2
3Media Library Kit provides the capabilities of managing albums and media files, including images and videos, to enable your application to quickly display images and play back videos.
4
5## Available Capabilities
6
7With Media Library Kit, you can manage albums and media files, including creating albums and accessing and modifying media assets in albums. The following capabilities are available to third-party applications:
8
9- [Media asset management](photoAccessHelper-resource-guidelines.md), including:
10  - Obtaining media assets (images and videos)
11  - Obtaining image and video thumbnails
12  - Creating a media asset (using a security component)
13  - Renaming a media asset
14- [User album management](photoAccessHelper-userAlbum-guidelines.md), including:
15  - Obtaining a user album
16  - Renaming a user album
17  - Adding images and videos to a user album.
18  - Obtaining images and videos from a user album
19  - Removing images and videos from a user album
20- [Management of system albums](photoAccessHelper-systemAlbum-guidelines.md), including:
21  - Favorites
22  - Video album
23- [Change notifications of images, videos, and albums](photoAccessHelper-notify-guidelines.md), including:
24  - Registering listening for the specified URI
25  - Unregistering the listening for the specified URI
26
27The following capabilities are available to system applications:
28
29- Media asset operations, including:
30  - Creating a media asset
31  - Moving a media asset to the trash
32  - Deleting a media asset permanently
33
34- Album-related operations, including:
35  - Creating a user album
36  - Deleting a user album
37  - Hiding an album
38  - Favoriting and unfavoriting an album
39  - Using the Screenshots album
40
41## Features
42
43- Simple and efficient development thanks to object-based API design.
44- Integrated device-cloud access management.
45- Precise security control and automatic authorization with Pickers and security component \<**SaveButton**>.
46- Intelligent format conversion completed at the framework layer in a unified manner.
47
48## Working Principles
49
50The media library receives requests for obtaining or changing media assets from users, verifies the request validity and permissions, interacts with the database if the verification is successful, and returns the result.
51
52## Constraints
53
54User personal data is involved in the **photoAccessHelper** module. Therefore, the application needs to apply for the related read and write permissions from the user.
55Before requesting permissions, ensure that the [basic principles for using permissions](../security/AccessToken/app-permission-mgmt-overview.md#basic-principles-for-using-permissions) are met. The following permissions are required. For details about how to request user authorization, see [Requesting User Authorization](../security/AccessToken/request-user-authorization.md).
56
57| Permission                        | Description                                      | Authorization Mode  |
58| ------------------------------ | ------------------------------------------ | ---------- |
59| ohos.permission.READ_IMAGEVIDEO     | Allows an application to read image and video file information from a user's external storage.| user_grant |
60| ohos.permission.WRITE_IMAGEVIDEO    | Allows an application to read and write image and video file information on a user's external storage.| user_grant |
61