capacitor-screen-size
v0.0.3
Published
Get pixel density of iOS and Android devices
Downloads
2
Readme
capacitor-screen-size
Get pixel density of iOS and Android devices. The Android implementation utilizes the DisplayMetrics API to get the density and the native scale. The iOS implementation uses either a look-up table by ... or an approximated calculation to get the pixel density of the device.
Install
npm install capacitor-screen-size
npx cap sync
API
getDevicePPI()
getDevicePPI() => Promise<{ density: number; scaleFactor: number; }>
Returns: Promise<{ density: number; scaleFactor: number; }>