Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

cordova-plugin-progress

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-progress

Cordova / PhoneGap Plugin for Progress HUD Notifications via KVNProgress

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

Progress Plugin for Apache Cordova npm version

Cordova / PhoneGap Plugin for Progress HUD Notifications via KVNProgress.

Demo

Cordova Progress

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.

// 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.

// 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.

// 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).

// 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.

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

// without callback functions
progress.hide();

Full basic example

// 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

KVNProgress

Keywords

cordova

FAQs

Package last updated on 20 Sep 2015

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