# cordova-plugin-statusbar-background

> Plugin to set Android window statusbar and background on startup for Cordova/Ionic applications

Latest version **1.0.0** (published 2019-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-statusbar-background
pnpm add cordova-plugin-statusbar-background
yarn add cordova-plugin-statusbar-background
bun add cordova-plugin-statusbar-background
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-06-27 |
| First published | 2019-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Chris Born |
| Maintainers | chongas |
| Keywords | cordova, ecosystem:cordova, cordova-android, android, ionic, startup, window, statusbar, background |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-statusbar-background
- Repository: https://github.com/Chongas/cordova-plugin-statusbar-background
- Issues: https://github.com/Chongas/cordova-plugin-statusbar-background/issues
- npm.io page: https://npm.io/package/cordova-plugin-statusbar-background

## Dependencies (2)

- [q](https://npm.io/package/q.md) 1.5.1
- [xml2js](https://npm.io/package/xml2js.md) 0.4.19

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-06-27

## README

# :lollipop: cordova-plugin-statusbar-background

[![Latest Stable Version](https://img.shields.io/npm/v/cordova-plugin-statusbar-background.svg)](https://www.npmjs.com/package/cordova-plugin-statusbar-background) [![Total Downloads](https://img.shields.io/npm/dt/cordova-plugin-statusbar-background.svg)](https://npm-stat.com/charts.html?package=cordova-plugin-statusbar-background) [![License](https://img.shields.io/github/license/Chongas/cordova-plugin-statusbar-background.svg)](https://github.com/Chongas/cordova-plugin-statusbar-background)

This is a simple plugin for Android which will set the window statusbar and background color on start-up for you app's MainActivity to a color of your choice.
This allows you to avoid the standard black status bar and dark grey background which will flash for a second before your splash screen appears. Set the color to the same background as your splash screen for a smoother start-up effect.

## Installation

You'll need to set your desired window background color while installing the plugin by supplying the `BG_SB_COLOR` variable. Set it to whatever you want, preferrably the same color as your splash screen.

    cordova plugin add cordova-plugin-statusbar-background --variable BG_SB_COLOR=#ff69b4 --save
	
Or install directly from this repo:

    cordova plugin add https://github.com/Chongas/cordova-plugin-statusbar-background.git --variable BG_SB_COLOR=#ff69b4 --save

	
## Supported Platforms

- Cordova (cordova >=6.2.0)
- Platform Android (cordova-android >=6.0.0)

## Configuration

A custom `BG_SB_COLOR` variable will be added to your app's config.xml after installation with the value you selected (provided you included the `--save` flag).
You can change it whenever you want, but you'll need to remove and re-add the Android platform from your project in order for the change to go through.

    <plugin name="cordova-plugin-statusbar-background">
        <variable name="BG_SB_COLOR" value="#B4D455" />
    </plugin>

To re-add the Android platform:

	cordova platform remove android
	cordova platform add android
	
## TODO

- Allow an image background to be used as windowBackground? Perhaps set it to the same image as the splash screen automatically?
- Find a way to make changes to config.xml automatically update without having to re-add the platform.

---
_Source: https://npm.io/package/cordova-plugin-statusbar-background · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
