Thursday 19 August 2021

How to check HDCP Level on Android (TV) for API < 28?

I have a Android TV stick and I would like to distinguish what HDCP version is supported?

I already have found something and it seems to work:

    try {
        val uuid = UUID.fromString("1f83e1e8-6ee9-4f0d-ba2f-5ec4e3ed1a66")
        val mediaDrm = MediaDrm(uuid)
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
            mediaDrm.connectedHdcpLevel
        }
    } catch (use : UnsupportedSchemeException) {
        Log(use.localizedMessage)
    }

But the documentation says

Added in API level 28

How can read the HDCP level for older API < 28?



from How to check HDCP Level on Android (TV) for API < 28?

No comments:

Post a Comment