Locking Camera Orientation (LCO)

Hello guys, still around the topic of Scriptshit, the story in my project is that there is a camera feature to take pictures of infrastructure damage. Well, to put it simply, I don't want the picture to be messy on the server later, so I want all the data to be in portrait position, therefore I need to limit the orientation of the camera feature of my Scriptshit application. Now, the problem is how do I do that? and how do I avoid errors when there are users who are nosy or stubborn about rotating their devices?

Okay, here's how.

You need to add a special permission in the manifest:

<uses-feature android:name="android.hardware.screen.portrait" />

So your device/app only supports portrait orientation (this is limited to your app only, not applicable in other apps). But it doesn't mean if your app supports both orientations then you declare both, NO, NO, NO, you don't need to do that, just if you want one of them, if it supports both orientations, then you don't need to declare that special permission.

If you want to learn more about this, please read the documentation yourself  HERE .


Post a Comment

Previous Next

نموذج الاتصال