mirror of
https://bitbucket.org/TheBosZ/cordova-plugin-run-in-background
synced 2025-12-17 11:53:21 +00:00
Add fix for moveToForeground. Requires new permission for Android 10
This commit is contained in:
@@ -79,7 +79,9 @@ cordova.plugins.backgroundMode.un('EVENT', function);
|
||||
## Android specifics
|
||||
|
||||
### Transit between application states
|
||||
Android allows to programmatically move from foreground to background or vice versa.
|
||||
Android allows to programmatically move from foreground to background or vice versa.
|
||||
|
||||
Note: starting with Android 10, you must request the "Draw on Top" permission from the user or the call to `moveToForeground` will silently fail. You can request it with `cordova.plugins.backgroundMode.requestForegroundPermission();`. This permission isn't necessary for `moveToBackground`
|
||||
|
||||
```js
|
||||
cordova.plugins.backgroundMode.moveToBackground();
|
||||
|
||||
Reference in New Issue
Block a user