Media projection on Android enables users to share their device display with other users. On Android 14 QPR2, users can share or record an app window rather than the entire device screen.
Partial screen sharing increases privacy, improves user productivity, and enhances multitasking by enabling users to run multiple apps but restrict content sharing to a single app.
With partial screen sharing, the status bar, navigation bar, notifications, and other system UI elements are excluded from the shared display. Only the content of the selected app is shared.
Apps that use the
MediaProjection APIs are capable of partial screen sharing automatically. However, test your app to ensure partial screen sharing works as intended.
Android 14 (API level 34) added the following media projection callback methods which enable you to customize partial screen sharing:
Enables resizing of the shared projection based on the size of the captured display area.
Informs the shared projection host app of the visibility of the capture content. The host app can show or hide the captured content on the output surface based on whether the captured region is visible to the user. For example, in multi‑window mode, if another app completely covers the shared app, the host can hide the shared app on the output surface.
Use the new methods to enhance the partial screen sharing user experience.