Interface StreamPermissionCheck
-
- All Implemented Interfaces:
public interface StreamPermissionCheckAndroid permission check for Call Depending on the call capabilities, checkAndroidPermissions will return true if all the android permissions are granted required by the call. By default having a capability to stream audio for an audio call will require the android.Manifest.permission.RECORD_AUDIO permission. This check ensures that the required permission based on the call configuration are granted.
The default implementation checks for two permissions:
android.Manifest.permission.RECORD_AUDIO if the call has org.openapitools.client.models.OwnCapability.SendAudio capability
and
android.Manifest.permission.CAMERA if the call has org.openapitools.client.models.OwnCapability.SendVideo capability.
This means that editing the configuration of the call has effect on which permissions are checked. It is possible to provide a separate implementation to this interface to override this behavior.
NOTE: If the io.getstream.video.android.core.StreamVideoBuilder.runForegroundServiceForCalls is true the foreground service that starts will crash if checkAndroidPermissions returns false.
-
-
Method Summary
Modifier and Type Method Description abstract BooleancheckAndroidPermissions(Context context, Call call)Return true if the user granted all the permissions so the Call can run. -
-
Method Detail
-
checkAndroidPermissions
abstract Boolean checkAndroidPermissions(Context context, Call call)
Return true if the user granted all the permissions so the Call can run.
e.g. if the user granted the android.Manifest.permission.RECORD_AUDIO and the Call.state.ownCapability has "SendAudio" then we are safe to join and use the call since the permission for recording audio is granted and the user can stream the audio track.
-
-
-
-