简体   繁体   English

Webrtc Android:屏幕共享在 API 29 (Android 10) 上停止工作

[英]Webrtc Android: Screen Sharing stopped working on API 29 (Android 10)

In my app which was Targeting to Android API 28, screen sharing via.在我针对 Android API 28 的应用程序中,通过屏幕共享。 Webrtc was working fine. Webrtc 工作正常。

As per recent Google Guidelines(deadline for Target API 29 task is Nov 2, 2020), today I have changed the targetSdkVersion and compileSdkVersion to Android API 29 and in turn, screen sharing stopped working.根据最近的 Google 指南(Target API 29 任务的截止日期为 2020 年 11 月 2 日),今天我已将targetSdkVersioncompileSdkVersion更改为Android API 29 ,反过来,屏幕共享停止工作。

Any help or guidance will be well appreciated.任何帮助或指导将不胜感激。

正如在Webrtc Group 中所建议的,我在 AndroidManifest.xml 的前台服务中仅添加了以下代码行,它的工作原理非常棒

android:foregroundServiceType="mediaProjection"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM