/cordova-toforeground

A plugin for codova, which will allow the app to bring itself, or other app activites, to the foreground.

Primary LanguageJavaApache License 2.0Apache-2.0

Cordova plugin for Android to bring an app to foreground

This plugin can only start other activites. As far as I know, this does not include other cordova plugins.

Installation

Inside the cordova project:

cordova plugin add https://github.com/akilude/cordova-toforeground  --save

Usage

To use inside of your javascript code, use the following line:

toForeground(mainClassName, packageName, successFunction, errorFunction);

mainClassName: Should be the main activity class for the android code. For your cordova app, it should be the java class that extends CordovaActivity. NOTE: This should only be the name of class, should not contain the package names as well.

packageName: Should be the name of the package that contains the mainClassName.

success/errorFunction: The functions that will be called on error and success.