兼容Android13 连麦权限问题

This commit is contained in:
zlzw 2023-08-29 09:54:21 +08:00
parent 9360e5438c
commit 8e19ddcc99

View File

@ -7,6 +7,7 @@ import android.app.Dialog;
import android.content.Context;
import android.graphics.Color;
import android.media.AudioManager;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
@ -696,11 +697,20 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
.setClickCallback(new DialogUitl.SimpleCallback() {
@Override
public void onConfirmClick(Dialog dialog, String content) {
LiveAudienceActivity.mProcessResultUtil.requestPermissions(new String[]{
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.RECORD_AUDIO
}, new Runnable() {
String[] permissions;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
permissions=new String[]{
Manifest.permission.READ_MEDIA_IMAGES,
Manifest.permission.RECORD_AUDIO
};
}else{
permissions=new String[]{
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.RECORD_AUDIO
};
}
LiveAudienceActivity.mProcessResultUtil.requestPermissions(permissions, new Runnable() {
@Override
public void run() {
UsertoRY();