Last active
July 14, 2017 20:24
-
-
Save matthieu-D/8d4208edb9e4b611798cc94f4d1ecd43 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Platform } from 'ionic-angular'; | |
import { BackgroundMode } from '@ionic-native/background-mode'; | |
. | |
. | |
. | |
export class HomePage { | |
constructor(public backgroundMode: BackgroundMode, public platform: Platform) { | |
platform.ready().then(() => { | |
this.backgroundMode.on('activate').subscribe(() => { | |
console.log('activated'); | |
}); | |
this.backgroundMode.enable(); | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment