feat(background-mode): added moveToBackground and moveToForeground (#1181)

feat(background-mode): add missing functions moveToBackground and moveToForeground as explained in https://github.com/driftyco/ionic-native/issues/1180
This commit is contained in:
gujiman 2017-03-13 20:59:20 +00:00 committed by Ibby Hadeed
parent 6683aa450c
commit 95ac7e1855

View File

@ -123,6 +123,24 @@ export class BackgroundMode {
})
static on(event: string): Observable<any> { return; }
/**
* Android allows to programmatically move from foreground to background.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
static moveToBackground(): void {}
/**
* Android allows to programmatically move from background to foreground.
*/
@Cordova({
platforms: ['Android'],
sync: true
})
static moveToForeground(): void {}
/**
* Override the back button on Android to go to background instead of closing the app.
*/