[APP][2.3+] Lux Auto Brightness

Search This thread

kantjer

Inactive Recognized Contributor
Dec 11, 2010
12,393
29,850
www.androidfilehost.com
Feature Suggestions

I'm currently accepting feature suggestions for Lux v2.0. If you want me to consider new functionality, or changes to what exists, now's your chance!

Just had another idea.
Having an option set the update mode based on day/night could be a nice addition.

During day time I have mine set to either Dynamically or Periodically every 5 seconds, while during night time, when the fluctuation in ambient light isn't that big, for me Periodically every 15 or even 30 seconds would be enough. This I guess can save some additional battery power during night period.

Since the day/night switching is already there for profile switching I hope this can be added without to much afford.
 
Last edited:
  • Like
Reactions: diddsen

sg1969

Senior Member
Dec 6, 2011
456
92
London, UK
Periodically doesn't seem to work at all now for me. Using slimkat, Franco, on an N5

Sent from my Nexus 5 using xda app-developers app

I'm on a Xperia Z1, 4.2.2 and neither Periodically nor Dynamic seem to work.
Brightness is at about 70%. I cover the sensor, wait 1 minute... 2 minutes... nothing happens. But as soon as I hit "refresh", it goes down to about 4%. I then uncover the sensor and wait, but nothing happens until I hit refresh again.

Only "on wake" seems to be working for me.

Any ideas? To be perfectly honest, I only recently got the phone so I'm not sure if it ever worked...
 

dclarkg

Senior Member
Dec 18, 2013
692
363
San Jose
Hello!

I bought the app yesterday in order to have all the functions but I don't seem to find the difference between the light sampler interpolation (linear,cubic or function) any explanation or useful link? I searched the thread but only find someone asking the same question but no response.

Great app!
 

BTG-XCELL

Member
Mar 8, 2011
30
6
Hello!

I bought the app yesterday in order to have all the functions but I don't seem to find the difference between the light sampler interpolation (linear,cubic or function) any explanation or useful link? I searched the thread but only find someone asking the same question but no response.

Great app!

When you link a lux (or luma) value to a brightness level on your device, you define a point for your profile. If the sensor detects a lux/luma value between two defined points (ie. that specific lux/luma value is not explicitly defined a brightness value) in your profile, then Lux Auto Brightness must interpolate a brightness value based upon the data points in your profile. To do this, there are different methods of interpolating this value such as linear interpolation, cubic interpolation, logarithmic interpolation, etc. These are just basic mathematical formulations that you can read up about online.

Example: http://en.wikipedia.org/wiki/Interpolation
NOTE: Your data points are the red points in the graphs and the interpolation between the data points is defined by the blue line.
 
  • Like
Reactions: dclarkg

TakipSiLim

Member
Jul 19, 2013
27
2
I just purchased this great app. Is there a way for the profile mode to automatically change from day to night? Just like in the auto night mode.

Update: I saw a post to use the auto.

Suggestion: it will be nice to have an option to activate specific profile or brightness level base on time set by the user.

Thanks for making this app!


Sent from my Nexus 4 using Tapatalk
 
Last edited:

diddsen

Senior Member
May 13, 2009
2,083
336
helllo,
very great app... using since it gives :)

have one question... how can regulating with luma values instead lux?
don't understand to set that working.

thx
cu

edit: found the setting that luma works... it's useful to know that luma is camera sensor :D
but only working if regulating method is "screen on" :(
would be nice if switching between "screen on" and other like "periodicals" can set by profilemanager... so that i can say, use by "day" lux sensor and by night switch to luma camera sensor.
 
Last edited:
Feature Suggestions

I'm currently accepting feature suggestions for Lux v2.0. If you want me to consider new functionality, or changes to what exists, now's your chance!

the only new feature i want would be to be able to set a desired brightness level (for example 50%) by entering something like a start point (for example 50lm) and an end point (for example 80lm) and when the current ambient light reading is between those two userdefinable start and end points the brightness should stay 50% instead of having to link every single time when i think that the display is too bright or too dark. It can be something like the profiles used to turn wi-fi on and off by userdefined time - only in this case by userdefined ambient light values :)

