You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Required to get audio in background when using Android 11
52
+
foregroundService: {
53
+
channelId:'com.company.my',
54
+
channelName:'Foreground service for my app',
55
+
notificationTitle:'My app is running on background',
56
+
notiticationIcon:'Path to the resource icon of the notification',
57
+
},
51
58
}
52
59
};
53
60
@@ -124,6 +131,21 @@ Eg: When your used log out (or the connection to your server is broken, etc..),
124
131
RNCallKeep.setAvailable(true);
125
132
```
126
133
134
+
### setForegroundServiceSettings
135
+
_This feature is available only on Android._
136
+
137
+
Configures the [Foreground Service](https://developer.android.com/about/versions/11/privacy/foreground-services) used for Android 11 to get microphone access on background.
138
+
Similar to set the `foregroundService` key in the `setup()` method.
139
+
140
+
```js
141
+
RNCallKeep.setForegroundServiceSettings({
142
+
channelId:'com.company.my',
143
+
channelName:'Foreground service for my app',
144
+
notificationTitle:'My app is running on background',
145
+
notiticationIcon:'Path to the resource icon of the notification',
146
+
});
147
+
```
148
+
127
149
### canMakeMultipleCalls
128
150
_This feature is available only on Android._
129
151
@@ -805,6 +827,12 @@ Since iOS 13, you'll have to report the incoming calls that wakes up your applic
805
827
}
806
828
```
807
829
830
+
## Android 11
831
+
832
+
Since Android 11, your application [requires to start a foregroundService](https://developer.android.com/about/versions/11/privacy/foreground-services) in order to access the microphone in background.
833
+
834
+
You have to set the `foregroundService` key in the [`setup()`](#setup) method and add a `foregroundServiceType` in the [`AndroidManifest` file](docs/android-installation.md#android-common-step-installation).
0 commit comments