setupForegroundService static method
Ensures foreground service is running to support receiving microphone input when application is in background.
Does nothing on non-Android operating systems.
Implementation
static Future<void> setupForegroundService() async {
if (!PlatformUtils.isAndroid) {
return;
}
await webrtc.setupForegroundService(
webrtc.ForegroundServiceConfig(
enabled: true,
notificationText: 'Call',
notificationOngoing: true,
),
);
}