Display management is responsible for managing various types of displays on a device, including physical, virtual, and foldable displays. It manages their properties and acts as a publisher, broadcasting display-related events and information to subscribed services that require display information.
Display management includes the following capabilities:
- Obtaining the display properties, such as resolution, physical pixel density, and dimensions.
- Listening for various display events, including rotation, resolution changes, refresh rate changes, and folding state changes.
- Creating and using virtual screens. This capability is available only for system applications.
For details about how to obtain display properties and listen for status changes, see Using OH_DisplayManager to Obtain Basic Display Information and Listen for Status Changes (C/C++) and Using Display to Obtain Display Properties and Listen for Status Changes (ArkTS).
Constraints
- The Display and Screen APIs must be used in the system that supports the SystemCapability.Window.SessionManager capability. For details, see SystemCapability.
- In multi-display implementation, the Screen API is available only for system applications, and certain APIs require the ohos.permission.CAPTURE_SCREEN permission.