capacitor-screen-size
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

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


Readme

Keywords

Package Sidebar

Install

npm i capacitor-screen-size

Weekly Downloads

19

Version

0.0.3

License

MIT

Unpacked Size

17.3 kB

Total Files

28

Last publish

Collaborators

  • onexip