And if it's possible please make the above feature available also through the camera scanning of ambient light ('cause a lot of phones don't have special ambient light sensors).
 
  • Like
Reactions: anewday

Cyb3rGlitch

Senior Member
Apr 12, 2011
599
663
Thank you all for the suggestions so far!


So does this still cause your screen to flash when switching apps? That was my only complaint

Sent from my SAMSUNG-SGH-I317 using Tapatalk
Yes. This is a side effect of getting the transparent nav buttons to reduce in brightness. I'll look into adding an alternative method in place for those without transparent buttons.

Periodically doesn't seem to work at all now for me. Using slimkat, Franco, on an N5

Sent from my Nexus 5 using xda app-developers app
I'll test this on my stock N5.

Hi,

I don't seem to understand this "sleep" option in the app... I would like to add a specific app, let's say "Google+" to this "sleep" list for the purpose that when I open it to have a different brightness setting on my screen than Lux is providing automatically. My goal would be to have a higher brightness for when this apps opens up. How would this work? I tried adding some apps to this list, but when I open any of them what I expect doesn't happen. I don't seem to see anything happening, actually!

So, my question so far would be: what actually is supposed to happen when an app added to the sleep list is opened?

Thank you!
The sleep list disables Lux for that app. It's useful for compatibility issues, or apps which have their own brightness controls. To have app specific brightness you need to use Tasker with Lux as the plug-in. I may introduce a native feature in a future build.

I'm on a Xperia Z1, 4.2.2 and neither Periodically nor Dynamic seem to work.
Brightness is at about 70%. I cover the sensor, wait 1 minute... 2 minutes... nothing happens. But as soon as I hit "refresh", it goes down to about 4%. I then uncover the sensor and wait, but nothing happens until I hit refresh again.

Only "on wake" seems to be working for me.

Any ideas? To be perfectly honest, I only recently got the phone so I'm not sure if it ever worked...
Do you have the persistent notification enabled?
 
Jul 19, 2010
24
3
PItesti
The sleep list disables Lux for that app. It's useful for compatibility issues, or apps which have their own brightness controls. To have app specific brightness you need to use Tasker with Lux as the plug-in. I may introduce a native feature in future build.

Now I understand. I guess it would be useful an extra setting allowing to set a manual percentage brightness for when it goes to sleep, if that doesn't screw up with the specific settings of other apps... Thanks!
 

doctor_droid

Senior Member
Oct 29, 2012
4,472
1,938
Indore
Pardon me if this has been told earlier but m having lot of wakelock issues... overnight drainage was about 20% which normally doesnt happens (1-3%max) .. it tops my list on wakelock detector.?
 

anewday

Senior Member
Dec 24, 2010
607
55
New York City
the only new feature i want would be to be able to set a desired brightness level (for example 50%) by entering something like a start point (for example 50lm) and an end point (for example 80lm) and when the current ambient light reading is between those two userdefinable start and end points the brightness should stay 50% instead of having to link every single time when i think that the display is too bright or too dark. It can be something like the profiles used to turn wi-fi on and off by userdefined time - only in this case by userdefined ambient light values :)

Yes, this would be a nice feature.

Sent from my Galaxy S4
 

xfish

Member
May 7, 2011
38
9
Cyb3rGlitch, for features I suggest
- changing profiles (night/day) by time (ATM possible with Tasker but I would prefer implementation into Lux) or by trigger-button in notification-bar
- customization of Lux-dash in notification-bar, e.g. I don't need a button for Astro-mode or for on/off, and would change the height/width of the bar and buttons. Also the position, it's always at the bottom, so not at a reliable place if there are other notifications..
 
  • Like
Reactions: vitoski

vitoski

