Add silent mode for Android

Fixes issue #39 and #48
This commit is contained in:
Sebastián Katzer
2015-01-01 17:24:37 +01:00
parent 0b9854e1bc
commit 270abbff02
4 changed files with 36 additions and 9 deletions

View File

@@ -68,16 +68,13 @@ More informations can be found [here][PGB_plugin].
## ChangeLog
#### Version 0.6.3 (not yet released)
- [feature:] Silent mode for Android
#### Version 0.6.2 (14.12.2014)
- [bugfix:] Type error
- [bugfix:] Wrong default values for `isEnabled` and `isActive`.
#### Version 0.6.1 (14.12.2014)
- [enhancement:] Set default settings through `setDefaults`.
- [enhancement:] New method `isEnabled` to receive if mode is enabled.
- [enhancement:] New method `isActive` to receive if mode is active.
- [bugfix:] Events caused thread collision.
#### Further informations
- The former `plugin.backgroundMode` namespace has been deprecated and will be removed with the next major release.
- See [CHANGELOG.md][changelog] to get the full changelog for the plugin.
@@ -229,6 +226,15 @@ cordova.plugins.backgroundMode.configure({
})
```
#### Run in background without notification
In silent mode the plugin will not display a notification - which is not the default. Be aware that Android recommends adding a notification otherwise the OS may pause the app.
```javascript
cordova.plugins.backgroundMode.configure({
silent: true
})
```
## Contributing