Like other physical aspects of the device (weight, length, moment of inertia, etc.), this information is not stored on the phone. I think the only way to do this is to collect information, create a database and reference values for device identifiers.
Edit: The only thing I can think of is to use the device’s light sensor and some kind of calibration device / method. Sort of:
- keep the device x away from the mirror / white surface in the black tone room.
- programmatically switch the screen using brightness settings
- read the light sensor at every step
Limitations here will be in the light sensor, if it even exists, and force people to properly calibrate their device.
source share