cordova-plugin-background-enable
Advanced tools
Comparing version 0.7.4 to 0.7.5
{ | ||
"name": "cordova-plugin-background-enable", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"description": "Prevent apps from going to sleep in background.", | ||
@@ -15,3 +15,3 @@ "cordova": { | ||
"type": "git", | ||
"url": "git+https://github.com/bloodf/cordova-plugin-background-mode.git" | ||
"url": "git+https://github.com/bloodf/cordova-plugin-background-enable.git" | ||
}, | ||
@@ -39,5 +39,5 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/bloodf/cordova-plugin-background-mode/issues" | ||
"url": "https://github.com/bloodf/cordova-plugin-background-enable/issues" | ||
}, | ||
"homepage": "https://github.com/bloodf/cordova-plugin-background-mode#readme" | ||
"homepage": "https://github.com/bloodf/cordova-plugin-background-enable#readme" | ||
} |
<p align="left"> | ||
<b><a href="https://github.com/katzer/cordova-plugin-background-mode/tree/example">SAMPLE APP</a> :point_right:</b> | ||
<b><a href="https://github.com/katzer/cordova-plugin-background-enable/tree/example">SAMPLE APP</a> :point_right:</b> | ||
</p> | ||
Cordova Background Plugin [![npm version](https://badge.fury.io/js/cordova-plugin-background-mode.svg)](http://badge.fury.io/js/cordova-plugin-background-mode) [![Build Status](https://travis-ci.org/katzer/cordova-plugin-background-mode.svg?branch=master)](https://travis-ci.org/katzer/cordova-plugin-background-mode) [![codebeat badge](https://codebeat.co/badges/49709283-b313-4ced-8630-f520baaec7b5)](https://codebeat.co/projects/github-com-katzer-cordova-plugin-background-mode) | ||
Cordova Background Plugin [![npm version](https://badge.fury.io/js/cordova-plugin-background-enable.svg)](http://badge.fury.io/js/cordova-plugin-background-enable) [![Build Status](https://travis-ci.org/katzer/cordova-plugin-background-enable.svg?branch=master)](https://travis-ci.org/katzer/cordova-plugin-background-enable) [![codebeat badge](https://codebeat.co/badges/49709283-b313-4ced-8630-f520baaec7b5)](https://codebeat.co/projects/github-com-katzer-cordova-plugin-background-enable) | ||
========================= | ||
@@ -32,23 +32,10 @@ | ||
$ cordova plugin add cordova-plugin-background-mode | ||
$ cordova plugin add cordova-plugin-background-enable | ||
Or install a specific version: | ||
$ cordova plugin add de.appplant.cordova.plugin.background-mode@VERSION | ||
Or install the latest head version: | ||
$ cordova plugin add https://github.com/katzer/cordova-plugin-background-mode.git | ||
Or install from local source: | ||
$ cordova plugin add cordova-plugin-background-mode --searchpath <path> | ||
## Usage | ||
The plugin creates the object `cordova.plugins.backgroundMode` and is accessible after the *deviceready* event has been fired. | ||
The plugin creates the object `cordova.plugins.backgroundEnable` and is accessible after the *deviceready* event has been fired. | ||
```js | ||
document.addEventListener('deviceready', function () { | ||
// cordova.plugins.backgroundMode is now available | ||
// cordova.plugins.backgroundEnable is now available | ||
}, false); | ||
@@ -61,5 +48,5 @@ ``` | ||
```js | ||
cordova.plugins.backgroundMode.enable(); | ||
cordova.plugins.backgroundEnable.enable(); | ||
// or | ||
cordova.plugins.backgroundMode.setEnabled(true); | ||
cordova.plugins.backgroundEnable.setEnabled(true); | ||
``` | ||
@@ -69,5 +56,5 @@ | ||
```js | ||
cordova.plugins.backgroundMode.disable(); | ||
cordova.plugins.backgroundEnable.disable(); | ||
// or | ||
cordova.plugins.backgroundMode.setEnabled(false); | ||
cordova.plugins.backgroundEnable.setEnabled(false); | ||
``` | ||
@@ -79,3 +66,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.isActive(); // => boolean | ||
cordova.plugins.backgroundEnable.isActive(); // => boolean | ||
``` | ||
@@ -89,3 +76,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.on('EVENT', function); | ||
cordova.plugins.backgroundEnable.on('EVENT', function); | ||
``` | ||
@@ -95,3 +82,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.un('EVENT', function); | ||
cordova.plugins.backgroundEnable.un('EVENT', function); | ||
``` | ||
@@ -106,5 +93,5 @@ | ||
```js | ||
cordova.plugins.backgroundMode.moveToBackground(); | ||
cordova.plugins.backgroundEnable.moveToBackground(); | ||
// or | ||
cordova.plugins.backgroundMode.moveToForeground(); | ||
cordova.plugins.backgroundEnable.moveToForeground(); | ||
``` | ||
@@ -116,3 +103,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.overrideBackButton(); | ||
cordova.plugins.backgroundEnable.overrideBackButton(); | ||
``` | ||
@@ -124,3 +111,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.excludeFromTaskList(); | ||
cordova.plugins.backgroundEnable.excludeFromTaskList(); | ||
``` | ||
@@ -132,3 +119,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.isScreenOff(function(bool) { | ||
cordova.plugins.backgroundEnable.isScreenOff(function(bool) { | ||
... | ||
@@ -143,5 +130,5 @@ }); | ||
// Turn screen on | ||
cordova.plugins.backgroundMode.wakeUp(); | ||
cordova.plugins.backgroundEnable.wakeUp(); | ||
// Turn screen on and show app even locked | ||
cordova.plugins.backgroundMode.unlock(); | ||
cordova.plugins.backgroundEnable.unlock(); | ||
``` | ||
@@ -156,3 +143,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.setDefaults({ | ||
cordova.plugins.backgroundEnable.setDefaults({ | ||
title: String, | ||
@@ -170,3 +157,3 @@ text: String, | ||
```js | ||
cordova.plugins.backgroundMode.configure({ ... }); | ||
cordova.plugins.backgroundEnable.configure({ ... }); | ||
``` | ||
@@ -180,3 +167,3 @@ | ||
```js | ||
cordova.plugins.backgroundMode.setDefaults({ silent: true }); | ||
cordova.plugins.backgroundEnable.setDefaults({ silent: true }); | ||
``` | ||
@@ -190,4 +177,4 @@ | ||
```js | ||
cordova.plugins.backgroundMode.on('activate', function() { | ||
cordova.plugins.backgroundMode.disableWebViewOptimizations(); | ||
cordova.plugins.backgroundEnable.on('activate', function() { | ||
cordova.plugins.backgroundEnable.disableWebViewOptimizations(); | ||
}); | ||
@@ -194,0 +181,0 @@ ``` |
@@ -49,2 +49,2 @@ /* | ||
cordova.commandProxy.add('BackgroundMode', exports); | ||
cordova.commandProxy.add('BackgroundEnable', exports); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
179300
17
494
195
1