Remove IBM push notification and jsonstore, added cordova notifications

This commit is contained in:
Eudes Inácio
2021-10-30 16:51:29 +01:00
parent cd88f49469
commit f61723599e
13 changed files with 165 additions and 473 deletions
+15 -1
View File
@@ -8,6 +8,7 @@ import * as _rollupMoment from 'moment';
import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';
const moment = _rollupMoment || _moment;
import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';
import { SqliteService } from 'src/app/services/sqlite.service';
import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';
@@ -37,7 +38,8 @@ export class AppComponent {
private platform: Platform,
/* private splashScreen: SplashScreen, */
private statusBar: StatusBar,
private screenOrientation: ScreenOrientation
private screenOrientation: ScreenOrientation,
private sqliteservice: SqliteService
) {
this.initializeApp();
}
@@ -51,7 +53,19 @@ export class AppComponent {
this.screenOrientation.unlock();
} else if( this.platform.is("mobile")) {
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY);
console.log('Orientation locked')
}
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
} else {
try {
this.sqliteservice.databaseConn();
} catch (error) {
console.log("Error creating local database: ", error)
}
}
});
}
}