Skip to content

Commit

Permalink
feat(background-mode): added moveToBackground and moveToForeground (#…
Browse files Browse the repository at this point in the history
…1181)

feat(background-mode): add missing functions moveToBackground and moveToForeground as explained in #1180
  • Loading branch information
gujiman authored and ihadeed committed Mar 13, 2017
1 parent 6683aa4 commit 95ac7e1
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/plugins/backgroundmode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 95ac7e1

Please sign in to comment.