Background Mode

Contents

Cordova plugin to prevent the app from going to sleep while in background. Requires Cordova plugin: cordova-plugin-background-mode. For more info about plugin, visit: https://github.com/katzer/cordova-plugin-background-mode

Installation

ionic cordova plugin add cordova-plugin-background-modenpm install @ionic-native/background-mode
Ionic EE comes with fully supported and maintained plugins from the Ionic Team. Learn More or Contact Us
ionic enterprise register --key=YOURPRODUCTKEYnpm install @ionic-enterprise/background-mode

Supported Platforms

  • AmazonFire OS
  • Android
  • Browser
  • iOS
  • Windows

Usage

import { BackgroundMode } from '@ionic-native/background-mode/ngx';

constructor(private backgroundMode: BackgroundMode) { }

...

this.backgroundMode.enable();