diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml
index c3b0b6a04..57c1fe42e 100644
--- a/example/android/app/src/main/AndroidManifest.xml
+++ b/example/android/app/src/main/AndroidManifest.xml
@@ -2,6 +2,9 @@
package="io.agora.agora_rtc_ng_example">
+
+
+
= Build.VERSION_CODES.R) {
+ startForeground(
+ NOTIFICATION_ID_DAEMON_SERVICE,
+ notificationBuilder.build(),
+ ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE xor ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK)
+ } else {
+ startForeground(NOTIFICATION_ID_DAEMON_SERVICE, notificationBuilder.build())
+ }
}
private fun getContentIntent(): PendingIntent? {