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 | |
|---|---|---|---|
|
|
c8a746bce8 |
@@ -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'>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,12 @@ export interface SmsOptionsAndroid {
|
||||
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
||||
*/
|
||||
intent?: string;
|
||||
|
||||
/**
|
||||
* Selects which SIM to use on dual-SIM devices when sending with no intent. Use "0" for the primary SIM slot and "1" for the secondary SIM slot.
|
||||
* If no slot is specified the default SIM slot will be used.
|
||||
*/
|
||||
slot?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -78,4 +84,16 @@ export class SMS extends AwesomeCordovaNativePlugin {
|
||||
hasPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests permission to send SMS (Android Marshmallow and later)
|
||||
*
|
||||
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates if permission was granted
|
||||
*/
|
||||
@Cordova({
|
||||
platforms: ['Android'],
|
||||
})
|
||||
requestPermission(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user