Skip to content

xCamera windows appears tilted by -90 degrees #33

Open
@shoumikdas

Description

Hi, I have managed to integrate xCamera in my Kivy app for Android use the recommended requirements and code examples. The app is launching fine and able to take photographs. I initialized the XCamera object in Kivy instead of Python. One thing I noticed is that we have to let the camera auto-focus for a couple of seconds before clicking the picture, else it crashes.

The problem I have noticed is that my camera seems to initialize in the landscape mode by default. In the buildozer.spec file, the orientation is set to 'portrait' for the app. How can I make the camera view appear straight in portrait mode? Here is a screenshot of my problem. The door appears horizontal even if my phone is held upright. If turn around my phone, the camera view tilts even further by -90 degrees. How can I fix this?

If I use the force_landscape() method, the camera works as intended in the landscape mode, but then my app's orientation is also set to landscape mode permanently. It does not revert back to portrait mode even if I use the restore_orientation() method.

I am using Kivy 2.0.0 on Python 3.8.x. App packaged with buildozer. WRITE_EXTERNAL_STORAGE and CAMERA permissions are provided. Screenshot attached.

aa3d62fc-32b4-40d2-8a88-337134a962b9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions