-
Notifications
You must be signed in to change notification settings - Fork 522
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
Document how to use FTS5 on Android #371
Comments
It looks like I'm getting the device's sqlite, not the one bundled with this library. Is this the "pure java" mode described in the readme? How can I use the bundled sqlite instead? (in order to attempt to replace it with my own build) Edit: I continue to learn more! I hadn't been through the how to use android guide because RN 0.60 magically autolinked it for me (as it did for another user). One of the previously-necessary setup steps adds a gradle reference to What's the correct way to make that happen with 0.60's autolinking? |
I think we can make a gradle script to reference it Or, we can test to use |
Got it working! (FTS5 on Android) Here's what I did:
"react-native-sqlite-storage": "jrr/react-native-sqlite-storage#fts5", For now, anyone facing this issue can do the same! FutureLong-term, I think my preference would be:
|
Related to #368 |
auto-linking has been working with android version only (not native-android). I have been hinting to people to be careful submitting PR considering only android and leaving native-android behind. As of now I am not sure myself how to solve this. |
FTS5 should be working with binaries I have under this branch: new-native-sqlite-libs |
Workaround on v4.0.0 is change sourceDir on module.exports = {
dependency: {
platforms: {
// ... another platforms
android: {
// sourceDir: './platforms/android'
sourceDir: './platforms/android-native'
}
}
}
} |
These are the ones I already checked in #368 |
ok. I will include them in the next release 4.1.0 |
Those binaries are working for me, too!:
With this in place, I can see the FTS5 module is available in my app. |
yes, the branch has old structure...pre latest PR merge... |
I propose a slight change to @carlosroberto555 's workaround, that would enable apps to opt in to android-native without having to edit any files or fork any repositories: android: {
sourceDir: `./platforms/android${process.env.USE_ANDROID_SQLITE_NATIVE ? "-native" : ""}`
} This way you could e.g. I would prefer some other, better-supported way of letting the consuming app configure libraries it depends on, but haven't found much documentation in this area. (it looks like maybe RN cli's native_modules.gradle is responsible for reading the config?). In the mean time, how do you feel about shipping the environment variable approach? |
The new native libs have been merged and release under 4.1.0 |
I will work on your suggestion for env switch next...i like the approach .. |
I went ahead and created a PR: #377 |
I prefer #393's approach to this problem, which has you edit a file instead of setting an environment var. Anyone subscribed to the thread have thoughts on this? |
Searching through Github issues, it looks like FTS5 is unsupported on Android.
Here @brodybits references a repo that can be built to produce FTS5-supporting libs.
For this issue, I'd like:
-or-
Would you like to support it, or are you specifically avoiding it for some reason? (would you accept contributions enable it?)
The text was updated successfully, but these errors were encountered: