New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@emmaus/capacitor-plugin-android-insets

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emmaus/capacitor-plugin-android-insets

Capacitro plugin for retrieving proper top offset of Android status bar

latest
Source
npmnpm
Version
2.0.2
Version published
Maintainers
0
Created
Source

@emmaus/capacitor-plugin-android-insets

Capacitor plugin for retrieving proper top offset of Android status bar.

This repo is published version with changed name of https://github.com/jorisbertomeu/capacitor-insets-v2, which was based on archived https://github.com/igorcd/capacitor-insets-plugin/. It should work perfectly fine in Capacitor@4.

Install

# with npm
npm install --save @emmaus/capacitor-plugin-android-insets
# with yarn
yarn add @emmaus/capacitor-plugin-android-insets
# after any install
npx cap sync

Why?

This plugin is required only on Android when using StatusBar.setOverlaysWebView({ overlay: true }). There is a problem with top offset counting, when status bar is transparent. Related issue: https://github.com/ionic-team/capacitor/issues/2840.

Usage

import { AndroidInsets } from '@emmaus/capacitor-plugin-android-insets';

const { value } = await AndroidInsets.top();

API

getDisplayInfo()

getDisplayInfo() => Promise<GetDisplayInfoReturn>

Returns: Promise<GetDisplayInfoReturn>

setNavbarBackgroundColor(...)

setNavbarBackgroundColor(options: { r: number; g: number; b: number; a: number; }) => Promise<void>
ParamType
options{ r: number; g: number; b: number; a: number; }

Interfaces

GetDisplayInfoReturn

PropType
isGestureModeboolean
rotation'portrait' | 'landscape-left' | 'landscape-right' | 'unknown'
statusbarHeightnumber
navbarPosition'BOTTOM' | 'RIGHT' | 'LEFT' | 'UNKNOWN'
navbarSizenumber
insetTopnumber
insetRightnumber
insetBottomnumber
insetLeftnumber

Keywords

capacitor

FAQs

Package last updated on 06 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts