Search code examples
androidsensorsandroid-sensors

"Universal" values for light sensor?


I tried to registret the light with two smarthphones. My samsung galaxy return values from 1 to 10k (<1k if i have a roof or something else over me, or 9000 if there is nothing over me)., while an old xperia return values from 1 to 100k (<10k if i have a roof or something else over me, or 90000 if there is nothing over me). Is there a way to find a "universal value" or something like this? In the android documentation i didn't find anything useful.


Solution

  • Is there a way to find a "universal value" or something like this?

    There is no "universal" value, but getMaximumRange() on the Sensor should tell you the highest possible value for that specific device that your app is running on.