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)
}
Added in API level 28
How can read the HDCP level for older API < 28?
As per your questions only On API V28 or before see here...
You can get away with this, but may have to check your version level before getting into this.
Now you can access this stuff easily.. with the code sample below