Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getAutoRotateState always returning true on iOS and false on Android #286

Open
Aaqib925 opened this issue Dec 30, 2023 · 1 comment
Open

Comments

@Aaqib925
Copy link

Aaqib925 commented Dec 30, 2023

I want to find System's Auto Rotate Status and update the UI accordingly.
Screenshot 2023-12-30 at 11 02 19 PM

In my component, I have used the getAutoRotateState as follows:
useEffect(() => { Orientation.getAutoRotateState((state) => { console.log('AUTO ROTATE STATE', state); }); }, []);

But the method always returns true on iOS and false on Android regardless of locked or unlocked device state.

@Aaqib925 Aaqib925 changed the title getAutoRotateState always returning true. getAutoRotateState always returning true on iOS and false on Android Dec 30, 2023
@devteam-technolabs
Copy link

I am also looking for the same but unfortunatly getAutoRotateState only availble for android. It is stated in docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants