Skip to content

Commit 95ac7e1

Browse files
gujimanihadeed
authored andcommitted
feat(background-mode): added moveToBackground and moveToForeground (#1181)
feat(background-mode): add missing functions moveToBackground and moveToForeground as explained in #1180
1 parent 6683aa4 commit 95ac7e1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/plugins/backgroundmode.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,24 @@ export class BackgroundMode {
123123
})
124124
static on(event: string): Observable<any> { return; }
125125

126+
/**
127+
* Android allows to programmatically move from foreground to background.
128+
*/
129+
@Cordova({
130+
platforms: ['Android'],
131+
sync: true
132+
})
133+
static moveToBackground(): void {}
134+
135+
/**
136+
* Android allows to programmatically move from background to foreground.
137+
*/
138+
@Cordova({
139+
platforms: ['Android'],
140+
sync: true
141+
})
142+
static moveToForeground(): void {}
143+
126144
/**
127145
* Override the back button on Android to go to background instead of closing the app.
128146
*/

0 commit comments

Comments
 (0)