To Forground

Allows the app to bring itself to the foreground when it was running in the background
Morgan Redshaw1.0.06
platforms: android
$ cordova plugin add com.diusrex.toforeground

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/Diusrex/cordova-toforeground

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.