Search code examples
javaandroidwebrtcagora.iosleep-mode

Agora voice call stops audio after 1 minute of lock screen


I have implemented agora voice call in my application. Its working fine on older devices and tabs but on new devices after locking the screen for 1 minute the receiver cannot hear audio. I guess android system puts the app in sleep mode.

I have tried to use WAKE_LOCK to keep the app alive but no success. Can anyone help me in this? What i need to do?

Thanks.


Solution

  • I resolved the issue by using foreground service. Now the systems prevents app from going into the sleep mode and voice issue is also resolved.