Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch and update the android native libraries for API 30 #494

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rubenmaas
Copy link

@rubenmaas rubenmaas commented Nov 3, 2021

Our team previously added these libraries to react-native-sqlite-storage.
Now we've patched and updated the libs for Android API 30. We've tested it with JSON queries as well.

Fix for this issue: #462

@MarkCSmith
Copy link

Where can we find the source code that was used to build these binaries?

@octavezero
Copy link

The sqlite library and connector code is from here (The existing binaries are also build from here) - https://github.com/liteglue/Android-sqlite-connector and https://github.com/brodybits/Android-sqlite-ext-native-driver

The Android 11 patches are from these Cordova libraries -
OutSystems/Android-sqlite-connector#1 and OutSystems/Android-sqlite-native-driver#1

@osmaa
Copy link

osmaa commented Nov 19, 2021

Would you please include the actual upstream revision reference, as it seems impossible to determine which sqlite3 version is actually bundled? Or better yet, enable us to build the same version from source code by submoduling the revision you include. They way you document this, we have to take at face value that an undocumented bundled binary is safe with no way of verifying where it in fact came from.

@octavezero
Copy link

Sure. You can checkout the actual sqlite (and included plugin) upstream submodule revisions from here - https://github.com/brodybits/Android-sqlite-ext-native-driver. All of these are build from sources with no binaries involved.

The core sqlite submodule is here - https://github.com/liteglue/sqlite-amalgamation/tree/8266a49e2d49deb42422f9b48f49fe94c73971e2, where you can verify the sqlite source from the origin (https://www.sqlite.org/2020/sqlite-amalgamation-3320300.zip). You can similarly verify the sources for the other submodules.

Also, the build instructions are provided in the connector and driver repos. You can easily rebuild the binaries for verification by following those steps. The only modifications made are the two Android 11 patches from the listed PR, which you can manually apply.

@tszajna0
Copy link

You may need to add to your proguard-rules.pro

-keep class io.liteglue.** { *; }

@andpor
Copy link
Owner

andpor commented Jan 8, 2022

I will merge this in this upcoming week. I am getting new hardware and it is taking a while to ship. Can you confirm that the libraries are backward compatible, json1 support included and povide instructions how to build them. Many thanks.

@FatemeMirzaeii
Copy link

I will merge this in this upcoming week. I am getting new hardware and it is taking a while to ship. Can you confirm that the libraries are backward compatible, json1 support included and povide instructions how to build them. Many thanks.

can you tell us when do you want to merge this PR?

Copy link

@castalonirenz castalonirenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App crashes in run time

@will-tsang
Copy link

App crashes in run time

@castalonirenz, have you try adding the proguard rule mentioned by @tszajna0
#494 (comment)

@creekorful
Copy link

I will merge this in this upcoming week. I am getting new hardware and it is taking a while to ship. Can you confirm that the libraries are backward compatible, json1 support included and povide instructions how to build them. Many thanks.

Hi @andpor. Any news on this?

@bwmarrin
Copy link

bwmarrin commented Oct 3, 2022

I'm trying to use the this PR to solve the Android 11 issue but I'm getting the below error message when testing. If anyone else has run into this error and has a solution I would appreciate any advise. Thanks. I'm testing on a Pixel 1 with Android 10 with ReactNative 0.63

2022-10-03 11:01:01.927 26878-26937/? runtime.cc:638] JNI DETECTED ERROR IN APPLICATION: mid == null
2022-10-03 11:01:02.072 26943-26943/? A/DEBUG: Abort message: 'JNI DETECTED ERROR IN APPLICATION: mid == null
        in call to NewObject
        from io.liteglue.SQLiteResponse io.liteglue.SQLiteNative.sqlc_db_open(java.lang.String, int)

@usmanmalik333
Copy link

any solution to this issue ? if i removed the dependencies then it not worked in other android versions.

@hengkx
Copy link

hengkx commented Aug 21, 2023

Thank you very much for your current normal operation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.