# cordova-plugin-progress

> Cordova / PhoneGap Plugin for Progress HUD Notifications via KVNProgress

Latest version **0.3.0** (published 2015-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install cordova-plugin-progress
pnpm add cordova-plugin-progress
yarn add cordova-plugin-progress
bun add cordova-plugin-progress
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2015-09-20 |
| First published | 2015-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Lee Crossley |
| Maintainers | leecrossley |
| Keywords | cordova, progress, hud, notification, message, toast, status, overlay, loader, ecosystem:cordova, cordova-ios |

## Links

- npm: https://www.npmjs.com/package/cordova-plugin-progress
- Repository: https://github.com/leecrossley/cordova-plugin-progress
- Homepage: https://github.com/leecrossley/cordova-plugin-progress#readme
- Issues: https://github.com/leecrossley/cordova-plugin-progress/issues
- npm.io page: https://npm.io/package/cordova-plugin-progress

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2015-09-20
- 0.2.2 — 2015-09-20
- 0.2.1 — 2015-09-20
- 0.2.0 — 2015-09-20
- 0.1.1 — 2015-06-26
- 0.0.2 — 2015-06-26
- 0.0.1 — 2015-06-26

## README

## Progress Plugin for Apache Cordova [![npm version](https://badge.fury.io/js/cordova-plugin-progress.svg)](http://badge.fury.io/js/cordova-plugin-progress)

**Cordova / PhoneGap Plugin for Progress HUD Notifications via [KVNProgress](https://github.com/kevin-hirsch/KVNProgress).**

## Demo

<img src="https://raw.github.com/leecrossley/cordova-plugin-progress/master/progress.gif" alt="Cordova Progress" width="180">

## Install

#### Latest published version on npm (with Cordova CLI >= 5.0.0)

```
cordova plugin add cordova-plugin-progress
```

#### Latest version from GitHub

```
cordova plugin add https://github.com/leecrossley/cordova-plugin-progress.git
```

You **do not** need to reference any JavaScript, the Cordova plugin architecture will add a `progress` object to your root automatically when you build.

## Usage

### show

Show the basic indeterminate progress loader.

```js
// with success and error handlers
progress.show(successHandler, errorHandler);

// without callback functions
progress.show();
```

Show the basic indeterminate progress loader, with text. When text is supplied, the loader width is larger.

```js
// with success and error handlers
progress.show(successHandler, errorHandler, {"text": "Loading..."});

// with success and error handlers (shorthand)
progress.show(successHandler, errorHandler, "Loading...");

// without callback functions
progress.show({"text": "Loading..."});

// without callback functions (shorthand)
progress.show("Loading...");
```

### update

Update the loader text on the fly (animated). If the loader was initiated without text, the width will remain smaller than if it was initiated with text.

```js
// with success and error handlers
progress.update(successHandler, errorHandler, {"text": "Still loading..."});

// with success and error handlers (shorthand)
progress.update(successHandler, errorHandler, "Still loading...");

// without callback functions
progress.update({"text": "Still loading..."});

// without callback functions (shorthand)
progress.update("Still loading...");
```

You can also use the update function to remove any previous text (an empty string is treated the same as omitting the string).

```js
// with success and error handlers
progress.update(successHandler, errorHandler);

// without callback functions
progress.update();
```

### hide

Hide the loader. Note that the `successHandler` is called after the loader has completely disappeared.

```js
// with success and error handlers
progress.hide(successHandler, errorHandler);

// without callback functions
progress.hide();
```

## Full basic example

```js
// after the cordova device ready event has fired
progress.show("Loading...");

setTimeout(function () {
    progress.update("Still loading...");
}, 1500);

setTimeout(function () {
    progress.hide();
}, 3000);
```

## Platforms

iOS (7+) only.

## License

[MIT License](http://ilee.mit-license.org)

[KVNProgress](https://github.com/kevin-hirsch/KVNProgress#license)

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