yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] sunsero:
1 yes and it's also not up updated in the graph but brightness seems to get adjusted. Will reboot...

2 no, I think this was already in 3.05 though because of the previous values not restored not clearly to differentiate. But it is annoying at night when e.g. trying to not wake up your girlfriend while using the phone.

---------- Post added at 06:59 AM ---------- Previous post was at 06:57 AM ----------

Addition to 2: I guess from 200 ms to 800ms (varies)

---------- Post added at 07:06 AM ---------- Previous post was at 06:59 AM ----------

Still lux remains 0 after reboot.

---------- Post added at 07:13 AM ---------- Previous post was at 07:06 AM ----------

I had to leave bed and thus low light conditions - now the displayed lux values get updated...
[Android Apps and Games] velis74:
My guess is that this is approximately the time it takes for your phone to take a new pic. The brightness up to that point is set to whatever it was before the screen was turned off. If you wish, you can set "Screen on sensor value override" to a low value. That will remove the bright display when turned on and also determine if I'm correct: if the screen remains bright for thise 200-800 ms despite that setting, that would mean that overlay doesn't get created fast enough.

:victory:
[Android Apps and Games] sunsero:
I'm no more in low light conditions but have set the override value to 1 now.When turning the screen on it goes to the lock screen its a bit brighter but not like it should due to environment, dims down after a few hundred ms until the brightness after a few seconds gets adjusted to the environment. Maybe you could check this on your mobile by only using the proximity and the camera sensor?
[Android Apps and Games] velis74:
Like I said, my phone is quite obedient in this respect.

Some phones have quite aggressive display brightness management: even if an app (e.g. VAB) sets it to a value, transition of actual brightness to that value will take some time.

It is also possible that the delay is partly caused by delayed notification of screen-on event.

Unfortunately there isn't much I can do about either of these delays.
[Android Apps and Games] sunsero:
Hmm, I see. However it must be possible to set the overlay so that it will already be active when the screen turns on. Actually with the DisplayFilter app that I used before VAB the display was already superdimmed when turning the screen was turned on to show the lockscreen. Unfortunately I don't know how the DisplayFilter app accomplishes this. :rolleyes:
[Android Apps and Games] velis74:
Currently I'm destroying the overlay every time I disable the app. and screen off disables the app. Perhaps I should add an exception where screen off wouldn't destroy the overlay. I anticipate lots of bugs on this one (devil) :eek:
[Android Apps and Games] sunsero:
Sounds good, looking forward to test and tell all those bugs ;) Well, but mainly looking forward to the improvement :laugh:

Btw would it be possible to do each time a camera reading when the screen turns on immediately after the proximity sensor has been released? I think this would lead to the fastest possible adjustement to the environmental conditions. :cool:
[Android Apps and Games] velis74:
Why would this be faster? Proximity off doesn't necessarily translate to screen on, except if you have some app installed that does this. Just a side note - VAB has a TODO for this (screen on / off from proximity sensor).

Plus - when screen turns off I disable sensor reading to conserve battery.
[Android Apps and Games] lklaus:
Hi,

up to now I did not see any problems with auto adjust, but I noticed the following while switching the screen off:

I/velis.vab.Service.setScreenOn( 2877): Stored 55

W/velis.vab.camera oops( 2877): camSH is null true

D/AndroidRuntime( 2877): Shutting down VM

W/dalvikvm( 2877): threadid=1: thread exiting with uncaught exception (group=0x410632a0)

E/AndroidRuntime( 2877): FATAL EXCEPTION: main

E/AndroidRuntime( 2877): java.lang.NullPointerException

E/AndroidRuntime( 2877):	at com.velis.auto.brightness.o.run(SourceFile:393)

E/AndroidRuntime( 2877):	at android.os.Handler.handleCallback(Handler.java:615)

E/AndroidRuntime( 2877):	at android.os.Handler.dispatchMessage(Handler.java:92)

E/AndroidRuntime( 2877):	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 2877):	at android.app.ActivityThread.main(ActivityThread.java:4867)

E/AndroidRuntime( 2877):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2877):	at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 2877):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)

E/AndroidRuntime( 2877):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)

E/AndroidRuntime( 2877):	at dalvik.system.NativeStart.main(Native Method)