Senior Member
Mar 1, 2009
944
780
Poland
Cyb3rGlitch, for features I suggest
- changing profiles (night/day) by time (ATM possible with Tasker but I would prefer implementation into Lux) or by trigger-button in notification-bar
- customization of Lux-dash in notification-bar, e.g. I don't need a button for Astro-mode or for on/off, and would change the height/width of the bar and buttons. Also the position, it's always at the bottom, so not at a reliable place if there are other notifications..

The idea with changing night/day profile is good. However I think that combination of tasker and Lux with its tasker variables would be awesome. Imagine that you set up Tasker to change profile from day to night at 10 PM and depending on the lux read from the sensor. This case even if it will be 10 PM but you are in the bright room the screen will not dimm.

Wysłane z mojego GT-I9100 przy użyciu Tapatalka
 

xfish

Member
May 7, 2011
38
9
The idea with changing night/day profile is good. However I think that combination of tasker and Lux with its tasker variables would be awesome. Imagine that you set up Tasker to change profile from day to night at 10 PM and depending on the lux read from the sensor. This case even if it will be 10 PM but you are in the bright room the screen will not dimm.
Well this is indeed currently possible, simply enable plug-in support in Advanced-menu. This Tasker-support is built-in in Lux pro-version IIRC.
But built-in daytime/nighttime-switch would be one development-click away IMHO.
 

530farm

Senior Member
Aug 3, 2012
613
149
Oakland
Sorry if this has been answered, but I didn't see anything when searching. What is the status of a Nexus 5 Plugin?

Also, When using Lux in Night mode on nexus 5 4.4.2, my navbar ends up turning into more of a solid bar than the translucent bar that more seamlessly blended into the rest of the screen. It seems to be affected by the "color temperature" being more noticeable as you go to a lower value.
 

vitoski

Senior Member
Mar 1, 2009
944
780
Poland
Well this is indeed currently possible, simply enable plug-in support in Advanced-menu. This Tasker-support is built-in in Lux pro-version IIRC.
But built-in daytime/nighttime-switch would be one development-click away IMHO.

Currently you can set up tasker to change ptofilr (with plugin) and to check sensor, which uses more battery. What you can't do is to utilize built in tasker variables for lux.

Wysłane z mojego GT-N8010 przy użyciu Tapatalka
 

malkovy

