From abe5d58f9d422effe815977dbaf3b50f2a3c0d97 Mon Sep 17 00:00:00 2001 From: Ibby Date: Thu, 15 Dec 2016 08:16:22 -0500 Subject: [PATCH] feat(push): add subscribe/unsubscribe fixes #861 --- src/plugins/push.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/plugins/push.ts b/src/plugins/push.ts index 6684c1d88..201b01826 100644 --- a/src/plugins/push.ts +++ b/src/plugins/push.ts @@ -331,4 +331,20 @@ export class Push { return; } + /** + * The subscribe method is used when the application wants to subscribe a new topic to receive push notifications. + * @param topic {string} Topic to subscribe to. + * @return {Promise} + */ + @CordovaInstance() + subscribe(topic: string): Promise { return; } + + /** + * The unsubscribe method is used when the application no longer wants to receive push notifications from a specific topic but continue to receive other push messages. + * @param topic {string} Topic to unsubscribe from. + * @return {Promise} + */ + @CordovaInstance() + unsubscribe(topic: string): Promise { return; } + }