Android: ofGetOrientation doesn't get updated when phone is rotated

Open
#4,508 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
android, cpp
Domain
mobile-dev

Research direction

Start with the Android behavior described around ofGetOrientation, ofSetOrientation, and the manifest's configChanges="orientation|screenSize" setting. Reproduce a phone rotation and trace how the window size and orientation are updated; done means ofGetOrientation returns the actual orientation after rotation when no explicit orientation is set.

Written by the indexing model from the issue text.

Description

android

I have an app where the orientation is not specified (ofSetOrientation is never called) and the manifest has android:configChanges="orientation|screenSize". I can rotate the phone and the openframeworks window gets rotated, and the size gets updated. But the orientation keeps returning OF_ORIENTATION_DEFAULT

Shouldn't the function return the actual orientation?

See also issue #1662 that i think is related

Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openframeworks/openFrameworks

All issues in openframeworks/openFrameworks

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.