endmr11 / ed_screen_recorder

Screen recorder plugin for Flutter. Supports IOS and Android devices.
MIT License
26 stars 34 forks source link

android 13+ can't record #98

Open yeagle2468 opened 3 months ago

yeagle2468 commented 3 months ago

"storage" permissions always returns "denied" on Android 13+, but the code in EdScreenRecorderPlugin.java below :

if (ContextCompat.checkSelfPermission(flutterPluginBinding.getApplicationContext(), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {

                    ActivityCompat.requestPermissions(activity,
                            new String[]{ Manifest.permission.WRITE_EXTERNAL_STORAGE},
                            444);
                } else {
                    mediaPermission = true;
                }
                if (micPermission && mediaPermission) {
                    success = startRecordingScreen();
                }

means mediaPermission is always false Android 13+

Demirzekk commented 3 months ago

How to resolve this issue?