简体   繁体   English

Android屏幕类型/亮度

[英]Android Screen Type/Brightness

Is there a way to get info about screen type in android? 有没有办法获取有关Android屏幕类型的信息? I want to know is device i am using amoled/ips/tft or get maximum brightness of screen, not relative brightness but brightness in nits or candelas/cm2 我想知道是我正在使用amoled / ips / tft的设备,还是获得屏幕的最大亮度,而不是相对亮度,而是以尼特或坎德拉/ cm2为单位的亮度

Much like other physical aspects of a device(weight, length, moment of inertia, etc.), this information will not be stored in the phone. 与设备的其他物理方面(重量,长度,惯性矩等)非常相似,此信息将不会存储在手机中。 I think the only way you could do this is to gather the information, create a database, and reference values to device IDs. 我认为您可以执行此操作的唯一方法是收集信息,创建数据库并引用设备ID的值。

Edit: The only other thing I can think of is using the device's light sensor and some sort of calibration device/method. 编辑:我能想到的唯一的另一件事是使用设备的光传感器和某种校准设备/方法。 Something like: 就像是:

  • hold device x distance from a mirror/white surface in a pitch black room 固定设备x在漆黑房间中距镜子/白色表面的距离x
  • programmatically cycle the screen through brightness settings 通过亮度设置以编程方式循环屏幕
  • read light sensor at each step 每一步读取光传感器

The limitations here would be in the light sensor if it even exists and getting people to calibrate their device properly. 如果光传感器甚至存在并且会导致人们正确校准他们的设备,那么这里的限制就是光传感器。

I don't think there's any way to do it directly, but you can get the device name using 我认为没有任何直接方法,但是您可以使用以下方式获取设备名称

android.os.Build.MODEL;

and then use this to do some sort of web service for the information you need. 然后使用它为所需的信息提供某种Web服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM