Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
BackgroundMode.disable();
if (platform.is('ios')) {
window['plugins'].sqlDB.remove('data.db', 2, this.removeDBSucceeded, this.removeDBFailed);
window['plugins'].sqlDB.copy('data.db', 2, this.copyDBSucceeded, this.copyDBFailed);
} else if (platform.is('android')) {
window['plugins'].sqlDB.remove('data.db', 0, this.removeDBSucceeded, this.removeDBFailed);
window['plugins'].sqlDB.copy('data.db', 0, this.copyDBSucceeded, this.copyDBFailed);
} else {
this.presentAlert(this.databseAlert);
}
this.events.subscribe('auth:customizedExpiration', (time) => {
console.log('User is automatically logged out at ' + time);
this.presentAlert(this.sessionAlert);
platform.ready().then(() => {
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
this.configServ.setMusicPlayed(false);
// Listen for pause event (emits when the native platform puts the application into the background)
platform.pause.subscribe(() => {
this.configServ.setPauseEmitted('Y');
if (this.configServ.getUserPin().length >= 4) {
this.nav.setRoot(HomePage);
}
});
}, (error) => {
console.log(error);
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
});
}
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
this.initPushNotification();
});
}
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
if(this.auth.isAuthenticated()) {
this.rootPage = HomePage;
} else {
this.rootPage = LoginPage;
}
});
}
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
});
}
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
});
}
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
StatusBar.styleDefault();
Splashscreen.hide();
});
}
platform.ready().then(() => {
StatusBar.overlaysWebView(true); // let status bar overlay webview
StatusBar.backgroundColorByHexString('#3DC960'); // set status bar to white
Splashscreen.hide();
this.initApp();
});
}
platform.ready().then(() => {
StatusBar.styleDefault();
Splashscreen.hide();
});
}