Skip to content

Commit

Permalink
feat(push): add Browser Push notification support (#1848)
Browse files Browse the repository at this point in the history
* Browser Push interface with options to use push notification with browsers , as a proxy to phonegap-plush-plugin

* making both properties optional
  • Loading branch information
mariohmol authored and ihadeed committed Aug 23, 2017
1 parent 57bbcde commit aa4c3b3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/@ionic-native/plugins/push/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,25 @@ export interface AndroidPushOptions {
topics?: string[];
}

export interface BrowserPushOptions {
/**
* Optional. Your GCM API key if you are using VAPID keys.
*/
applicationServerKey?: string;

/**
* URL for the push server you want to use.
* Default: http://push.api.phonegap.com/v1/push Optional.
*/
pushServiceURL?: string;

}

export interface PushOptions {
ios?: IOSPushOptions;
android?: AndroidPushOptions;
windows?: any;
browser?: BrowserPushOptions;
}

export type PushEvent = 'registration' | 'error' | 'notification';
Expand Down Expand Up @@ -237,7 +252,10 @@ export type PushEvent = 'registration' | 'error' | 'notification';
* badge: true,
* sound: 'false'
* },
* windows: {}
* windows: {},
* browser: {
* pushServiceURL: 'http://push.api.phonegap.com/v1/push'
* }
* };
*
* const pushObject: PushObject = this.push.init(options);
Expand All @@ -257,6 +275,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
* NotificationEventAdditionalData
* IOSPushOptions
* AndroidPushOptions
* BrowserPushOptions
* PushOptions
*/
@Plugin({
Expand Down

0 comments on commit aa4c3b3

Please sign in to comment.