endmr11 / ed_screen_recorder

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

Can't start record in android 13 #95

Closed chungdk-uzu closed 10 months ago

chungdk-uzu commented 10 months ago

I think there is some problem with saving the video record. I am saving to the following path: "/storage/emulated/0/Download". However, I get an error when startingRecord and no specific error is logged.

flutter doctor [✓] Flutter (Channel stable, 3.10.4, on macOS 13.5.1 22G90 darwin-arm64, locale en-VN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.3) [✓] Connected device (3 available) [✓] Network resources

lescalona1976 commented 10 months ago

I have that same problem with Android 13, I think it has to do with permissions, Android 13 separates the permissions for videos, photos and audio in API 33 with the declarations in the manifest

Anyone with more suggestions? Eren, we appreciate your support...

I personally don't know how to do it...

Thank you!

chungdk-uzu commented 10 months ago

I also think so. However, even after granting READ_MEDIA_IMAGE, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO and even MANAGER_EXTERNAL_STORAGE permissions, I still get the error of not being able to save the video record.

lescalona1976 commented 10 months ago

Yes, the same happens with my app.

Anyone with any suggestions?

Thanks in advance!

chungdk-uzu commented 10 months ago

Hello @lescalona1976 I have solved this problem. However, this requires me to fix the problem from the ed_screen_recorder and HBRecorder libraries I will update the fixes if you still need them

lescalona1976 commented 10 months ago

Hello @chungdk-uzu

Great, I really appreciate your support...

Thanks again.

chungdk-uzu commented 10 months ago

@lescalona1976 please check this response : https://github.com/Sakeshioyaki/ed_screen_recorder

` <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:ignore="ScopedStorage" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" android:maxSdkVersion="32" tools:ignore="ScopedStorage" />

<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

`

lescalona1976 commented 10 months ago

Hello @chungdk-uzu

Excellent, it worked perfectly... Thank you very much for the help. I was stuck on that problem for a long time...

Thanks again!

jihanga commented 10 months ago

Your repository works very well. Thank you so much. But in the process of adding lib to the flutter

ed_screen_recorder: 
  path: packages/ed_screen_recorder

instead of doing

ed_screen_recorder:
  git : "https://github.com/Sakeshioyaki/ed_screen_recorder"

It's even better that doing it doesn't have to bring the whole code, what do you think