I/Process ( 2877): Sending signal. PID: 2877 SIG: 9

I/ActivityManager( 2017): Process com.velis.auto.brightness (pid 2877) has died.

W/ActivityManager( 2017): Service crashed 2 times, stopping: ServiceRecord{429c99b0 com.velis.auto.brightness/.Auto_Brightness_Service}

(VAN 3.0.8.130)
[Android Apps and Games] velis74:
This is fixed in today's update (the one I released a few hours ago).
[Android Apps and Games] sunsero:
Yes, I've got some app installed (Simple Cover Lock) that does screen on/off.

However with the Proximity Sensor in VAB having the purpose to invalidate the current reading, the consequence is that as soon as when the proximity sensor is released the reading becomes valid again.

So by doing the camera reading as soon as the proximity sensor is released rather than at the next camera read interval having passed, VAB's brightness adjusting would be more responsive. Also I think the reading interval should be restarted whenever the proximity sensor is released.
[Android Apps and Games] Jagoflax:
I'll test it, thank you!
[Android Apps and Games] RovG:
Hi Velis,

On 3.08.131 under Excluded Apps: The app names are in white on a light grey background. This makes it hard to read the names.

SGS2 DXLPF Stock Rom
[Android Apps and Games] velis74:
??? They are white on black for me :confused:

What android version do you run?
[Android Apps and Games] velis74:
Is today's patch any better?
[Android Apps and Games] sunsero:
Yes, VAB keeps adjusting the brightness all day again :thumbup:
[Android Apps and Games] RovG:
4.0.4 ICS

View attachment 2057317
[Android Apps and Games] velis74:
I have uploaded a new APK to OP. Can you please tell me what color the list is now?
[Android Apps and Games] sunsero:
Testing again with latest upload under low light conditions and override value 1:

On screen on the display goes bright for about 200 ms, then dims down a bit for a second and then even dims down more, so it's three steps to reach the brightness that was there when the screen was turned off.

P.S.: Didn't use proximity sensor for screen on/off this time.
[Android Apps and Games] RovG:
Hi Velis,

It is the same. :(No change. White on light grey. To be sure; I cleared data, uninstalled 3.08.131 & then installed 3.08.132.
[Android Apps and Games] velis74:
No matter, this will be fixed soon. I just replaced the stock android list item with my own and left the colors on default. Now to replace the colors as well :)
[Android Apps and Games] velis74:
Sorry, that version didin't have a fix for overlay. Now it does, please install the apk in the OP and see if it has any effect. There may be issues with excluded apps, but I find the possibility quite remote.

Just uploaded a new APK. Can you please test again?
[Android Apps and Games] sunsero:
I had to disable proximity sensor and Simple Cover Lock to test this at daylight. Unfortunately it seems when the display turns on the superdim overlay is still not applied immediately yet.

Is the overlay there all the time while the screen is off or is the overlay just set when the screen turns on? In this case I expect it would be best to keep or set the overlay (if there's a sensor override value for screen on set) already already when the screen turns off.
[Android Apps and Games] velis74:
The overlay is there all the time. If your phone still doesn't set brightness right away it's because of os safeguards: that delay is intentional so that you can see that display is working before anything has a chance of dimming it too much.
[Android Apps and Games] sunsero:
Such a safeguard can't be the reason because the DisplayFilter app superdims the display from the beginning when the screen turns on. :confused:
[Android Apps and Games] velis74:
Ok. Fair enough. Will check asap, maybe i left a bug. Not until tomorrow though, today i'm away. Party in the company i work at :D
[Android Apps and Games] sunsero:
Thanks, have fun ;)
[Android Apps and Games] hpgenie:
looks really promising. I've just installed this app and let you know about the results. I really hate the auto brightness that comes with my phone It's too bright in the dark but too dim under the sun.

Edit: Tested on Xperia Z. At the beginning it said that no sensor is detected but after that it appears to work ok. Using TFT bright profile but the sensor gets as much as 878 lux during direct bright sunlight. Now I need to modify the profile so that the screen is 100% @ 880 lux. Still struggling with modifying the chart, perhaps more user friendly interface would be great. Anyway it's a very good app and I recommend it.
[Android Apps and Games] RovG:
It is now a light grey font on a dark grey background.

View attachment 2059464
[Android Apps and Games] velis74:
Yep, you're right. There was a bug - I only left hte filter on when screen was still on achieving the exact opposite than intended :)

Anyway, fixed apk is in the OP.

Are you modifying the chart using manual edit instead of just dragging the red handles?

Yes, this is the intended coloring. Is it satisfactory?
[Android Apps and Games] iamcxyx:
surely gonna install :good:
[Android Apps and Games] sunsero:
The good news is the display does not go bright after screen on if it was dimmed at screen off. :thumbup:

However, strange things happened: I had to force close VAB on application manager because the overlay did not go away on the package installer. I checked now with the new version again and package installer still was on the excluded app list. Btw it did not even help to disable automatic brightness adjusting, actually had to force close VAB.

Second thing was that again the lux values shown tend to remain at 0 in low light conditions though the display brightness gets adjusted. In brighter environments the lux values are shown
[Android Apps and Games] velis74:
I think I have SGS2 sensor fixed!!!!! :good::D:laugh::cowboy:. Will be uploaded to OP as soon as I verify / fix sunsero's problem. :p
[Android Apps and Games] RovG:
I personally prefer white on black but this is certainly usable. Thank you.
[Android Apps and Games] velis74:
Is this really on the latest version uploaded an hour ago? This is exactly what I fixed there...
[Android Apps and Games] sunsero:
This was the issue I had with INSTALLING the latest version, so I ran into the issue with the previous version and it's probably actually fixed in the latest version :D

---------- Post added at 11:14 PM ---------- Previous post was at 11:04 PM ----------

Would it be possible to have an option to keep the current brightness when an excluded app opens? I understand the package installer requires the overlay to be taken away but all other apps using the camera do not require the overlay to be taken away, just the camera has to be released for them...
[Android Apps and Games] velis74:
OP updated with APK containing the SGS2 improved sensor reader. For those willing to test: you have to select the kernel sensor reader (Samsung Galaxy S2 instead of Capella microsystems) in settings - just under light sensor switch.

Just a side-note: it's night time here so I can't properly test what I have done. It may be a complete dud :angel:
[Android Apps and Games] Christiancs1969:
On it;)

RootBox s2
[Android Apps and Games] RovG:
I am unable to change to "Samsung Galaxy S2" under sensors. It would appear that that selection option is not activated.:(
[Android Apps and Games] velis74:
You do not see a "lux sensor access method" option in settings?
[Android Apps and Games] Christiancs1969:
It working here

RootBox s2
[Android Apps and Games] Christiancs1969:
View attachment 2062115

RootBox s2
[Android Apps and Games] RovG:
This is what I see. I am on ICS 4.0.4 stock DXLPF.View attachment 2062139
[Android Apps and Games] Christiancs1969:
Turn sensor off then on... Worth a try

RootBox s2
[Android Apps and Games] RovG:
So after clearing data, the option appeared. If I restore data only using TiBu, the option disappears:confused:
[Android Apps and Games] RovG:
View attachment 2062163
[Android Apps and Games] RovG:
Hi Velis,

Some feedback on my Samsung Galaxy S II GT-i9100 running stock DXLPF (ICS 4.0.4) with DorimanX kernel v7.44:

1. When upgrading to 3.08.133, I could not see the sensor option under settings. I had to clear data, then it appeared. If I restored data only using TiBu, it dissappeared.

2. SGS2 sensor mode: Currently you are taking a reading approx. every 250ms. This might be too quick.

3. A reading value of zero is valid and should be taken into account when comparing to history and averaging.

4. I did have VAB lock up on me once. The app was responding in the UI but it refused to adjust brightness. I had to clear data to get it going again. This maybe related to 2 & 3 above.

5. Even though I have already purchased Tasker & Widget support, this version was asking me to purchase it again. It might help to store the licence/key seperate from settings so clearing data doesn't wipe this info.

6. When changing the sensor type, it doesn't immediately reflect the change on the line above. You have to go out of settings and back in again.

7. If you enable or disable VAB under settings, it does not reflect on the graph page. You have to exit and re-enter the app to see the change effected.

8. Under Excluded Apps, it would be helpfull to see enabled items at the top of the list without having to scroll through the whole list to find the items that you enabled.

9. It would be helpful to store profiles seperately from settings. Everytime I had to clear data for the test I had to recreate my profiles.

10. There is no easy way to tell which profile is in use if you have multiple profiles.

11. In the widget I always have the font in black, except for when I tap it, then it briefly flashes white.

12. Currently superdimming is either on or off. The percentage of dimming is automatically calculated. It would be helpful to have a second curve that indicated and controlled the dimmed value. Obviously this curve would never cross the primary curve.

Thank you for your time and effort in providing the community with this valuable app.:thumbup::)
[Android Apps and Games] sunsero:
Yes, favouring excluded apps at top as well.

Regarding superdimming I'd favour negative values, maybe even in one graph but then try to get more vertical space for the graph by reducing other UI elements?
[Android Apps and Games] sunsero:
Still much delay between unlocking the phone and adjustment of brightness. It becomes faster when reducing the camera read interval.
[Android Apps and Games] velis74:
If anything I'd like to increase the frequency so that I can find what's killing it. No matter how much I decrease the frequency, it will reach this situation eventually.

I have just checked: the app works normally with Play Store. Try clearing data again.

Hm, the only thing I can still do is apply the override value before screen gets turned on again, but I highly doubt this will help. Seems screen filter does something I'm not. Will keep digging, maybe something turns up.
[Android Apps and Games] sunsero:
There's no problem now anymore with the screen filter not being applied immediately, that's just fine after screen on like it is with DisplayFilter. :thumbup:

What I mean could be improved is that the first camera reading seems to happen quite late after screen on. And I think this could be improved because when I reduce the camera read interval the brightness adjusts earlier after screen on. But I do not want to have a very low camera read interval of course because I guess this requires otherwise unnecessary much battery power.
[Android Apps and Games] velis74:
OP updated again:

Kernel sensor reader now safer + 0 reading is a valid reading

Main screen VAB on/off now properly reflects service state

Excluded apps now displays previously selected apps at the top of the list

Launcher widget text forced to white

If I hadn't messed up too much, I think it's time this release to also hit Play Store.

In the mean time [MENTION=5221171]sunsero[/MENTION] I'll see about that initial delay. Edit: done, OP updated yet again :victory:
[Android Apps and Games] RovG:
I concur. Playstore time it is:)

Edit: Please check "Track light in graph". I suspect it has stopped working.:o
[Android Apps and Games] velis74:
Seems to be working just fine on my phone?
[Android Apps and Games] Pkt_Lnt:
Works on my Galaxy Nexus as well.

One issue with the last few releases here, I cannot use Tasker support except on the versions from the play store. It shows not available from the forum apks, and I get an error when I try to purchase. First pic is with 3.10.135 from the forum, second pic is version 3.8.131 from the Play Store, but it does not show the app installed.
[Android Apps and Games] velis74:
Just occurred to me: play store integration only works for app versions that are actually ON Play Store.

I'm super sorry for this inconvenience, but it's not one I can influence.

That said, I'm uploading .135 to Play Store which should fix the issue.
[Android Apps and Games] sunsero:
I suppose this is the issue I've experienced in some of the recent versions as well. I think it happens only in combination with low light environment or superdimming.
[Android Apps and Games] velis74:
I'm hearing you, but unless I can duplicate the issue, there's little I can do about it. This non-responsiveness in some situations is a constant bane for this little app.
[Android Apps and Games] sunsero:
Here's my currently used graph:

Pt: 0 7

Pt: 1 15

Pt: 62 30

Pt: 1000 255

Pt: 15000 255

Superdim threshold is at 10%. The lux value and graph is here not updated in very low light conditions though the brightness of the display changes. Hope this helps a bit to be able to reproduce this at some time. It's not a big thing but seems quite like a bug.
[Android Apps and Games] velis74:
Is the latest version faster now? The delay is 0, cam should read quite fast.
[Android Apps and Games] sunsero:
Yes it is, it takes now about 1 to 2 seconds even with a camera read interval of 5 seconds, so it's at least more acceptable than before. This is my experience without ignoring light input when the proximity sensor is covered. But that case can be tested best with a dark environment available so I can't test this now.
[Android Apps and Games] RovG:
:eek: Ok, Guys this was caused by my own stupidity.:rolleyes: I had VAB set as an excluded app.:o:D I did this when I was testing superdimming & wanted to give myself a way out in case I set the brightness too low. I apologise for any inconvenience caused.:(

It would be cool though if I could still set VAB as an excluded app but have the light tracking working.:sly:

So now to monitor battery usage with the new Samsung Galaxy S2 sensor.:)

