From d2e4d3e5cec7a3a08c2d4222600c623527075de5 Mon Sep 17 00:00:00 2001 From: Akshay Dwivedi Date: Tue, 19 Nov 2019 16:36:31 +0800 Subject: [PATCH] feat(background-mode): add disableBatteryOptimizations function (#3235) implemented disableBatteryOptimizations() method #3085 --- src/@ionic-native/plugins/background-mode/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/@ionic-native/plugins/background-mode/index.ts b/src/@ionic-native/plugins/background-mode/index.ts index c55aee9a2..86c50e221 100644 --- a/src/@ionic-native/plugins/background-mode/index.ts +++ b/src/@ionic-native/plugins/background-mode/index.ts @@ -267,4 +267,13 @@ export class BackgroundMode extends IonicNativePlugin { sync: true }) unlock(): void {} + + /** + * Disables battery optimazation mode for the app (android only) + */ + @Cordova({ + platforms: ['Android'], + sync: true + }) + disableBatteryOptimizations(): void {} }