The following code uses reflection to extract the exact horizontal and vertical dpi (dots per inch) values:
B4X:
Sub Activity_Create (FirstTime As Boolean)
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
r.Target = r.RunMethod("getDisplayMetrics")
Log(r.GetField("xdpi"))
Log(r.GetField("ydpi"))
End Sub
The following code uses reflection to extract the exact horizontal and vertical dpi (dots per inch) values:
B4X:
Sub Activity_Create (FirstTime As Boolean)
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getResources")
r.Target = r.RunMethod("getDisplayMetrics")
Log(r.GetField("xdpi"))
Log(r.GetField("ydpi"))
End Sub