アプリの画面共有
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android のメディア プロジェクションを使用すると、ユーザーはデバイスのディスプレイを他のユーザーと共有できます。Android 14 QPR2 では、デバイスの画面全体ではなく、アプリのウィンドウを共有または録画できます。
アプリの画面共有により、ユーザーは複数のアプリを実行しながら、コンテンツの共有を 1 つのアプリに制限できるため、プライバシーが強化され、ユーザーの生産性が向上し、マルチタスクが強化されます。
アプリの画面共有では、ステータスバー、ナビゲーション バー、通知、その他のシステム UI 要素は共有ディスプレイから除外されます。選択したアプリのコンテンツのみが共有されます。
MediaProjection
API を使用するアプリは、アプリの画面共有を自動的に行うことができます。ただし、アプリの画面共有が想定どおりに動作することを確認するために、アプリをテストしてください。
Android 14(API レベル 34)では、アプリの画面共有をカスタマイズできるメディア プロジェクション コールバック メソッドが追加されました。
新しいメソッドを使用して、アプリの画面共有のユーザー エクスペリエンスを向上させます。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-08-27 UTC。
[null,null,["最終更新日 2025-08-27 UTC。"],[],[],null,["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.\n\nApp 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.\n\nWith app 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.\n\nApps that use the [`MediaProjection`](/reference/kotlin/android/media/projection/MediaProjection) APIs are capable of app screen sharing automatically. However, test your app to ensure app screen sharing works as intended.\n\n`MediaProjection` callbacks\n\nAndroid 14 (API level 34) added the following media projection callback methods which enable you to customize app screen sharing:\n\n- [**`MediaProjection.Callback#onCapturedContentResize()`**](/reference/kotlin/android/media/projection/MediaProjection.Callback#oncapturedcontentresize)\n\n Enables resizing of the shared projection based on the size of the captured display area.\n- [**`MediaProjection.Callback#onCapturedContentVisibilityChanged()`**](/reference/kotlin/android/media/projection/MediaProjection.Callback#oncapturedcontentvisibilitychanged)\n\n 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.\n\nUse the new methods to enhance the app screen sharing user experience."]]