-
Notifications
You must be signed in to change notification settings - Fork 2
Permissions
The permissions included in the SDK's manifest with the dangerous
protection level are as follows:
These permissions need to be requested at runtime inside your application.
On Android 12 or higher,
the BLUETOOTH_CONNECT
permission is required to use bluetooth audio devices. The permission must be granted before making a call. There is no
need to request this permission on Android 11 or lower.
To request these permissions, you can use the following code:
public class MainActivity {
private void requestPermissions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (permissionNotGranted(BLUETOOTH_CONNECT) || permissionNotGranted(RECORD_AUDIO) || permissionNotGranted(CAMERA)) {
ActivityCompat.requestPermissions(this, new String[]{
RECORD_AUDIO,
CAMERA,
BLUETOOTH_CONNECT
}, 200);
}
} else {
if (permissionNotGranted(RECORD_AUDIO) || permissionNotGranted(CAMERA)) {
ActivityCompat.requestPermissions(this, new String[]{
RECORD_AUDIO,
CAMERA
}, 200);
}
}
}
private boolean permissionNotGranted(String permission) {
return ContextCompat.checkSelfPermission(this, permission) != PERMISSION_GRANTED;
}
}
If you would like a more detailed explanation about requesting runtime permissions in Android, you can visit the following link: Requesting Permissions.
Additionally, the SDK's manifest includes permissions with the normal
protection level, which are as follows:
These permissions are automatically granted to the SDK and do not require additional runtime checks or requests.