mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs(fcm): improve example
docs(fcm): improve example
This commit is contained in:
commit
a3f63a61b9
@ -31,25 +31,25 @@ export interface NotificationData {
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* fcm.subscribeToTopic('marketing');
|
||||
* this.fcm.subscribeToTopic('marketing');
|
||||
*
|
||||
* fcm.getToken().then(token=>{
|
||||
* this.fcm.getToken().then(token => {
|
||||
* backend.registerToken(token);
|
||||
* })
|
||||
* });
|
||||
*
|
||||
* fcm.onNotification().subscribe(data=>{
|
||||
* this.fcm.onNotification().subscribe(data => {
|
||||
* if(data.wasTapped){
|
||||
* console.log("Received in background");
|
||||
* } else {
|
||||
* console.log("Received in foreground");
|
||||
* };
|
||||
* })
|
||||
* });
|
||||
*
|
||||
* fcm.onTokenRefresh().subscribe(token=>{
|
||||
* this.fcm.onTokenRefresh().subscribe(token => {
|
||||
* backend.registerToken(token);
|
||||
* })
|
||||
* });
|
||||
*
|
||||
* fcm.unsubscribeFromTopic('marketing');
|
||||
* this.fcm.unsubscribeFromTopic('marketing');
|
||||
*
|
||||
* ```
|
||||
* @interfaces
|
||||
|
Loading…
Reference in New Issue
Block a user