From 448e06401266e283379bb61e5c87077679a65ae3 Mon Sep 17 00:00:00 2001 From: Dima Vishnevetsky Date: Fri, 4 Jan 2019 23:06:37 +0200 Subject: [PATCH] docs(firebase): add onNotificationOpen usage example (#2835) --- src/@ionic-native/plugins/firebase/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/@ionic-native/plugins/firebase/index.ts b/src/@ionic-native/plugins/firebase/index.ts index 893548935..9c4c1cd4b 100644 --- a/src/@ionic-native/plugins/firebase/index.ts +++ b/src/@ionic-native/plugins/firebase/index.ts @@ -19,6 +19,9 @@ import { Observable } from 'rxjs/Observable'; * .then(token => console.log(`The token is ${token}`)) // save the token server-side and use it to push notifications to this device * .catch(error => console.error('Error getting token', error)); * + * this.firebase.onNotificationOpen() + * .subscribe(data => console.log(`User opened a notification ${data}`)); + * * this.firebase.onTokenRefresh() * .subscribe((token: string) => console.log(`Got a new token ${token}`)); *