mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
coment functions
This commit is contained in:
@@ -88,6 +88,37 @@ export class NotificationsService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onReciveForeground() {
|
||||
|
||||
if(this.platform.is('mobile')) {
|
||||
|
||||
if (!this.isPushNotificationsAvailable) {
|
||||
return false
|
||||
}
|
||||
PushNotifications.addListener('pushNotificationReceived',
|
||||
(notification: PushNotificationSchema) => {
|
||||
this.active = true
|
||||
console.log('NOtification Listener', notification)
|
||||
// this.storenotification(notification)
|
||||
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
} else {
|
||||
this.afMessaging.messages.subscribe((notification) => {
|
||||
// this.storenotification(notification)
|
||||
// this.notificationReceived.emit();
|
||||
// this.eventtrigger.publishSomeData({
|
||||
// notification: "recive"
|
||||
// })
|
||||
// Handle the received message, e.g., show a notification
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onReciveBackground() {
|
||||
|
||||
if(this.platform.is('mobile')) {
|
||||
|
||||
Reference in New Issue
Block a user