reeq-dev / react-native-device-brightness

React-Native library which allows you to change devices brightness level
MIT License
2 stars 1 forks source link

Can't change brightness because another app is controlling it #2

Open indapublic opened 2 weeks ago

indapublic commented 2 weeks ago

Hello, thank you for your library.

It's not problem of this exactly library but when we are control brightness we can't change it via System settings and see "Can't change brightness because another app is controlling it" warning until app is closed.

Maybe possible to avoid this behaviour and release it after unmount for example?

Thank you in advance.

reeq-dev commented 2 weeks ago

@indapublic I assume such behavior happens on Android?

indapublic commented 2 weeks ago

@reeq-dev Correct

reeq-dev commented 2 weeks ago

@indapublic Have you tried the useUnmountBrightness hook? It does not release control of the brightness when the notification drawer is opened, but it is supposed to release it when the component/screen that uses it is unmounted.

indapublic commented 2 weeks ago

@reeq-dev Yes, it was first thing in your library I tried