Display Management Overview
Display management is centered around the oversight of a device's displays, which includes physical, virtual, and foldable displays. It involves managing their properties and serving as a broadcaster to relay monitored information to services that have subscribed to 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). For details about how to use virtual screens, see Creating and Using a Virtual Screen (ArkTS) (for System Applications Only).
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.