Skip to content

Commit

Permalink
Android NDK libraries in JAR
Browse files Browse the repository at this point in the history
Resolve issue on cordova-android@7
FIXES storesafe/cordova-sqlite-storage#729
  • Loading branch information
Christopher J. Brody committed Jan 4, 2018
1 parent 7485794 commit 7d76164
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changes

## cordova-sqlite-storage 2.2.0-pre1
## cordova-sqlite-storage 2.2.0

- Android-sqlite-native-driver NDK objects in JAR to resolve issue on cordova-android@7
- Fix SQLiteAndroidDatabase implementation for Turkish and other foreign locales

## cordova-sqlite-storage 2.1.5
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ See the [Sample section](#sample) for a sample with a more detailed explanation.
- The "standard" transaction API documented in [Standard asynchronous transactions section](#standard-asynchronous-transactions) (`db.transaction()` and `db.readTransaction` calls) are now deprecated in this plugin version and scheduled to be removed from the next major release ref: <https://github.com/litehelpers/Cordova-sqlite-storage/issues/720>. It is recommended to use `db.executeSql()` and `db.sqlBatch()` instead, as documented below. NOTE that the "standard", deprecated API calls will NOT be removed from other plugin versions such as `cordova-sqlite-ext` (permissive license terms) or `cordova-sqlite-evcore-extbuild-free` (GPL or commercial license terms).
- This plugin is NOT supported by PhoneGap Developer App or PhoneGap Desktop App.
- This plugin version uses a `before_plugin_install` hook to install sqlite3 library dependencies from `cordova-sqlite-storage-dependencies` via npm.
- This plugin version will NOT work on `cordova-android@7` due to issue with JAR and NDK library files as discussed in [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729).
- Use of other systems such as Cordova Plugman, PhoneGap CLI, PhoneGap Build, and Intel XDK is no longer supported _by this plugin version_ since they do not honor the `before_plugin_install` hook. The supported solution is to _use [litehelpers / Cordova-sqlite-evcore-extbuild-free](https://github.com/litehelpers/Cordova-sqlite-evcore-extbuild-free) (GPL or commercial license terms); alternative with permissive license terms is available at: [brodybits / cordova-sqlite-legacy-build-support](https://github.com/brodybits/cordova-sqlite-legacy-build-support) (limited testing, limited updates)_.
- SQLite `3.15.2` included when building (all platforms), with the following definitions *for iOS/macOS/Windows*:
- `SQLITE_THREADSAFE=1` (`SQLITE_THREADSAFE=2` on iOS/macOS)
Expand Down Expand Up @@ -478,7 +477,6 @@ See **Security of sensitive data** in the [Security](#security) section above.

## Known issues

- This plugin will NOT work on `cordova-android@7` due to issue with JAR and NDK library files as discussed in [litehelpers/Cordova-sqlite-storage#729](https://github.com/litehelpers/Cordova-sqlite-storage/issues/729).
- The iOS/macOS platform versions do not support certain rapidly repeated open-and-close or open-and-delete test scenarios due to how the implementation handles background processing
- The Android platform version does not always handle four-byte UTF-8 characters emoji characters such as `\u1F603` (SMILING FACE, MOUTH OPEN) correctly ref: [litehelpers/Cordova-sqlite-storage#564](https://github.com/litehelpers/Cordova-sqlite-storage/issues/564). It is sometimes possible to store and retrieve such characters but certain operations such as hex conversions do not work properly when using the default [Android-sqlite-connector](https://github.com/liteglue/Android-sqlite-connector) database implementation. It is suspected that such characters would be stored incorrectly by the default Android platform version. Note that this is not an issue in case the built-in Android database is used (using the `androidDatabaseImplementation: 2` setting in `window.sqlitePlugin.openDatabase`)
- It is possible to request a SQL statement list such as "SELECT 1; SELECT 2" within a single SQL statement string, however the plugin will only execute the first statement and silently ignore the others ref: [litehelpers/Cordova-sqlite-storage#551](https://github.com/litehelpers/Cordova-sqlite-storage/issues/551)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-sqlite-storage",
"version": "2.2.0-pre1",
"version": "2.2.0",
"description": "Native interface to SQLite for PhoneGap/Cordova",
"cordova": {
"id": "cordova-sqlite-storage",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"homepage": "https://github.com/litehelpers/Cordova-sqlite-storage",
"dependencies": {
"cordova-sqlite-storage-dependencies": "1.0.4"
"cordova-sqlite-storage-dependencies": "1.1.0"
},
"scripts": {
"start": "node scripts/prepareSpec.js"
Expand Down
12 changes: 4 additions & 8 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-sqlite-storage"
version="2.2.0-pre1">
version="2.2.0">

<name>Cordova sqlite storage plugin</name>

Expand Down Expand Up @@ -34,13 +34,9 @@
<source-file src="src/android/io/sqlc/SQLiteConnectorDatabase.java" target-dir="src/io/sqlc"/>

<!-- Android-sqlite-connector [jar]: -->
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-connector.jar" target-dir="libs"/>
<!-- Android-sqlite-connector native driver [native libs]: -->
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/arm64-v8a/libsqlc-native-driver.so" target-dir="libs/arm64-v8a"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/armeabi/libsqlc-native-driver.so" target-dir="libs/armeabi"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/armeabi-v7a/libsqlc-native-driver.so" target-dir="libs/armeabi-v7a"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/x86/libsqlc-native-driver.so" target-dir="libs/x86"/>
<source-file src="node_modules/cordova-sqlite-storage-dependencies/libs/x86_64/libsqlc-native-driver.so" target-dir="libs/x86_64"/>
<lib-file src="node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-connector.jar" />
<!-- Android-sqlite-connector native driver [native libs in jar]: -->
<lib-file src="node_modules/cordova-sqlite-storage-dependencies/libs/sqlite-native-driver.jar" />
</platform>

<!-- iOS -->
Expand Down

0 comments on commit 7d76164

Please sign in to comment.