I wanted to differentiate between 43 inch and 50 inch smart tvs and using display metrics i was able to get close enough result on my smartphone but on a 50 inch 4k tv it returns 28 inches with 1920×1080 resolution, I installed some device info apps on the TV and they also show the size as 28 inch with 1080 res.
This answer suggested using DisplayCompat.ModeCompat, which has methods getPhysicalWidth and getPhysicalHeight that returns the correct resolution, but no other properties like display metrics that can help in determining the Inches.
I want to know if there is methods inside DisplayCompat or other ways may to get the exact inch like combining the resolution, ppi or aspect ratio or if there is a library.