import { BackgroundMode } from '@ionic-native/background-mode' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; /**
 * Configurations items that can be updated.
 */ export interface BackgroundModeConfiguration { /**
     * Title of the background task
     */ title ? : String ; /**
     * Description of background task
     */ text ? : String ; /**
     * This will look for <icon name>.png in platforms/android/res/drawable|mipmap
     */ icon ? : string ; color ? : string ; /**
     * By default the app will come to foreground when taping on the notification. If false, plugin wont come to foreground when tapped.
     */ resume ? : boolean ; hidden ? : boolean ; bigText ? : boolean ; /**
     * The text that scrolls itself on statusbar
     */ ticker ? : String ; /**
     * if true plugin will not display a notification. Default is false.
     */ silent ? : boolean ; } export class BackgroundModeMock extends BackgroundMode { /**
     * Enable the background mode.
     * Once called, prevents the app from being paused while in background.
     */ enable ( ) { } ; /**
     * Disable the background mode.
     * Once the background mode has been disabled, the app will be paused when in background.
     */ disable ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { boolean } isEnabled ( ) { return true ; } ; returns { boolean } isActive ( ) { return true ; } ; param { BackgroundModeConfiguration } options setDefaults ( options ? ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { BackgroundModeConfiguration } options configure ( options ? ) { } ; param event { string } returns { Observable < any > } on ( event ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; /**
     * Android allows to programmatically move from foreground to background.
     */ moveToBackground ( ) { } ; /**
     * Enable GPS-tracking in background (Android).
     */ disableWebViewOptimizations ( ) { } ; /**
     * Android allows to programmatically move from background to foreground.
     */ moveToForeground ( ) { } ; /**
     * Override the back button on Android to go to background instead of closing the app.
     */ overrideBackButton ( ) { } ; /**
     * Exclude the app from the recent task list works on Android 5.0+.
     */ excludeFromTaskList ( ) { } ; /**
     * The method works async instead of isActive() or isEnabled().
     */ isScreenOff ( ) { return new Promise ( ( resolve , reject ) => { resolve ( false ) ; } ) ; } ; /**
     * Turn screen on
     */ wakeUp ( ) { } ; /**
     * Turn screen on and show app even locked
     */ unlock ( ) { } ; }