Search code examples
javaandroidscanning

How to set camera orientation locked to portrait on android


I'm building a scanner app using this scan library, how do I set the orientation in the library code to set the camera orientation locked to portrait? I've tried Lock Camera orientation to portrait and setting camera orientation to portrait not working


Solution

  • Don't use third party libs

    https://developer.android.com/guide/topics/media/camera

    You can use the official android docs to learn how to use and then apply what you got from the other links. If you want to edit and crop you cand find more information in those links:

    How to crop and rotate image programmatically in android?

    Android: Edit image intent