0.0.3 • Published 2 years ago

capacitor-screen-size v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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; }>