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

1.2k Views Asked by At

In my app which was Targeting to Android API 28, screen sharing via. Webrtc was working fine.

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.

Any help or guidance will be well appreciated.

1

There are 1 best solutions below

0
On

As suggested in Webrtc Group, I have added only below line of code in my Foreground Service in AndroidManifest.xml and it worked like a charm.

android:foregroundServiceType="mediaProjection"