# cordova-android-movetasktoback

> Exposes Activity::moveTaskToBack to cordova. Allows to return to the previous activity programatically.

Latest version **0.1.4** (published 2017-06-21) · Apache 2.0 license · 0 weekly downloads

## Install

```sh
npm install cordova-android-movetasktoback
pnpm add cordova-android-movetasktoback
yarn add cordova-android-movetasktoback
bun add cordova-android-movetasktoback
```

## 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.1.4 |
| Published | 2017-06-21 |
| First published | 2015-10-22 |
| Weekly downloads | 0 |
| License | Apache 2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christian Speckner |
| Maintainers | christian.speckner |
| Keywords | android, activity, close, exit, background, ecosystem:cordova, cordova-android |

## Links

- npm: https://www.npmjs.com/package/cordova-android-movetasktoback
- Repository: https://github.com/mayflower/cordova-android-movetasktoback
- Homepage: https://github.com/mayflower/cordova-android-movetasktoback#readme
- Issues: https://github.com/mayflower/cordova-android-movetasktoback/issues
- npm.io page: https://npm.io/package/cordova-android-movetasktoback

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

- 0.1.4 (latest) — 2017-06-21
- 0.1.3 — 2015-10-22
- 0.1.2 — 2015-10-22
- 0.1.1 — 2015-10-22
- 0.1.0 — 2015-10-22

## README

# What is it?

This plugin exposes `Activity::moveTaskToBack` in cordova and thus allows to
move the app to the back of the activity stack, effectively returning to the
previous activity without terminating.

# How to use it?

## Installation

Install the plugin into your cordova project via

    cordova plugin add cordova-android-movetasktoback

After installation the plugin exposes the method `mayflower.moveTaskToBack`.

## API

Call `mayflower.moveTaskToBack()` to move the task to the back of the stack.
Success or failure are returned as a [Promises/A+](https://promisesaplus.com/)
compliant promise.

    mayflower.moveTaskToBack()
        .then(function() {
            console.log('success');
        })
        .otherwise(function(e) {
            console.log('failed: ' + e);
    });

**Important:** This plugin is specific to android. On all other platforms, the
call will fail and return a rejected promise.

# Test / Usage sample

There is a small usage sample in `test/index.html`. In order to use it, you'll
have to create a cordova project, add the plugin and configure `test/index.html`
as your entrypoint. The resulting app will show you a periodically increasing
counter and a button that returns to the launcher without terminating the app.

# License

The plugin is published under the Apache license v2.0 .

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