Search code examples
androidgoogle-tv

How to obtain display device characteristics in Android?


Folks,

Our application is intended to run only for a specific model of display monitor having a specific serial number. On Linux version of our app, we obtain this information via EDID.

We are now looking at porting the code over to Android (Google TV).

Is there any API on Android NDK that would let us obtain display device characteristics such as its model and serial number?

Thank you in advance for your help.

Regards,
Peter


Solution

  • Since Google TV devices don't have telephony hardware, you cannot use the TelephonyManager to get the device id.

    You can get other device information using the following code:

    Log.i(LOG_TAG, "android.os.Build.VERSION.RELEASE="+android.os.Build.VERSION.RELEASE);
    Log.i(LOG_TAG, "android.os.Build.VERSION.INCREMENTAL="+android.os.Build.VERSION.INCREMENTAL);
    Log.i(LOG_TAG, "android.os.Build.DEVICE="+android.os.Build.DEVICE);
    Log.i(LOG_TAG, "android.os.Build.MODEL="+android.os.Build.MODEL);
    Log.i(LOG_TAG, "android.os.Build.PRODUCT="+android.os.Build.PRODUCT);
    Log.i(LOG_TAG, "android.os.Build.MANUFACTURER="+android.os.Build.MANUFACTURER);
    Log.i(LOG_TAG, "android.os.Build.BRAND="+android.os.Build.BRAND);
    

    For the Vizio Co-Star Google TV device you will get the following:

    android.os.Build.VERSION.RELEASE=3.2
    android.os.Build.VERSION.INCREMENTAL=U4.6.0-ota2
    android.os.Build.DEVICE=VAP430
    android.os.Build.MODEL=VAP430
    android.os.Build.PRODUCT=StreamPlayer
    android.os.Build.MANUFACTURER=VIZIO
    android.os.Build.BRAND=Vizio