Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

CameraView fix rotating on Android #1961

Conversation

MFinkBK
Copy link
Contributor

@MFinkBK MFinkBK commented Apr 21, 2023

Description of Bug

On Android, the camera activity is correctly rotated, but the resulting image isn't rotated according to the current device orientation. Instead the rotation angle is passed to the event RaiseMediaCaptured. The PR takes the changes from @jfversluis from PR #1871, which already does the image rotation, and passes rotation angle 0 to RaiseMediaCaptured in order to be compatible with potentially existing rotation code on user's side.

Note that this change targets the droid-cameraview-rotation branch that @jfversluis already has done the main work, per PR #1871.

Issues Fixed

Behavioral Changes

There should be no changes, since the photo now has been rotated already and the new rotation angle 0 is passed to the user.

PR Checklist

  • Has a linked Issue, and the Issue has been approved
  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation

…n order to be compatible with potentially existing rotation code on user's side
@bijington
Copy link
Contributor

I will defer to @jfversluis on this as I am not sure I fully understand the implications of not providing the rotation in this way

@MFinkBK
Copy link
Contributor Author

MFinkBK commented Jul 10, 2023

@jfversluis I just fixed a bug where OnPhoto() was never called in cases where the rotation angle was 0. The changes in these PR are already live in a production app that is using our forked repo. I would be glad if this fix could go into the official repository, too. Thanks!

@jfversluis
Copy link
Member

Now that we're so close to the sunsetting of Xamarin (and therefore also Xamarin Community Toolkit) unfortunately we won't be able to take this in anymore, we're really sorry about that. Nevertheless, thank you so much for your time and effort that you have put into this PR, we really appreciate it.

Please have a look at the evolution of the Xamarin Community Toolkit, The .NET MAUI Community Toolkit. A lot of development has been going on there. Hopefully this issue was already fixed in that codebase. If not, feel free to port this over to there.

Again, thank you so much for being a contributor and Xamarin user!

@jfversluis jfversluis closed this Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants