yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] velis74:
3.00.114 (24.3.2013)

Reduced smoothing intervals to reduce flickering on high-end phones\n

Graph period must not be set to 0 (if it\'s 0, it crashes)\n

Preliminary camera support. See XDA thread for more info\n

Please note that cameras are extremely hard to work with so I have only left the implementation such that they have to be activated through dev options dialog (long pressing the proximity readings).

Only then will you be presented by a dialog which will allow you to enable camera support (this change will be permanent unless disabled manually). Enabling camera support will expose camera settings in the sensors section.

VAB will only use camera readouts if sensor is disabled.

Since there is no logic detecting camera cover up, it is best to have both cameras enabled - the brighter of the two will be used as the "light reading".

Warning: enabling cameras may lead to the following issues:

Battery usage: try to set pic taking interval to at least 10 seconds or VAB will climb to one of the top spots in battery usage monitors

The phone camera app may randomly report being unable to connect to the camera. Just start it again, VAB was just taking a photo at exact time when you launched Camera app.

Occasionally the picture will not be taken (this will fix itself immediately, so no worries)

Sometimes the app will be unable to read one or both cameras: app restart is necessary in such a case (kill / launch)

Sometimes the app will not be able to read the cameras and neither will any other app in your device. A full android restart is required in such a case.

None of these scenarios will harm your device, they will just disrupt camera operation in the listed ways. At worst, disabling camera support and rebooting the device will fix the issues.

I currently have no knowledge of how to fix the above issues and this may remain so for all eternity.

Edit: Even so, make sure you set smoothing times high - my cameras had a pretty wide spread for any given light point so I assume readings will jump around a lot.

Edit: The issues above don't mean that camera support isn't working at all: I have had cameras operate well for hours before failing in one of the above manners. So don't give up if your first camera activation fails and you have to restart.

That said, this was really hard (and so far unsuccessful) so I'm looking forward to fix some other TODOs in my list.
[Android Apps and Games] DisruptiveMind:
Latest update is 'unfortunatly stopped working' all over my HTC One S rooted running ICS, both clean and upgrade install. If you need a logcat let me know.
[Android Apps and Games] Christiancs1969:
Re: [APP][2.1+] Velis auto brightness 2.82.103

He's on it;)

s2 rootbox
[Android Apps and Games] Javs2010:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Just updated to latest version and now foreclosing every time
[Android Apps and Games] Luppo9:
Me too, FC
[Android Apps and Games] belerephont:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Same here.. FCs with latest update..
[Android Apps and Games] angisbregolius:
FC on GS2...
[Android Apps and Games] velis74:
Working on it. I thought I had everything nicely try..except-ed, but it seems that's not the case :(
[Android Apps and Games] Luppo9:
Where can i get the last working version of the app 2.82.101?
[Android Apps and Games] angisbregolius:
In the meantime, can you give us the old version?

Thank you.
[Android Apps and Games] kubics:
Don't you need a logcat or other information?
[Android Apps and Games] velis74:
I have uploaded a fix to the OP. Can anyone try and see if it's working now?

Thanks in advance
[Android Apps and Games] ufrat:
In the newest release it is blocking/scewing up the Camera on Galaxy Nexus!

Would be nice if you revert the update till all the problems are solved

Edit:

Camera is fixed in version posted in OP
[Android Apps and Games] angisbregolius:
Where I can download it?
[Android Apps and Games] velis74:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Op = first post of this thread
[Android Apps and Games] Christiancs1969:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Perfecto. Nice fix:D

s2 rootbox
[Android Apps and Games] angisbregolius:
Ok...now it is OK...

Thank you.
[Android Apps and Games] velis74:
Whew... (sweats). I hope that was the end of it.

It seems there were lots of devices that didn't attach EXIF info to the JPEG image data. And then there were a lot of devices that didn't send a JPEG to the event processing JPEGs...

That said, is the SGS3 / Nexus 4 steppiness any better now?
[Android Apps and Games] belerephont:
Yep! Seems ok now! Thanks!:good:
[Android Apps and Games] xanthrax:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Hi velis ! I can confirm on n4 all good on the last update (not the fix , don't need it)

sent from my Darkside of Nexus 4
[Android Apps and Games] spupuz:
i did noticed a huge processor and memory usage of velis auto brightness so i removed it.
[Android Apps and Games] velis74:
Phone model? Did you activate cameras?
[Android Apps and Games] spupuz:
i did not used camera i'm on galaxy nexus with aokp rom and ak kernel.
[Android Apps and Games] natezire71:
Re: [APP][2.1+] Velis auto brightness 2.82.103

How do you know it was using processing power? As for the memory stuff, I wouldn't worry about it unless you're having issues with other apps running out of memory. Unused RAM is wasted RAM.

Autocorrected from my GNexus
[Android Apps and Games] spupuz:
if you use better battery stats or any other application that monitor battery drain ( at least a good app ) you can verify it, anyway as auto brightness manager was very good. i'll try to use it again and see if it works better.
[Android Apps and Games] demolatorul:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Great app, using it for a wile but with latest updates broken the ability to install normal apk from sd card, I can't touch the install button, trying but doesn't want to work (nexus 4), reverted back to an older version
[Android Apps and Games] velis74:
Add APK installer to excluded apps list.
[Android Apps and Games] WibblyW:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Strange. VAB does not appear in a search on Google Play Store on my N7, but does on my N4. It used to, and I have it installed on my N7
[Android Apps and Games] jeedoridori:
can't wait for tasker~

But still nice
[Android Apps and Games] velis74:
Hm, this must be linked to play automatically using feature "camera" even though I only request permission for it. This camera support seems to be MUCH more trouble than it could ever be worth :(

??? Tasker support is working for quite a while now.
[Android Apps and Games] kubics:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Hi, on several last releases I have graph like in attached screenshot. Not a big issue of course ;)
[Android Apps and Games] Christiancs1969:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Its set to s curve in brightness settings. I add them all to new profile..one at a time. Bright ,norm,dim,etc...

s2 rootbox
[Android Apps and Games] kubics:
Re: [APP][2.1+] Velis auto brightness 2.82.103

You are right. I meant that the curve ends outside of the graph. It wasn't so some time ago...
[Android Apps and Games] Christiancs1969:
Re: [APP][2.1+] Velis auto brightness 2.82.103

Oh yes I got this too ..didn't see it sorry...yes strange

s2 rootbox
[Android Apps and Games] DisruptiveMind:
Seems to be 'sticking' alot recently, not installed anything new which might cause this. A quick cover of the sensor and release resets not a big issue just wondering if anyone else has noticed this?

Also thanks for the quick f/c issue.
[Android Apps and Games] WibblyW:
Yes, on the Play Store web interface it says "Asus Nexus 7. This item is not compatible with your device". I have sideloaded it for now.

There must be a workaround as there's another auto brightness app that will use the camera and I think it works.

---------- Post added at 02:06 PM ---------- Previous post was at 02:00 PM ----------

My N4 is still a bit steppy at low brightness levels. Maybe more granularity/steps aren't available in the API and this is the root cause, not the frequency with which you adjust it?
[Android Apps and Games] Marx2:
Odp: [APP][2.1+] Velis auto brightness 2.82.103

I have similar situation when I try to instal adblock. Can you tell me where exactly is this excluded application list?
[Android Apps and Games] Pkt_Lnt:
Settings, Excluded apps
[Android Apps and Games] hansip87:
Hey Velis, remember me? :)

Btw, still on my RAZR and is there a way to make the brightness shift goes smoother (e.g. like MacBook brightness adjusting method)? seems pretty discrete while shifting brightness. Any parameter that can i change?

My current settings are:

Brightness Change sensitivity 10%

Smoothing Time 5000ms

Smoothing Time Downward 5000ms

Smoothing Override 30%

Superdim Threshold disabled

Thanks for this awesome app, keep it up!
[Android Apps and Games] velis74:
This was always so :) It is done so that the last line is always horizontal (the last sample is for a very far away point). Otherwise, the last line would "point" to a point in the graph (with a sharp bend in the curve). This is because the graph is supposed to end at the top, not at the right edge. Again, my excellent maths prowess at its finest :D Added a TODO to fix that.

Noticed that as well. Though I have no idea why yet - I even had a chance to get a logcat of the event: The new samples are simply being rejected due to sensitivity threshold until there's one deviating enough to be accepted (sensor covered / placed under light).

Perhaps I should calculate deviations both horizontally (done now) AND vertically (not being checked right now)

This is due to implicit uses-feature: camera because of uses-permission: camera. I'll have to figure out how to eliminate the implicit uses-feature.

Note: found it really fast, it will be fixed with the next upload. :D

Hm, I'm operating with floats here, so my precision is high enough for that, I think. There may be a problem with lower lightness settings of your display. Darn, what I wouldn't give to get my hands on the hardware for a day or so :(

Edit: ooops, One function still had an int in there :silly: I fixed it, will be included in tonights patch. :angel:

Well, your smoothing times should be long enough for any transitions to be very smooth, not steppy at all. Is this with the 3.00.116 version?
[Android Apps and Games] velis74:
3.00.118 (27.3.2013)

Fix device exclusions due to camera permission

Settings wizard no longer clears saved profiles

- Settings wizard no longer starts multiple times on new installs

- Fix sensitivity presets for settings wizard

S-curve graph no longer renders beyond graph boundaries

Updated translations: slovak
[Android Apps and Games] xxLeoxx93:
Is it possible to add an automatic screen filter because my note is to bright on lowest settings :(
[Android Apps and Games] velis74:
Did you enable super dimming?

Just make sure you don't leave your graph really low when you do because your screen will be unreadable in low light conditions. I've has several unhappy users who activated superdimming and then said nothing works, because their screens were black - just the way they had set them... :D
[Android Apps and Games] velis74:
To everyone with phones that have steppy brightness transitions: Please help !

I am currently working with an SGS 3 and these are my observations:

The phone simply has a very steppy screen brightness adjustments. The same steppiness will be observed even if you go to settings and manually adjust the brightness slider (the brightness will change in very distinct steps every 10 brightness "points" or so).

The phone also has a pretty sensitive sensor. It will change very often and also in significant steps. I believe some users described this as "hunting" - the sensor value skips back and forth in short periods of time even though the phone conditions don't really change significantly.

Are these observations true for your phone as well?

I have attempted to solve the issue like this:

Issue #1: I have enabled super dimming and that alone would fix the issue because it is precise to 1/256 steps (and I could make it even more precise). This method also has all the drawbacks of super dimming, like having to disable VAB when APK installer is running and stuff like that. That of course also means sudden changes in brightness when such apps run - unless you enable "update system brightness setting"

Edit: Of course, this can only work for AMOLED displays. Standard LCDs would just burn battery becausee the backlight would be at full tilt and the filter would then dim it...

I have uploaded the new apk to OP only for now. The funcionality is enabled when super dimming is set to 100%.

Issue #2: This can only be solved by setting the downward smoothing to large value, like 10000 (10 seconds). I have set "my" SGS3 to 10%, 2000ms, 10000ms and it seems to be operating nicely right now.

Edit2: Bugs galore! OP updated with an APK that actually does something correctly...
[Android Apps and Games] angisbregolius:
Hi, can you check google play download? I reset my phone (S2) and now is impossible download your app from google play. While all other app I was able to download.

Ps: I restarted the phone several times, and after the root i was able to download and install the app.
[Android Apps and Games] WibblyW:
ROM based auto and manual brightness has stopped working on my N4 (previous comment refers, I think it's a stock ROM bug, and VAB continues to work). As I recall the ROM based auto brightness was able to smooth/interpolate between the 'fixed'/stepped brightness levels.

For LCD displays is there a possibility to use superdimming to do the transition, and then flip to a non-superdimmed level that's an equivalent brightness? So, for example, say perceived brightness level was at L1 and target (due to ambient light change) was L2....

If L1 is dimmer than L2 (brightness required to increase): Set led brightness to L2 with superdim equivalent to L1 at the same time, then smoothly remove the superdim to leave perceived screen brightness at L2

If L1 is brighter than L2 (brightness required to decrease): Use superdim to smoothly fade to L2 equivalent brightness, then set led brightness to L2 and remove superdim at the same time

.

Mind you, calibrating this so it worked well might be a problem...
[Android Apps and Games] velis74:
The problem is in calibration: there are multiple steps of "backlight brightness" available on the phone. Each step could then further be smoothed, but the exact amount may vary between particular steps.

I thought about how to implement this, but I don't see a solution that would be easy to use and work well at the same time. At minimum the calibration would be a several-hours process.

It is much easier to just enable super dimming @100%. The only real disadvantage of this are those apps that require auto brightness to be off, but normally there shouldn't be that many of such apps.

If you also enable updating system brightness, then brightness shouldn't change that much even when VAB disables itself due to an excluded app.
[Android Apps and Games] angisbregolius:
What is new in 3.00.119? can you give us a changelog? thank you.
[Android Apps and Games] velis74:
The changelog is accessible from app settings.

Plus I assume you have read at least the last forum page. There's a rather long post a few posts up explaining 119 vs 118.
[Android Apps and Games] WibblyW:
This could be a bug or missing feature in VAB, as as soon as I uninstalled VAB, the ROM based brightness controls started to work again. Is there as way to fully disable/suspend VAB without uninstalling it? I had turned off Auto Brightness on the main screen, but this seems to have frozen the brightness rather than 'disengaged' VAB...
[Android Apps and Games] velis74:
I will look into it. Maybe there's a condition under which I don't remove the overlay. However, that should be fine since I stop updating its brightness. Perhaps some ROMs don't engage system auto brightness when there's a window that sets its own brightness.
[Android Apps and Games] polobunny:
Same for me. I was wondering what the hell was up after simply disabling autobrightness in VAB. My rom reported the values as changing in the settings for the light sensor, but the brightness wouldn't change and even setting it to manual brightness and sliding to the max wouldn't make it brighter. Uninstalling it worked though. Samsung Galaxy S3 with CM10.1 latest nightly.
[Android Apps and Games] WibblyW:
I noticed, even with auto brightness disabled in VAB, the brightness went up when I installed some new software. Go me thinking "that's what VAB does - but it's supposed to be disabled...". If it helps to know, I'm not using superdimming. And like polobunny manual ROM based brightness setting has no effect either
[Android Apps and Games] Luppo9:
You must not disable VAB :)
[Android Apps and Games] WibblyW:
There are lots of things I mustn't do, but I want to do them anyway.... ;)
[Android Apps and Games] velis74:
3.05.122 (9.4.2013)

When superdimming threshold is set to 100%, it becomes the only method of adjusting screen brightness. Makes brightness adjustments much smoother on some phones (SGS3, GNex 4, etc). Since this method is completely linear, using a brighter preset is recommended or the screen might become too dark.

Completely remove brightness window when disabling. Should fix problems with system brightness when VAB is disabled on some phones.

Fix graph presets so that graph adjustments at right edge behave normally

Fixed strange graph behaviour at graph edges

Added graph adjustment sensitivity setting for more precision with graph adjustments

Draw superdim threshold in graph (non-user-interactive for now)
[Android Apps and Games] mynthon:
Hi,

I have same problem as @polobunny and @WibblyW. After turning "Auto brightness (AB)" off system brightness settings doesn't work anymore. No manual or auto brightness. It locks on last brightness set by AB. Sometimes it turns off properly but it is 1 time per 100 tries.

Sometimes have problems with turning it off/on. I enter settings. Turn AB OFF, quit setting (doesn't matter: home/back button), enter settings again. AB is still ON.

The same problem is for turning it ON.

Also sometimes it behaves strangely. When turning off my screen goes white. It reacts for taps, slides but is white, like there is a layer over screen. I have to turn off and turn on screen (with phisical button).

While first bug occurrs almost every time when turning off AB i can't find pattern for last two bugs.

My phone is SE Xperia Neo V with stock Android (4.0.4) nad with velis auto brightness 3.05.122
[Android Apps and Games] Luppo9:
Is it normal, that i have on my S2 only 3-Sensorsteps? 10, 1000, 10000? So i have only 3 brightness-levels.
[Android Apps and Games] velis74:
AFAIK this is correct for the stock ROM. I have seen this on the SGS2 that I got my hands on previously. Don't know about custom ROMs though.
[Android Apps and Games] sunsero:
Hi,

trying to get this working on S3 mini with stock Android 4.1.2 firmware. This device has no brightness sensor so it would be very useful to be able to adjust the brightness with the camera as sensor. Unfortunately regardless how often I restart VAB or reboot the device, the options in VAB to use the front or rear camera as sensors are visible but remain disabled.

I've also read about the cameras as sensors draining quite much battery, so if this starts to work I would be glad to have an option to only adjust the brightness once each time the phone is unlocked and maybe another option to adjust the brightness each time the proximity sensor gets released.

Hope I'll be able to use VAB soon on S3 mini...

sunsero
[Android Apps and Games] RovG:
Hi Velis,

On the SGS2, you can enter a test mode via *#0*# then select sensor and then tap light sensor. Here you will see the lux values in 5 lux increments. So it appears that the device can report a greater resolution than perhaps the API that you are using. The test mode differentiates between lux and level. It seems to be restricted to 3 levels though. Please will you look into this again?
[Android Apps and Games] velis74:
Do you mean disabled or off? They would only be disabled if no camera was detected on your phone.

I'm afraid there isn't much I can do about this: the sensor reports values, app responds. Maybe custom ROMs make the sensor work as it should, but it seems stock rom "rounds" the readouts to powers of 10 only.
[Android Apps and Games] sunsero:
The buttons are disabled, it's not possible to turn those sensors on. So it actually seems like there's been no camera detected on my S3 mini. Could the detection of the camera be not working because the device has no brightness sensor?
[Android Apps and Games] velis74:
No, camera detection isn't linked to other sensors. I'm using standard camera interface for it.
[Android Apps and Games] sunsero:
So no dependency in the source code? Strange, this is the first app I see that does not work with the camera. :( Others like various barcode scanners do work.
[Android Apps and Games] velis74:
I had tons of issues with cameras. I suppose I'll have to actually look into droid camera source to get camera support going :( And even that is no guarantee since different phones have different camera apps...
[Android Apps and Games] RovG:
Hi Velis,

I am using a stock rom and the test mode app returns values other than 10, 100, 10000. Is it possible to get your app to read the light sensor the same way as the test mode app?
[Android Apps and Games] RovG:
Hi Velis,

When pressing the profile button on the widget, the following screen comes upView attachment 1890389

It woukd be helpful if the previously selected profile was indicated by a radio button.
[Android Apps and Games] sunsero:
This would be great! Two open source programs that camera works with my S3 mini are AsciiCam and Show me hills. They are available at F-Droid.
[Android Apps and Games] Wizballs:
Hi Velis / Everyone,

I put together a little excel spreadsheet that calculates a smooth curve with variable 'flattening'. Just type in your min & max light sensor readings, min & max screen brightness levels, and a flattening %. It will spit out a bunch of points you can manually enter into VAB.

I use this myself because every device has a different range for light sensor readings, ie my phone reads from 2-27000, while my tablet reads from 0-64000 (and always about 2.5 higher under the same light source)

Its really just to share with everyone, use or it not, change it, whatever, all good :)
[Android Apps and Games] lklaus:
Hi,

I'm on a I8190 and it looks like the app can't successfully read from the cameras. The lux value is always 0. I'd like to help, if possible. Is there a way I can provide any info or do some tests?

Klaus
[Android Apps and Games] sunsero:
Hi lklaus,

do you see in settings that the front or rear camera have been detected? I'm on the same mobile model and the app tells in the settings that there was no camera detected.

sunsero
[Android Apps and Games] lklaus:
Interestingly, this varies after a reboot. I once had both cameras detected, but most of the time it detects only one of both. Could not see any regularity... Both were working at their time, as pictures from both cameras are stored.At the moment it only uses the main camera. But the readings always says 0 lux. The corresponding text file shows different values, but I don't know the meaning of the columns.

Klaus