cordova-plugin-cutout

1.0.11 • Public • Published

cordova-plugin-cutout

Detect if the device screen has cutout or notch

Installation

cordova plugin add cordova-plugin-cutout

Methods

has()

/** 
* Cutout plugin is added to global window object
@name has
@returns Promise<boolean>
*/
cutout.has();

Support

Android

Currently devices with Android P or newer are supported. For non supported devices, return value will be false even if the screen may have cutout.

iOS

Devices with iOS 11 or higher are supported. Calling this on older devices will just return false as no older iPhones have cutout.

Usage in Ionic

There are not typedefs yet, so to use it with Ionic framework, do as follows

declare var cutout: any;
 
cutout.has()
  .then(result => console.log(result));

Package Sidebar

Install

npm i cordova-plugin-cutout

Weekly Downloads

62

Version

1.0.11

License

MIT

Unpacked Size

5.85 kB

Total Files

10

Last publish

Collaborators

  • vuk