mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
feat(push): update PushOptions interfaces to match new version (#1908)
BREAKING CHANGE: this wrapper will work only with `phonegap-plugin-push@2.0.0`
This commit is contained in:
parent
1b04ebb5e2
commit
34bf136703
@ -62,16 +62,10 @@ export interface NotificationEventAdditionalData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IOSPushOptions {
|
export interface IOSPushOptions {
|
||||||
/**
|
|
||||||
* Maps to the project number in the Google Developer Console. Setting this
|
|
||||||
* uses GCM for notifications instead of native.
|
|
||||||
*/
|
|
||||||
senderID?: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether to use prod or sandbox GCM setting.
|
* Whether to use prod or sandbox GCM setting.
|
||||||
*/
|
*/
|
||||||
gcmSandbox?: boolean | string;
|
fcmSandbox?: boolean | string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If true the device shows an alert on receipt of notification.
|
* If true the device shows an alert on receipt of notification.
|
||||||
@ -137,11 +131,6 @@ export interface CategoryActionData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface AndroidPushOptions {
|
export interface AndroidPushOptions {
|
||||||
/**
|
|
||||||
* Maps to the project number in the Google Developer Console.
|
|
||||||
*/
|
|
||||||
senderID: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of a drawable resource to use as the small-icon. The name should
|
* The name of a drawable resource to use as the small-icon. The name should
|
||||||
* not include the extension.
|
* not include the extension.
|
||||||
@ -186,6 +175,16 @@ export interface AndroidPushOptions {
|
|||||||
* subscribe to a GcmPubSub topic.
|
* subscribe to a GcmPubSub topic.
|
||||||
*/
|
*/
|
||||||
topics?: string[];
|
topics?: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The key to search for text of notification.
|
||||||
|
*/
|
||||||
|
messageKey?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The key to search for title of notification.
|
||||||
|
*/
|
||||||
|
titleKey?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BrowserPushOptions {
|
export interface BrowserPushOptions {
|
||||||
@ -244,9 +243,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
|||||||
* // to initialize push notifications
|
* // to initialize push notifications
|
||||||
*
|
*
|
||||||
* const options: PushOptions = {
|
* const options: PushOptions = {
|
||||||
* android: {
|
* android: {},
|
||||||
* senderID: '12345679'
|
|
||||||
* },
|
|
||||||
* ios: {
|
* ios: {
|
||||||
* alert: 'true',
|
* alert: 'true',
|
||||||
* badge: true,
|
* badge: true,
|
||||||
@ -283,8 +280,7 @@ export type PushEvent = 'registration' | 'error' | 'notification';
|
|||||||
plugin: 'phonegap-plugin-push',
|
plugin: 'phonegap-plugin-push',
|
||||||
pluginRef: 'PushNotification',
|
pluginRef: 'PushNotification',
|
||||||
repo: 'https://github.com/phonegap/phonegap-plugin-push',
|
repo: 'https://github.com/phonegap/phonegap-plugin-push',
|
||||||
install: 'ionic cordova plugin add phonegap-plugin-push --variable SENDER_ID=XXXXXXXXX',
|
install: 'ionic cordova plugin add phonegap-plugin-push',
|
||||||
installVariables: ['SENDER_ID'],
|
|
||||||
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
platforms: ['Android', 'Browser', 'iOS', 'Windows']
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
Loading…
Reference in New Issue
Block a user