-
Notifications
You must be signed in to change notification settings - Fork 5k
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
expo-brightness restoreSystemBrightnessAsync not working on android #20814
Comments
Thank you for filing this issue! |
Any additional information: the function seems to work when the app is built but not in Expo Go, so maybe more an Expo Go problem. |
I now have a same error, do not know about production, but in Expo Go on Android when I use
|
I have the same problem before , but if you are only using it in a particular page that is being currently rendered and go back to the system brightness if the page is not rendered, I've use useFocusEffect hook from react navigation and useCallback hook and It worked for me, currently I'm running in a expo project and I use it like this.
|
Summary
When trying to use restoreSystemBrightnessAsync in expo-brightness it dosen't work on android while it is supposed to. The brightness dosen't change and go back to system brightness.
Sometimes i get the following error:
I only tested on Redmi Note 10 Pro (Android 12)
What platform(s) does this occur on?
Android
Environment
Minimal reproducible example
https://snack.expo.dev/@geunievre/restoresystembrightnessasync
The text was updated successfully, but these errors were encountered: