mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-04-13 00:00:10 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Plugin, IonicNativePlugin, Cordova } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
@@ -42,7 +42,7 @@ export interface NotificationData {
|
||||
* console.log("Received in background");
|
||||
* } else {
|
||||
* console.log("Received in foreground");
|
||||
* };
|
||||
* }
|
||||
* })
|
||||
*
|
||||
* fcm.onTokenRefresh().subscribe(token=>{
|
||||
@@ -71,7 +71,9 @@ export class FCM extends IonicNativePlugin {
|
||||
* @returns {Promise<string>} Returns a Promise that resolves with the registration id token
|
||||
*/
|
||||
@Cordova()
|
||||
getToken(): Promise<string> { return; }
|
||||
getToken(): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event firing on the token refresh
|
||||
@@ -81,7 +83,9 @@ export class FCM extends IonicNativePlugin {
|
||||
@Cordova({
|
||||
observable: true
|
||||
})
|
||||
onTokenRefresh(): Observable<string> { return; }
|
||||
onTokenRefresh(): Observable<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribes you to a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||
@@ -91,7 +95,9 @@ export class FCM extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise resolving in result of subscribing to a topic
|
||||
*/
|
||||
@Cordova()
|
||||
subscribeToTopic(topic: string): Promise<any> { return; }
|
||||
subscribeToTopic(topic: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unubscribes you from a [topic](https://firebase.google.com/docs/notifications/android/console-topics)
|
||||
@@ -101,7 +107,9 @@ export class FCM extends IonicNativePlugin {
|
||||
* @returns {Promise<any>} Returns a promise resolving in result of unsubscribing from a topic
|
||||
*/
|
||||
@Cordova()
|
||||
unsubscribeFromTopic(topic: string): Promise<any> { return; }
|
||||
unsubscribeFromTopic(topic: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch for incoming notifications
|
||||
@@ -113,6 +121,8 @@ export class FCM extends IonicNativePlugin {
|
||||
successIndex: 0,
|
||||
errorIndex: 2
|
||||
})
|
||||
onNotification(): Observable<NotificationData> { return; }
|
||||
onNotification(): Observable<NotificationData> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user