Ibm web packge added

This commit is contained in:
Eudes Inácio
2021-06-25 15:03:10 +01:00
parent c5242991bf
commit eb499f50a7
4 changed files with 44 additions and 1 deletions
+19 -1
View File
@@ -8,6 +8,7 @@ import { NotificationsService } from '../services/notifications.service';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras,Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import MFPPush from 'ibm-mfp-web-push';
@Component({
selector: 'app-home',
@@ -67,7 +68,14 @@ export class HomePage implements OnInit {
ngOnInit() {
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
WL.Client.init(this.wlInitOptions)
/* var pushInitOptions = {
appId: "com.gpr.gabinetedigital",
serverUrl:"https://mfp-server-url.com",
safariWebsitePushId:"web.com.mfp-server-url"
};
MFPPush.initialize(pushInitOptions); */
} else {
this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification();
@@ -133,4 +141,14 @@ export class HomePage implements OnInit {
);
}
wlInitOptions = {
mfpContextRoot : '/mfp', // "mfp" is the default context root in the Mobile Foundation
applicationId : 'com.gpr.gabinetedigital', // Replace with your own value.
sessionMode : true //This is an optional paramter. Setting this to true ensures that MFP related data is stored in the session rather than in the local storage. If this option is set to false or not set at all, default is local storage.
};
}