should be good enough to get that value in an application.
m
Michael Paus
02/14/2022, 2:22 PM
I want to get the physical DPI value and that does not seem to be possible without resorting to AWT methods.
Copy code
val scaledDpi = Toolkit.getDefaultToolkit().screenResolution
val displayScalingFactor = LocalDensity.current.density.dp.value
val physicalDpi = displayScalingFactor * scaledDpi