@expo/status-bar-height

Listen to status bar changes during incoming calls and other multi-tasking events

Stats

StarsIssuesVersionUpdatedCreatedSize
@expo/status-bar-height
70140.0.14 years ago4 years agoMinified + gzip package size for @expo/status-bar-height in KB

Readme

NPM

@expo/status-bar-height

Listen to status bar changes during incoming calls and other multi-tasking events 💙

Installation

yarn add @expo/status-bar-height

Usage

Import the library into your JavaScript file:

import StatusBarHeight from '@expo/status-bar-height';

Functions

StatusBarHeight.addEventListener( (height: number) => {} )

Given a callback this will be invoked whenever the status bar height changes. The status bar height changes when another app is running a background activity.

  • Phone Calls
  • Navigating
  • Facetime

StatusBarHeight.removeEventListener( (height: number) => {} )

The provided function will stop receiving updates

StatusBarHeight.getAsync(): Promise<number>

Get the current height of the status bar async.

const height = await StatusBarHeight.getAsync();

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.