B4A Question Display ON/OFF to save battery - Quandalle (first post)    Mar 17, 2022   (4 reactions) Dim p As Phone p.SetScreenBrightness(1.0) ' set Brightness : float value between 0.0 (min) and 1.0 (max) ... p.SetScreenBrightness(-1) ' restore automatic Brightness You ca also use PhoneWakeState Dim pw As PhoneWakeState pw.KeepAlive(False) B4A Question Change brightness without permissions - klaus (first post)    May 26, 2023   (2 reactions) You can set the screen brightness with the Phone library. Private p As Phone p.SetScreenBrightness(0.5) The brightness value is a float number from 0 to 1. You could have a look at this post. B4A Library Brightness - Informatix    Jul 20, 2016   (19 reactions) As you probably noticed, Phone.SetScreenBrightness does not change the screen brightness but the brightness of the current window. Here is a library that allows to change the screen brightness and select the brightness mode (automatic/manual). It allows also to change the window brightness. Example B4A Question Writing an App to execute a few clicks on the Phone - mangojack (first post)    Sep 07, 2024   (1 reaction) Yes. Yes See what you can do using the Phone Library... 156683 Dim p As Phone p.SetVolume(p.VOLUME_MUSIC, 15, True) 'Max Volume p.SetScreenOrientation(0) ' Landscape p.SetScreenBrightness(1) ' (-1 Auto did not work , 1 Brightest did work) B4A Question BatteryChanged event fires every few seconds - Rusty    May 18, 2016   (1 reaction) True) End Sub Sub ScreenAwake ToastMessageShow("Awake sub called", False) Phone1.SetScreenBrightness(-1) Phone2.ReleaseKeepAlive Phone2.KeepAlive(True) End Sub Sub ScreenSleep ToastMessageShow("Sleep sub called", False) Phone2.ReleaseKeepAlive Phone1.SetScreenBrightness B4A Question setscreenbrightness error - RichyK68    Feb 21, 2018 Hi,
I've gone back to an old project to make a minor fix, but when I compiled and ran it it errored. So I had to go into debug and find what was causing it (nothing to do with the change I made).
Sub SetScreenBrightness(b As Float)
Dim p As Phone
If b < 0.1f Then b = 0.1f
MyFunctions B4A Question Brightness Activity - MarkusR (first post)    Jul 23, 2018   (1 reaction) maybe this?
https://www.b4x.com/android/help/phone.html#phone_setscreenbrightness B4A Question Newbie Question : How can I change the phone settings? - Sam Koh    Jul 25, 2023 I realized that the following settings will be gone once I quit the App. Is there a way to keep these phone settings permanently until I next change them? Dim myPhone As Phone myPhone.SetScreenOrientation (0) myPhone.SetVolume (myPhone.VOLUME_SYSTEM,15,True) myPhone.SetScreenBrightness (-1) B4A Question Phone Display Brightness - Erel (first post)    Jan 12, 2015 See the documentation for SetScreenBrightness method: https://www.b4x./?query=phone.setscreenbrightness&page=1&prefix=0 B4A Code Snippet Disable access to the StatusBar (Notification bar) - Erel (first post)    Apr 07, 2016 Are you calling Phone.SetScreenBrightness? Can you upload a small project with only the overlay and the brightness functionality? Page: 1   2   3   4   5   6   7   Powered by ColBERT |