mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Notification are working
This commit is contained in:
@@ -134,8 +134,8 @@ export class HomePage implements OnInit {
|
||||
|
||||
this.logDeviceInfo();
|
||||
|
||||
// this.notificationsService.onReciveForeground();
|
||||
// this.notificationsService.onReciveBackground();
|
||||
this.notificationsService.onReciveForeground();
|
||||
this.notificationsService.onReciveBackground();
|
||||
|
||||
window.addEventListener('online', () => {
|
||||
// console.log('Became online')
|
||||
|
||||
@@ -146,7 +146,7 @@ export class NotificationsService {
|
||||
onReciveForeground() {
|
||||
PushNotifications.addListener('pushNotificationReceived',
|
||||
(notification: PushNotificationSchema) => {
|
||||
|
||||
console.log(notification)
|
||||
this.DataArray.push(notification)
|
||||
|
||||
this.storageService.store("Notifications", this.DataArray)
|
||||
@@ -160,7 +160,7 @@ export class NotificationsService {
|
||||
onReciveBackground() {
|
||||
PushNotifications.addListener('pushNotificationActionPerformed',
|
||||
(notification: ActionPerformed) => {
|
||||
|
||||
console.log(notification)
|
||||
/* this.DataArray.push(notification.notification)
|
||||
|
||||
this.storageService.store("Notifications", this.DataArray)
|
||||
|
||||
Reference in New Issue
Block a user