mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove white background
This commit is contained in:
@@ -65,6 +65,7 @@ export class NotificationsService {
|
||||
}
|
||||
|
||||
requestPermissions() {
|
||||
console.log('init notificaton permission')
|
||||
|
||||
if (this.platform.is('mobile')) {
|
||||
if (!this.isPushNotificationsAvailable) {
|
||||
@@ -72,17 +73,22 @@ export class NotificationsService {
|
||||
}
|
||||
PushNotifications.requestPermissions().then(async (result) => {
|
||||
if (result.receive === 'granted') {
|
||||
console.log('permission granted')
|
||||
// Register with Apple / Google to receive push via APNS/FCM
|
||||
try {
|
||||
PushNotifications.register().catch((error) => {
|
||||
console.log("Register device", error)
|
||||
PushNotifications.register().then((value) => {
|
||||
console.log("Register device", value)
|
||||
this.getAndpostToken("")
|
||||
}) .catch((error) => {
|
||||
console.log("Register device error", error)
|
||||
})
|
||||
this.getAndpostToken("")
|
||||
|
||||
} catch (error) {
|
||||
console.log("Granted permission error", error)
|
||||
}
|
||||
} else {
|
||||
// Show some error
|
||||
console.log('permission notification erro')
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user