janusw / Camera.Maui

A CameraView Control for .NET Maui
MIT License
18 stars 3 forks source link

Not recording on Android API 34 #2

Closed rdurish closed 8 months ago

rdurish commented 8 months ago

Access Denied Error is thrown on start recording.

rdurish commented 8 months ago

@janusw pushed fix for this for your review.

janusw commented 8 months ago

Trying to reproduce this Android recording issue, I tried it with the Camera.MAUI.Test app on two devices (none of which worked) ...

This confirms that there is a problem on Android 14. @rdurish Did you find an Android version where the recording works?

rdurish commented 8 months ago

@janusw It works on android 11 API 30, I don't have access to android 8 to confirm atm

janusw commented 8 months ago

@janusw It works on android 11 API 30

Good to hear :+1:

I don't have access to android 8 to confirm atm

Nevermind, I just wanted to know if there is any version that works. Thanks for the feedback.

janusw commented 8 months ago

Fixed via #4 in release 1.4.6.

janusw commented 8 months ago

@janusw It works on android 11 API 30

On second thought, I'm a bit surprised that you say it works on Android 11: The fix was to request Permissions.Media, which was apparently introduced in Android 10, see https://developer.android.com/training/data-storage/shared/media#media-location-permission.

In any case, there is a report about problems with API 33 (https://github.com/hjam40/Camera.MAUI/issues/130), which probably has the same cause as this one.

janusw commented 8 months ago

@janusw It works on android 11 API 30

On second thought, I'm a bit surprised that you say it works on Android 11

This comment suggests that Android 11 was not working with version 1.4.4: https://github.com/hjam40/Camera.MAUI/issues/104#issuecomment-1913965087

@rdurish Probably I got you wrong, and you were actually saying that it works on Android 11 with your fix?

rdurish commented 8 months ago

Correct.

janusw commented 8 months ago

Correct.

Thanks for the clarification!

So, for the record: The original problem (with v1.4.4 and v1.4.5) probably affects Android version 10 and above (API 29+). v1.4.6 should hopefully work on all reasonably recent Android versions now. It was verified on Android 11 and 14 by the two of us :)

I'm not sure if anyone actually cares about the Android 8 problem I mentioned above ...?