Mobile device - device screen resolution and DPI

Hello,
I was testing a lot of methods to find device (not in game screen) resolution, but every time it does’t work correctly, for example:

const FVector2D viewportSize = FVector2D(GEngine->GameViewport->Viewport->GetSizeXY());

const float viewportScale = GetDefault<UUserInterfaceSettings>(UUserInterfaceSettings::StaticClass())->GetDPIScaleBasedOnSize(FIntPoint(viewportSize.X, viewportSize.Y));
NVIDIA Shield Tablet: 8'', 1920 x 1200:
viewportSize.X = 1152
viewportSize.Y = 720
viewportScale = 0.666

Sony Xperia XA: 5'', 1280 x 720
viewportSize.X = 1192
viewportSize.Y = 720
viewportScale = 0.666

Can I get screen DPI without creating method in androidJNI custom engine?
What I want to do is to execute something action only on devices greater than 7 inches. Is there any other way than calculate diagonal screen?

Hi,
Have you try the dpi scale tool provided by Unreal ?