Dear members,
Newbie here, validating my idea for an extension and if someone can build it for the community.
The requirement is to change screen brightness just for the app. The existing extensions seem to require permissions to modify brightness system-wide. However, I found some articles that Android apps can temporarily modify brightness just for the app, and that doesn’t need additional permissions.
Things I noticed were related to: WindowManager.LayoutParams
and layoutParams.screenBrightness
Does this make sense? If so, can someone try making a component, may be?
Thanks!
Hello, Here’s a small extension that changes the window’s brightness, without requiring any special permission, using the code in the link posted here .
SetWindowBrightness: Overrides the user’s preferred brightness of the screen. The value can be a number from 1 to 100. Note: this change applies to the current window only, it’s not global to the whole device.
GetWindowBrightness: Returns a value between 1 to 100 representing the window brightness. Returns -1 if the window uses the user’s preferred screen brightness.