Closed AKAlahmed closed 6 months ago
Hello @ameen95195 Thank you for providing information. For Android 14, it must specify the appropriate foreground service. More detailed information can be found at this link.
The QuickBlox Flutter SDK sets the microphone and camera types for the call foreground service. The QB.webrtc.init() method starts the call foreground service, so camera and microphone runtime permissions, must be granted before calling the QB.webrtc.init() method.
To request runtime permissions you can use the third-party library permission_handler. An example of requesting runtime permissions for a camera and microphone using the permission_handler library:
Future<bool> checkPermissionsForCall() async {
bool cameraDenied = await Permission.camera.status.isDenied;
bool microphoneDenied = await Permission.microphone.status.isDenied;
bool isAllPermissionsGranted = true;
if (cameraDenied || microphoneDenied) {
Map<Permission, PermissionStatus> statuses = await [Permission.camera, Permission.microphone].request();
statuses.forEach((key, value) {
if (value == PermissionStatus.denied || value == PermissionStatus.permanentlyDenied) {
isAllPermissionsGranted = false;
return;
}
});
}
return isAllPermissionsGranted;
}
Hi @vdovbnya-qb thank you for your answer, I appreciate it. The problem was solved when I updated the QB SDK to
quickblox_sdk: ^0.15.0-rc.1
My app behavior is not allowing me to request camera and mic permissions at the start until it receives a call or starts a call
Hi @ameen95195 The version 0.15.0-rc.1 is a release candidate but is not a successful release. Please don't forget to update to version 0.15.0 when it will be released.
@kirillTolmachev Thank you very much, I will.
Hi, I have an error when init WebRTC on Android 14 It requires the mic permission. I need to init WebRTC to prepare for incoming call listeners, so I can't request the mic at the start of the app. this error happens in Android 14 only
here is the error message tree (error trigger when calling "QB.webrtc.init()"):