การแชร์หน้าจอแอป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การฉายสื่อใน Android ช่วยให้ผู้ใช้แชร์จอแสดงผลของอุปกรณ์กับผู้ใช้รายอื่นได้ ใน Android 14 QPR2 ผู้ใช้จะแชร์หรือบันทึกหน้าต่างแอปแทนทั้งหน้าจอของอุปกรณ์ได้
การแชร์หน้าจอแอปจะช่วยเพิ่มความเป็นส่วนตัว ปรับปรุงประสิทธิภาพการทำงานของผู้ใช้ และเพิ่มความสามารถในการทำงานหลายอย่างพร้อมกันด้วยการอนุญาตให้ผู้ใช้เรียกใช้แอปหลายแอป แต่จำกัดการแชร์เนื้อหาไว้ที่แอปเดียว
การแชร์หน้าจอแอปจะไม่รวมแถบสถานะ แถบนำทาง การแจ้งเตือน และองค์ประกอบ UI อื่นๆ ของระบบไว้ในจอแสดงผลที่แชร์ ระบบจะแชร์เฉพาะเนื้อหาของแอปที่เลือก
แอปที่ใช้ API ของ MediaProjection
จะแชร์หน้าจอแอปได้โดยอัตโนมัติ อย่างไรก็ตาม ให้ทดสอบแอปเพื่อให้แน่ใจว่าการแชร์หน้าจอแอปทำงานตามที่ต้องการ
Android 14 (API ระดับ 34) ได้เพิ่มเมธอดการเรียกกลับการฉายสื่อต่อไปนี้ ซึ่งช่วยให้คุณปรับแต่งการแชร์หน้าจอแอปได้
ใช้วิธีการใหม่เพื่อปรับปรุงประสบการณ์ของผู้ใช้ในการแชร์หน้าจอแอป
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-21 UTC
[null,null,["อัปเดตล่าสุด 2025-08-21 UTC"],[],[],null,["# App screen sharing\n\nMedia 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."]]