OK, I think I have / understand all that.
Latest version: of B4A or of Camera2 library?
BTW, where do I download updated (if any) Camera2 library?
Based on B4XPages - yes, like I said, I used the example, which is based on B4XPages, right ?!
Orientation must be locked - you mean #SupportedOrientations: portrait or landscape and NOT unspecified ?
But, in that case, images and videos are NOT automatically rotated.
For images I have found a workaround:
- #SupportedOrientations: portrait
- detect phone orientation using sensors, rotate image, save.
For videos, like I said, I cannot process again after original video is saved.
I tried this for video, but it has no effect.
Instead of this (original code):
MediaRecorder.RunMethod("setOrientationHint", Array(GetHintOrientation))
I put this - always roatte video, no matter what phone actual orientation is
Dim orr As Int = 90
MediaRecorder.RunMethod("setOrientationHint", Array(orr))
It does not work, video is either rotated according to phone orientation or not rotated at all.