diff --git a/package-lock.json b/package-lock.json
index 3f903fda6..82c669436 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -11254,6 +11254,28 @@
"sjcl": "^1.0.8"
}
},
+ "ibm-mfp-web-sdk": {
+ "version": "8.0.2021021706",
+ "resolved": "https://registry.npmjs.org/ibm-mfp-web-sdk/-/ibm-mfp-web-sdk-8.0.2021021706.tgz",
+ "integrity": "sha512-lk87kZzmBow7Ie+wll5zXsQo0Dok3sj7DeltHUl3rOJ0ia+5sqYOfDGJAyky8pYagGfkAEHUAoleuv8S/GwPpw==",
+ "requires": {
+ "jssha": "2.2.0",
+ "promiz": "1.0.5",
+ "sjcl": "1.0.3"
+ },
+ "dependencies": {
+ "jssha": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/jssha/-/jssha-2.2.0.tgz",
+ "integrity": "sha1-h9z2CCHcO+xZPzhVu+vM0naqzBw="
+ },
+ "sjcl": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.3.tgz",
+ "integrity": "sha1-TtSGSY7Wt0K11KIZAiaBFvBUpwk="
+ }
+ }
+ },
"ical.js": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ical.js/-/ical.js-1.4.0.tgz",
diff --git a/package.json b/package.json
index 982a4ff18..79937898a 100644
--- a/package.json
+++ b/package.json
@@ -65,6 +65,7 @@
"date-fns": "^2.17.0",
"depd": "^2.0.0",
"ibm-mfp-web-push": "^8.0.2020052213",
+ "ibm-mfp-web-sdk": "^8.0.2021021706",
"ionic-angular": "^3.9.10",
"ionic-selectable": "^4.7.1",
"ionic2-alpha-scroll": "^2.0.1",
diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index 841a86ff0..ed31cbc98 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -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.
+};
+
+
+
}
diff --git a/src/index.html b/src/index.html
index c85c54d3d..553bfaa3f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -7,6 +7,8 @@
+
+