Heyo!
The main purpose of this flow is about getting screen resolutions for widgets.
I have tried to make this flow work on all device resolutions, I apologize if it does not work for you. (Im Running S9+)
Download here:
http://automagic4android.com/flow.php?i ... bd8d90c44b
When the brightness is under 50% it will apply a transparent filter which gets darker as you adjust brightness levels lower
Hope it helps with the eyestrain!
Darker Brightness
Moderator: Martin
Darker Brightness
Every life altering decision you have made, has lead to you reading this.
Re: Darker Brightness
Thanks for sharing the flow!
Using your overlay, I'll try to find a way to dim the screen even further once the brightness goes below minimum like all those screen filter apps do.
I unfortunately didn't have that system variable, so I found an alternative (and perhaps more reliable) way to get the screen resolution:
Martin said he'll be adding an option to display over navigation and status bar in next update. For now, if it's in immersive mode, it will still be covered.
Using your overlay, I'll try to find a way to dim the screen even further once the brightness goes below minimum like all those screen filter apps do.
I unfortunately didn't have that system variable, so I found an alternative (and perhaps more reliable) way to get the screen resolution:
Code: Select all
windowService = getJavaStaticField( "android.content.Context", "WINDOW_SERVICE" );
displayMetrics = callJavaConstructor( "android.util.DisplayMetrics", "DisplayMetrics()" );
windowManager = callJavaMethod( getContext(), "android.content.Context", "getSystemService (java.lang.String)", windowService );
display = callJavaMethod( windowManager, "android.view.WindowManager", "getDefaultDisplay()" );
callJavaMethod( display, "android.view.Display", "getRealMetrics( android.util.DisplayMetrics )", displayMetrics );
width = getJavaField( displayMetrics, "android.util.DisplayMetrics", "widthPixels" );
height = getJavaField( displayMetrics, "android.util.DisplayMetrics", "heightPixels" );
Last edited by Pepy on 09 Mar 2020 20:28, edited 2 times in total.
Hope my post was helpful
Device: OnePlus 5T running crDroid, rooted with Magisk
Device: OnePlus 5T running crDroid, rooted with Magisk
Re: Darker Brightness
Fantastic stuff ~ yeah that's kinda a bummer, i was reading a post about Martin possibly implimenting something back in 2017, but that's alright
Thanks for the feedback!
Thanks for the feedback!
Every life altering decision you have made, has lead to you reading this.