我已经安装了backgroundMode,backgroundGeolocation和失眠,但我还在敲打我的脑袋。
我越来越渴望向别人寻求帮助。
请大师,帮帮我哈哈
home.ts
constructor(public navCtrl: NavController,
public navParams: NavParams,
public member:Member,
public journey: Journey,
public backgroundMode: BackgroundMode,
public insomnia: Insomnia,
platform: Platform) {
platform.ready().then(() => {
this.backgroundMode.enable();
this.insomnia.keepAwake()
.then(
() => console.log('success'),
() => console.log('error')
);
});
this.member.onLoggedIn.subscribe(
(data) => {
this.memberLoggedIn();
}
);
this.member.onLoggedOut.subscribe(
(data) => {
this.memberLoggedOut();
}
);
}
答案 0 :(得分:0)
我设法解决此问题的唯一方法是关闭手机上的省电模式:(