Compare commits

..
2 changed files with 19 additions and 6 deletions
@@ -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'>
);
}
@@ -35,6 +35,17 @@ export interface SQLiteDatabaseConfig {
* support encrypted databases with https://github.com/litehelpers/Cordova-sqlcipher-adapter
*/
key?: string;
/**
* Use the Android system database provider instead of the default lightweight NDK connector.
* Set to 'system' to avoid multiple-SQLite-connection corruption issues on Android. Example: 'system'
*/
androidDatabaseProvider?: string;
/**
* Android-only workaround that closes and reopens the database file at the end of every committed
* transaction, to work around a database locking issue when `androidDatabaseProvider: 'system'` is used.
* Set to 1 to enable. Only applied to `sqlBatch`/`transaction`, not to `executeSql`.
*/
androidLockWorkaround?: number;
}
/**
@@ -135,8 +146,13 @@ export class SQLiteObject {
return;
}
/**
* The underlying plugin method is named `abortAllPendingTransactions`; mapped explicitly here since this
* method's name differs in casing.
*/
@CordovaInstance({
sync: true,
methodName: 'abortAllPendingTransactions',
})
abortallPendingTransactions(): void {}
}
@@ -181,7 +197,7 @@ export class SQLiteObject {
pluginRef: 'sqlitePlugin',
plugin: 'cordova-sqlite-storage',
repo: 'https://github.com/litehelpers/Cordova-sqlite-storage',
platforms: ['Android', 'iOS', 'macOS', 'Windows'],
platforms: ['Android', 'Browser', 'iOS', 'macOS', 'Windows'],
})
@Injectable()
export class SQLite extends AwesomeCordovaNativePlugin {