ref(background-mode): fix wront types

This commit is contained in:
Daniel Sogl 2018-03-16 14:13:26 +01:00 committed by GitHub
parent f11be24f74
commit 7961768803
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,27 +2,26 @@ import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
/**
* Configurations items that can be updated.
*/
export interface BackgroundModeConfiguration {
/**
* Title of the background task
*/
title?: String;
title?: string;
/**
* Description of background task
*/
text?: String;
text?: string;
/**
* This will look for `<icon name>.png` in platforms/android/res/drawable|mipmap
*/
icon?: string;
/** Color */
color?: string;
/**
@ -30,20 +29,21 @@ export interface BackgroundModeConfiguration {
*/
resume?: boolean;
/** Hidden */
hidden?: boolean;
/** Big text */
bigText?: boolean;
/**
* The text that scrolls itself on statusbar
*/
ticker?: String;
ticker?: string;
/**
* if true plugin will not display a notification. Default is false.
*/
silent?: boolean;
}
/**
@ -74,7 +74,6 @@ export interface BackgroundModeConfiguration {
})
@Injectable()
export class BackgroundMode extends IonicNativePlugin {
/**
* Enable the background mode.
* Once called, prevents the app from being paused while in background.
@ -82,14 +81,16 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
enable(): void { }
enable(): void {}
/**
* Disable the background mode.
* Once the background mode has been disabled, the app will be paused when in background.
*/
@Cordova()
disable(): Promise<any> { return; }
disable(): Promise<any> {
return;
}
/**
* Checks if background mode is enabled or not.
@ -98,7 +99,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
isEnabled(): boolean { return; }
isEnabled(): boolean {
return;
}
/**
* Can be used to get the information if the background mode is active.
@ -107,7 +110,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
sync: true
})
isActive(): boolean { return; }
isActive(): boolean {
return;
}
/**
* Override the default title, ticker and text.
@ -117,7 +122,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
setDefaults(options?: BackgroundModeConfiguration): Promise<any> { return; }
setDefaults(options?: BackgroundModeConfiguration): Promise<any> {
return;
}
/**
* Modify the displayed information.
@ -140,7 +147,9 @@ export class BackgroundMode extends IonicNativePlugin {
clearFunction: 'un',
clearWithArgs: true
})
on(event: string): Observable<any> { return; }
on(event: string): Observable<any> {
return;
}
/**
* Android allows to programmatically move from foreground to background.
@ -149,7 +158,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
moveToBackground(): void { }
moveToBackground(): void {}
/**
* Enable GPS-tracking in background (Android).
@ -158,7 +167,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
disableWebViewOptimizations (): void { }
disableWebViewOptimizations(): void {}
/**
* Android allows to programmatically move from background to foreground.
@ -167,7 +176,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
moveToForeground(): void { }
moveToForeground(): void {}
/**
* Override the back button on Android to go to background instead of closing the app.
@ -176,7 +185,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
overrideBackButton(): void { }
overrideBackButton(): void {}
/**
* Exclude the app from the recent task list. Works on Android 5.0+.
@ -185,7 +194,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
excludeFromTaskList(): void { }
excludeFromTaskList(): void {}
/**
* The method works async instead of isActive() or isEnabled().
@ -193,7 +202,9 @@ export class BackgroundMode extends IonicNativePlugin {
@Cordova({
platforms: ['Android']
})
isScreenOff(): Promise<boolean> { return; }
isScreenOff(): Promise<boolean> {
return;
}
/**
* Turn screen on
@ -202,7 +213,7 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
wakeUp(): void { }
wakeUp(): void {}
/**
* Turn screen on and show app even locked
@ -211,6 +222,5 @@ export class BackgroundMode extends IonicNativePlugin {
platforms: ['Android'],
sync: true
})
unlock(): void { }
unlock(): void {}
}