mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
Update index.ts
This commit is contained in:
parent
f11be24f74
commit
af75b49aa4
@ -31,13 +31,14 @@ export interface NotificationData {
|
|||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* fcm.subscribeToTopic('marketing');
|
* this.fcm.subscribeToTopic('marketing');
|
||||||
*
|
*
|
||||||
* fcm.getToken().then(token=>{
|
* this.fcm.getToken().then(token=>{
|
||||||
|
* /* save your token on backend */
|
||||||
* backend.registerToken(token);
|
* backend.registerToken(token);
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* fcm.onNotification().subscribe(data=>{
|
* this.fcm.onNotification().subscribe(data=>{
|
||||||
* if(data.wasTapped){
|
* if(data.wasTapped){
|
||||||
* console.log("Received in background");
|
* console.log("Received in background");
|
||||||
* } else {
|
* } else {
|
||||||
@ -45,11 +46,11 @@ export interface NotificationData {
|
|||||||
* };
|
* };
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* fcm.onTokenRefresh().subscribe(token=>{
|
* this.fcm.onTokenRefresh().subscribe(token=>{
|
||||||
* backend.registerToken(token);
|
* backend.registerToken(token);
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* fcm.unsubscribeFromTopic('marketing');
|
* this.fcm.unsubscribeFromTopic('marketing');
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* @interfaces
|
* @interfaces
|
||||||
|
Loading…
Reference in New Issue
Block a user