Search code examples
agora.io

Is Agora.io able to listen in the background?


Assuming I integrate Agora in my website (PC + mobile hybrid app that wraps a mobile-web site). Will it be able to listen for users joining a channel while the client is not browsing the website? Meaning, can it work inside a service worker on both PC and mobile?

I need a reliable way to have voice calls between users on my web application even when they are not using the website.


Solution

  • If you create a WebView or just open an iframe of the website then the user's video is turned off when the app is closed even if the microphone permissions are off.

    The user is still on call and can track people joining but as soon as you close the browser, your video stream disappears for the other users.

    To have background based workflow, I recommend you use the native SDKs for the app as well as desktop applications and implement them with the same App Id to maintain consistency.

    An alternative solution is to use the RTM SDK as the RTM SDK allows you to send messages even in the background if the user is logged in and has joined the channel.