Android Question B4X camera intent based - Landscape mode not works only in Samsung S20 and A53 Android 12

rogeriosca

Member
Licensed User
Longtime User
Hi all!

Testing the sample project, without change anything:

If I click the button to launch the camera intent, take a portrait photo, and click "Done" to return, the app works fine and displays the new photo in an image preview.
However, if I click the button to open the camera intent and change the orientation to landscape, then click done to return, the app crashes and I can't debug.
This problem only occurs on Samsung S20 and A53 models, both with android 12.
I tested it with other models like Samsung S9 android 11, POCO X3 android 12 and this sample works perfectly.

Can someone help me?
Thanks!
 
Solution
Hi all!
After some searching on stackoverflow , the solution was add this line on manifest:
SetActivityAttribute( Main, android:configChanges, "keyboard|keyboardHidden|screenLayout|screenSize|orientation")

Thanks!

rogeriosca

Member
Licensed User
Longtime User
Hi all!
After some searching on stackoverflow , the solution was add this line on manifest:
SetActivityAttribute( Main, android:configChanges, "keyboard|keyboardHidden|screenLayout|screenSize|orientation")

Thanks!
 
Upvote 0
Solution
Top