project migated to capacitor

This commit is contained in:
Eudes Inácio
2021-11-04 06:39:39 +01:00
parent d7745a1ed3
commit 84f2c1cc36
15 changed files with 310 additions and 1893 deletions
+7 -10
View File
@@ -1,6 +1,5 @@
/* eslint-disable */
/* tslint:disable */
/* ///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" /> */
import { Injectable, NgZone } from '@angular/core';
import { ActivatedRoute } from '@angular/router'
import { HttpClient } from '@angular/common/http';
@@ -11,13 +10,12 @@ import { Token } from '../models/token.model';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras, Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
import { JsonStore } from './jsonStore.service';
import { BackgroundService } from './background.service';
import { v4 as uuidv4 } from 'uuid';
import { EventTrigger } from '../services/eventTrigger.service';
import { SessionStore } from '../store/session.service';
import { FCM } from '@ionic-native/fcm/ngx';
//import { FCM } from '@ionic-native/fcm/ngx';
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
@Injectable({
@@ -27,7 +25,7 @@ export class NotificationsService {
adding: "intervenient" | "CC" = "intervenient";
folderId: string;
DataArray: Array<String> = [];
DataArray = new Array();
callbacks: {
type: string,
@@ -46,10 +44,9 @@ export class NotificationsService {
private toastService: ToastService,
private zone: NgZone,
private activeroute: ActivatedRoute,
private jsonstore: JsonStore,
private eventtrigger: EventTrigger,
private backgroundservice: BackgroundService,
private fcm: FCM) {
/* private fcm: FCM */) {
this.storageService.get("Notifications").then((value) => {
@@ -88,7 +85,7 @@ export class NotificationsService {
return this.http.get<Token[]>(`${geturl}`);
}
getAndpostToken(username) {
/* getAndpostToken(username) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
@@ -135,14 +132,14 @@ export class NotificationsService {
console.log(data.Object)
console.log(data.IdObject)
/* this.DataArray.push(data)
this.DataArray.push(data)
console.log("On ReceiveNotification", this.DataArray)
this.storageService.store("Notifications", this.DataArray) */
this.storageService.store("Notifications", this.DataArray)
};
});
}
} */
/////////////////////////////////////////////////////