BTW, my light sensor seems to go way beyond 3000 lux:D This is from light sensor test/diagnostic accessible by entering *#0*# in phone then selecting "Sensor" followed by "Light Sensor":

View attachment 2066620
[Android Apps and Games] papix8:
hello everybody.

First of all, i have to say that this kind of app is something i ever wondered (from when i had a nokia n73 which had a light sensor).

Now i'm using a star b94m/b943 with android 4.2.1. It has a light sensor but (for some reason) it looks like it doesn't work. Someone told me this is a software problem: how can i fix it? (they told me services.jar, but i don't know what this means :D)

I have to specify that the auto brightness of android doesn't work either; the light sensor seems to have a constant value.

Could you please help me? Thank you!!
[Android Apps and Games] velis74:
VAB could support your phone if it reports light sensor reading somewhere in the /sys/ structure. But you will have to find the exact path yourself.
[Android Apps and Games] papix8:
thank you. Could you please provide an example of this path? (just to know what i'm searching :D).

PS: VAB report 800/10240 lux (fixed, not changing, so i think it can access the light sensor, but this sensor has some problems (and i think it's a software issue because that i've been told)). Thank you!
[Android Apps and Games] velis74:
From what you are describing, sensor is implemented properly on your device, but there's a fault preventing its proper operation. You are obviously not a developer and even if you were, the chance of finding a solution would be a long process full of various trials.

I have looked up your device and this post seems to be the most promising about the solution. Two posts down there's also a "lewa" (presumably a ROM?) mentioned that's supposed to be working. I did not research further though, please do that on your own.
[Android Apps and Games] papix8:
thank you velis.

As a matter of fact i've just found that the light sensor it's working. I simply clean it up and i realized that 800 lux is the minimum value it can detect (with more light it shows higher values). Still it's not very accurate, but this is not a problem.

Here is another :D i'm interested in this great software because i'd like to keep over control lights, using the minimum backlight needed each moment. Until now, i managed to use RootDim, another cool piece of software which allows to set lower brightness than the standard android settings (which is 30/255, while on my device i can set also 8/255 without turning off the screen). So, i found that indoor 8/255 is enough, but outside i need much more :D (and until now, i switched manually from the indoor preset to the outdoor preset). Theoretically VAB could do this boring job for me!

The problem is that VAB couln't set 8/255 as brightness (i also manually entered these values, but i see that the real brightness set by VAB is 30 (the minimum allowed from android settings (i can confirm this watching /sys/devices/platform/mt65xx/leds/lcd-backlight/brightness ))).

Any chance i can make VAB work with my special needs? :D may be it would be enough make the app directly write on brightness file (or, if there's any control of minimum value before setting brightness, just override it).

Thank you for reading !
[Android Apps and Games] velis74:
You can lower the brightness using super dimming. In your case, set superdim threshold to 12 - 13%
[Android Apps and Games] papix8:
ok, but this wouldn't make me save power (i'm on a lcd screen) :D (correct me if i misunderstood the explanation in your blog)

i just tried to add on my build.prop

(taken from http://android.stackexchange.com/qu...n-brightness-below-the-minimum-without-an-app ) but this hadn't no effect.

ty :)

EDIT: i can just add that i searched other apps, and there is no one that allows (both) custom auto brightness and real lowering brightness below the default minimum value. I hope yours will be the first :)
[Android Apps and Games] velis74:
You won't save power anyway because that's the lowest backlight your phone can provide. 30 that is.

If you want to go lower, you need to use a filter (super dimming).

Power used won't go any lower, but your screen will be dimmer as you want. The effect will be the same as with RootDim using the same method.

30 / 256 = 11,7% --> set superdim threshold to 12%, but be careful how low you set the graph below the threshold. You don't want the screen to go black.