mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2025-12-17 11:53:21 +00:00
Receive if the background mode is enabled
This commit is contained in:
15
README.md
15
README.md
@@ -61,7 +61,7 @@ cordova plugin rm de.appplant.cordova.plugin.background-mode
|
||||
### PhoneGap Build
|
||||
Add the following xml to your config.xml to always use the latest version of this plugin:
|
||||
```xml
|
||||
<gap:plugin name="de.appplant.cordova.plugin.background-mode" version="0.6.0" source="plugins.cordova.io" />
|
||||
<gap:plugin name="de.appplant.cordova.plugin.background-mode" version="0.6.0" source="plugins.cordova.io" />
|
||||
```
|
||||
|
||||
More informations can be found [here][PGB_plugin].
|
||||
@@ -69,8 +69,9 @@ More informations can be found [here][PGB_plugin].
|
||||
|
||||
## ChangeLog
|
||||
#### Version 0.6.1 (not yet released)
|
||||
- [feature:] Get default settings through `getDefaults`.
|
||||
- [feature:] Set default settings through `setDefaults`.
|
||||
- [enhancement:] Set default settings through `setDefaults`.
|
||||
- [enhancement:] New method `isEnabled`
|
||||
- [bugfix:] Events caused thread collision.
|
||||
|
||||
#### Further informations
|
||||
- The former `plugin.backgroundMode` namespace has been deprecated and will be removed with the next major release.
|
||||
@@ -85,6 +86,7 @@ The plugin creates the object ```cordova.plugins.backgroundMode``` with the fol
|
||||
|
||||
1. [backgroundMode.enable][enable]
|
||||
2. [backgroundMode.disable][disable]
|
||||
3. [backgroundMode.isEnabled][is_enabled]
|
||||
3. [backgroundMode.getDefaults][android_specifics]
|
||||
4. [backgroundMode.setDefaults][android_specifics]
|
||||
2. [backgroundMode.configure][android_specifics]
|
||||
@@ -122,6 +124,13 @@ The background mode can be disabled through the `backgroundMode.disable` interfa
|
||||
cordova.plugins.backgroundMode.disable();
|
||||
```
|
||||
|
||||
### Receive if the background mode is enabled
|
||||
The `backgroundMode.isActivated` interface can be used to get the information if the background mode is enabled or disabled.
|
||||
|
||||
```javascript
|
||||
var enabled = cordova.plugins.backgroundMode.isEnabled();
|
||||
```
|
||||
|
||||
### Get informed when the background mode has been activated
|
||||
The `backgroundMode.onactivate` interface can be used to get notified when the background mode has been activated.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user