New member
Jan 2, 2009
3
3
Ostrołęka
For me great feature would be option to change brightness basing not on luma or lux sensor, but on some kind of mathematical function of them. For example:
a*luma + b*lux
Where a and b are constants.
I am proposing that because I noticed that indoor luma sensor (camera) have much better resolution than lux sensor. Otherwise outdoor lux is better than luma.
For example:
Indoor:
Lights on:
lux=1;
luma=132;
Lights off:
lux=0;
luma=10;
Outdoor:
Very bright:
lux = 2000;
luma = 255;
Not so bright:
lux=300;
luma=255;
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 160
    unnamed.png


    Lux - The Original Android Auto-Brightness App

    So I thought I should make an XDA thread for Lux, over a year after releasing it to the Play Store!

    FULL or FREE


    Issues/Suggestions

    If you have any issues or suggestions, please add them to the public issue tracker found here. Be sure to search first, duplicated issues will not work in your favour.


    News
    • Update to 1.51 released to Play Store!
      - Profiles. Have different behaviour for day and night!
      - Root plug-ins. Custom kernel with RGB control? Make a plug-in to utilise it!
      - Improved notification
      - Low pass filter
      - Cubic interpolation
      - Polish/French/Russian/German/Italian translation
      - Manual sunrise location input
      - Control Dashboard slider with vol. keys
      - Fade duration/step
      - Reduced battery usage
      - Fixes

    • Update to 1.06 released to Play Store!
      - Automatic night mode (uses location for sunset/sunrise).
      - Notification priority
      - Enhanced dashboard and notification UI
      - Enable/disable and refresh Lux via Tasker
      - Bug fixes

    • Update to 0.76 released to Play Store!
      - Fixed brightness issues after call

    • Update to 0.74 released to Play Store!
      - Fixed max/phone brightness preferences swapped
      - Added ignore 0 lux option
      - Made static phone brightness optional

    • Update to 0.70 released to Play Store!
      - New 'ascending' automatic mode for zero jitter!
      - Expandable notification for added control (Android 4.1+)
      - Improved efficiency
      - Install to OS functionality
      - Set min/max brightness bounds
      - Adjustable night mode
      - Improved persistence (Android won't kill it!)
      - Fixed Nexus 7 255 luma bug
      - Fixed Tasker 'on wake' revert bug
      - Compat. mode is now known as 'sleep mode'
      - Night Mode now default Dashboard action (hold for Astro. mode)
      - Misc. tweaks and fixes.

    App Description

    Lux isn't your ordinary brightness app. It intelligently adjusts the brightness of your display based on the environment you're in. If, for example, you step into a dimly lit room, Lux will automatically lower the brightness of your display to make it not only comfortable to read, but to also preserve battery power.
    Lux provides the option to automatically adjust the backlight at fixed intervals (periodic mode), when a change in environment is detected (dynamic mode), or when the phone wakes from sleep. It's also possible to adjust the backlight manually. Simply disable automatic mode and you can use it like a traditional brightness tool!
    Perhaps the best thing about Lux is that you can teach it how to behave. If the backlight is too bright or dim for your liking, simply open the provided Dashboard, adjust the brightness slider to the level you desire, then hold the link button. Lux will use this new 'link' as a reference in future.

    Give it a go! I want you to test Lux for more than the 15 minute refund period offered by Google. I understand that some devices may not have the best quality light sensor, and that you may need more time to play around with settings. If you find that Lux doesn't suit you after the 15 minutes is up, you can request a refund at any time via e-mail - no questions asked.

    ★FEATURES★
    ■ Custom auto brightness.
    ■ Sub-zero brightness to make reading in the dark significantly less irritating.
    ■ Battery efficient
    ■ Handy brightness widget
    ■ Option to use the camera to read in ambient light.
    ■ Power-user settings such as choice of interpolation, sensor debugging, and linked sample editing.
    ■ Backup to SD.
    ■ 'Ascending' auto mode for phones with inaccurate light sensors.
    ■ Gradual fade for backlight adjustments.
    ■ Astronomer mode adds a red filter to the screen to preserve the eyesight of stargazers.
    ■ Jitter control to prevent constant small changes to the backlight.
    ■ Automatic night mode, to change the colour temperature of the display for comfortable night time viewing.
    ■ Add app specific exceptions via sleep mode
    ■ No ads, or other nuisances.
    ■ Tasker and Locale support!
    Note: Please disable other brightness apps before using Lux. The author is not liable for any issues caused when using this app.

    ★PERMISSIONS★
    TAKE PICTURES AND VIDEOS: Used to read in luma values, if camera input is selected.
    DRAW OVER OTHER APPS: Required for night/astro mode.
    READ PHONE STATE: Required to prevent Lux from interfering with phone controls in Android 4.1.
    MODIFY SYSTEM SETTINGS: Brightness is a system setting, as is toggling the default auto brightness.
    RETRIEVE RUNNING APPS: Required to make the 'sleep list' functionality work, so Lux can disable itself when certain apps are in the foreground.
    COARSE LOCATION: Required to automatically calculate sunrise/sunset times.
    IN APP BILLING: Required for purchasing future device specific root only plug-ins, to enhance functionality.
    14
    Lux Low-Level Plug-ins

    Soon Lux will support plug-ins to bypass Android API limitations. These plug-ins serve to replace the overlay system Lux uses to make adjustments for Night/Astronomer modes and brightness in general. The plug-in library is free to use for non-commercial development, and can be found here:

    Lux Plug-in Library | Nexus 4 Sample Plug-in Code

    How to make a plug-in

    There are two approaches to making a plug-in for Lux. The passive and the active method. The former is as easy as providing a set of superuser commands for Lux to interpret and apply. These command correlate to functions such as setting pixel RGB or brightness levels. This is the type of plug-in the Nexus 4 sample linked above takes.
    The active method requires you produce your own code to perform RGB/brightness adjustments. This might include importing a device specific library to do the heavy lifting, and then returning empty superuser commands back to Lux.


    Getting Started

    Simply import the Lux Plug-in Library source into your IDE as an Android Library Project, and then create a new Android app which extends PassiveDisplay.java.

    PassiveDisplay provides hooks into Lux's plug-in framework, which you can use to provide superuser commands for Lux to execute. These commands correlate to functions such as setting RGB values. Take a look at the sample Nexus 4 project to see how it's all done.
    Finally, in your new project's AndroidManifest.xml file, add the following:

    Code:
        <activity
            android:name="com.vitocassisi.lux.plugin.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    
        <receiver
            android:name="com.vitocassisi.lux.plugin.LuxBroadcastReceiver"
            android:exported="true" >
            <intent-filter>
                <action android:name="com.vitocassisi.lux.plugin.search" />
            </intent-filter>
        </receiver>
    
        <service
            android:name=".[B]MY_PLUGIN[/B]"
            android:exported="true" >
            <intent-filter>
                <action android:name="[B]YOUR_PACKAGE_NAME_HERE[/B]" />
            </intent-filter>
        </service>

    Be sure to replace YOUR_PACKAGE_NAME_HERE with the name of your plug-in's package, and MY_PLUGIN with your extended PassiveDisplay class.

    And that's it! Now you're ready to test!


    Enabling Plug-In support within Lux

    To enable plug-in support, you must check 'Enable plug-in support' in the Advanced section of Lux settings. Enabling this option forfeits all responsibility of mine for any issues caused while using Lux. Plug-in's can cause very real damage to your device if they're written incorrectly - don't use plug-ins from sources you don't trust!
    Testing your plug-in
    Testing is critical for creating a good plug-in. You are dealing directly with system files, and can easily cause damage if you do not know what you're doing.

    DO NOT RELEASE A PLUG-IN WITHOUT TESTING IT ON THE TARGET DEVICE FIRST!

    Ensure that the following work with your plug-in installed:
    • Astronomer Mode
    • Night Mode
    • General brightness adjustment
    • Lux readings functional

    BE METICULOUS WITH YOUR IMPLEMENTATION OF isSupportedDevice()!
    Modifying system files on the wrong model/kernel may cause irreversible issues!


    Licence
    Code:
    Copyright © 2013 Vito Cassisi
    
    You may not use this library except in compliance with the following:
        - It cannot be used for commercial purposes under any circumstances, unless explicit permission is granted in writing from the author.
        - Modifications to this library may not be distributed.
    
    Unless required by applicable law or agreed to in writing, software
    distributed under this licence is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11
    Lux v1.99.8 released (staged rollout)

    - Added CF.lumen support (don't need CF.lumen active, just install the driver). Acts as a plug-in for all Android 4.4+ devices. Please buy the pro version to support his work.
    - System autobrightness enabled during calls
    - Option to shake at lockscreen to increase brightness
    - Option to prevent drop in brightness in landscape
    - Enforced persistent notification, added system removal method
    - Fixed dashboard width issue
    - Fixed notification priority resetting at boot
    - Misc. fixes
    11
    Hey everyone. Sorry to hear that people are having issues with the paid version. I'm working on hotfixes at the moment. A lot of these bugs don't appear on my test devices, which is why regressions happen seemingly randomly. I'm working hard on finding a reliable way to reproduce and test these issues to prevent this happening again.
    9
    Apologies to everyone for not being around lately. I've been answering support via email.

    A new release is rolling out on the market to 5% of users. Please use the 'Send Feedback' button in Lux preferences if you experience issues. Also, feel free to email me with any questions or concerns.