mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-08-04 00:00:08 +08:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f60c82b50a |
@@ -18,7 +18,6 @@ export enum Connection {
|
||||
CELL_2G = '2g',
|
||||
CELL_3G = '3g',
|
||||
CELL_4G = '4g',
|
||||
CELL_5G = '5g',
|
||||
CELL = 'cellular',
|
||||
NONE = 'none',
|
||||
}
|
||||
@@ -63,7 +62,7 @@ export enum Connection {
|
||||
*
|
||||
* ```
|
||||
* @advanced
|
||||
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `5g`, `cellular`, `none`
|
||||
* The `type` property will return one of the following connection types: `unknown`, `ethernet`, `wifi`, `2g`, `3g`, `4g`, `cellular`, `none`
|
||||
*/
|
||||
@Plugin({
|
||||
pluginName: 'Network',
|
||||
@@ -84,7 +83,6 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
CELL_2G: '2g',
|
||||
CELL_3G: '3g',
|
||||
CELL_4G: '4g',
|
||||
CELL_5G: '5g',
|
||||
CELL: 'cellular',
|
||||
NONE: 'none',
|
||||
};
|
||||
@@ -100,7 +98,6 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
* Downlink Max Speed
|
||||
*
|
||||
* @returns {string}
|
||||
* @deprecated Not part of the upstream cordova-plugin-network-information API (verified against v3.1.0 types/index.d.ts and README). Retained for backwards compatibility only.
|
||||
*/
|
||||
@CordovaProperty() downlinkMax: string;
|
||||
|
||||
@@ -112,7 +109,7 @@ export class Network extends AwesomeCordovaNativePlugin {
|
||||
@CordovaCheck()
|
||||
onChange(): Observable<'connected' | 'disconnected'> {
|
||||
return merge(
|
||||
this.onConnect().pipe(mapTo('connected')) as Observable<'connected'>,
|
||||
this.onConnect().pipe(mapTo('connected')),
|
||||
this.onDisconnect().pipe(mapTo('disconnected')) as Observable<'disconnected'>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -228,7 +228,6 @@ export class UserPreferencesMethods extends NestedObject {
|
||||
})
|
||||
@Injectable()
|
||||
export class WonderPush extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* Initializes the WonderPush SDK
|
||||
* @param clientId
|
||||
@@ -242,6 +241,33 @@ export class WonderPush extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the SDK and remembers credentials for subsequent auto-initialization.
|
||||
*
|
||||
* You can disable AUTO_INIT or instead use `"USE_REMEMBERED"` as a value for the Client ID and Client Secret.
|
||||
* This is aimed at enabling complex integration scenarios where the Client ID and Client Secret are resolved dynamically and reused ever after.
|
||||
* If you provide a null value, the credential will be forgotten and the SDK won't be initialized.
|
||||
*
|
||||
* @param {?string} clientId
|
||||
* @param {?string} clientSecret
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
initializeAndRememberCredentials(clientId: string | null, clientSecret: string | null): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the remembered Client ID given to `initializeAndRememberCredentials()`.
|
||||
* There is no similar getter for the Client Secret.
|
||||
*
|
||||
* @returns {Promise<string | null>} The remembered Client ID if both a non-empty Client ID and Client Secret were last remembered, `null` otherwise.
|
||||
*/
|
||||
@Cordova()
|
||||
getRememberedClientId(): Promise<string | null> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the SDK has been initialized.
|
||||
*
|
||||
@@ -553,10 +579,11 @@ export class WonderPush extends AwesomeCordovaNativePlugin {
|
||||
* Because in iOS you only have *one* chance for prompting the user, you should find a good timing for that.
|
||||
* For a start, you can systematically call it when the application starts, so that the user will be prompted directly at the first launch.
|
||||
*
|
||||
* @param {boolean} [fallbackToSettings] - When true, WonderPush will show a dialog prompting the user to go to settings and activate push notifications
|
||||
* @returns {Promise<any>} Returns a promise that resolves upon successful subscription
|
||||
*/
|
||||
@Cordova()
|
||||
subscribeToNotifications(): Promise<any> {
|
||||
subscribeToNotifications(fallbackToSettings?: boolean): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user