3

Based on the AppRTC example I can only share the whole screen on Android, not only my own app 1. That is, when my app goes to background the screen sharing does not pause, instead, the other app is shared for example.

Is there a way to only capture a screen of a particular my own app?

Ostap Maliuvanchuk
  • 1,125
  • 2
  • 12
  • 32
  • Have you found a solution yet? I've been struggling for quite a while now – Jaswant Singh Oct 03 '20 at 19:47
  • 1
    The solution that we found was to observe the app lifecycle and when the app goes to the background then the screen-sharing streams are paused. And the streams are resumed when the app goes to the foreground. I am not sure if things have changed since then and if there is a better way to do this. – Ostap Maliuvanchuk Oct 05 '20 at 06:10
  • @OstapMaliuvanchuk hey, can you share the code of how to switch between screen sharing and camera feed and vice versa? – Vijay E Aug 07 '21 at 06:03

1 Answers1

2

Yes you can. There is already native SDKs that can capture the screen and publish with WebRTC.

Ant Media Server’s Android native SDK framework can do this.

Maahi Bhat
  • 191
  • 12
  • 1
    My question is about capturing and sharing only one app vs sharing the whole screen, not about if screen sharing via WebRTC is possible (which I know it is). – Ostap Maliuvanchuk Feb 25 '19 at 10:36
  • Hi @Maahi Can you post some code here how to switch between camera and screen sharing using Antmedia? on android. Couldn't get this piece of code. – Vijay E Aug 07 '21 at 06:04