trying migration from cordova to capacitor

This commit is contained in:
tiago.kayaya
2021-11-04 10:41:43 +01:00
parent 0cb4097c88
commit 98cb655735
12 changed files with 268 additions and 2199 deletions
+4 -9
View File
@@ -1,7 +1,6 @@
/* eslint-disable */
/* tslint:disable */
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
import { Component, OnInit, NgZone } from '@angular/core';
import { Event } from '../models/event.model';
import { NotificationsService } from '../services/notifications.service';
@@ -121,7 +120,6 @@ export class HomePage implements OnInit {
this.backgroundservice.online()
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.webnotification.webconnection();
this.webnotification.register();
} else {
this.mobilefirstConnect();
this.notificationsService.onReceviNotification();
@@ -148,7 +146,7 @@ export class HomePage implements OnInit {
console.log("Mobileconecct");
if (window['WLAuthorizationManager']) {
/* if (window['WLAuthorizationManager']) {
if (window['WLAuthorizationManager'].obtainAccessToken) {
window['WLAuthorizationManager'].obtainAccessToken("").then((token) => {
@@ -172,13 +170,10 @@ export class HomePage implements OnInit {
}, (error) => {
console.log('MobileFirst Server connect: failure ' + error.responseText);
console.log(JSON.stringify(error))
/* this.zone.run(() => {
console.log("Bummer...");
console.log("Failed to connect to MobileFirst Server");
}); */
});
}
}
} */
}