-
Notifications
You must be signed in to change notification settings - Fork 0
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
RNMT-4515 Fixes an issue with recent devices running Android 11 #1
Conversation
When running an app built with targetSdkVersion 30, the SQLiteGlueConnection constructor is failing to open the connection with the sqlite database in some devices, and a NullPointerException is being thrown. References https://outsystemsrd.atlassian.net/browse/RNMT-4515
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor question before approval :)
package io.liteglue; | ||
|
||
public class SQLiteResponse { | ||
private int result; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, previously the errors were also returned as long
shouldn't we keep it the same way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, SQLite result codes are integers. They were returned as long because the return type had to match either the SQLite codes and the handle value. Also, the consumer was always casting the error value to a int value as you can see here
Hi I just tried your OutSystems fork of cordova-sqlite-storage, which would include this update, and it does seem to resolve the issue on Pixel 5 (tested with Browser Stack). What baffles me is that if SQLite is able to open a database, or create if it is not present, and there is no error result to be reported, how this update could really make a difference. |
@brodybits The issue is not related with the creation of the database, but the way how the connector is creating/returning the handle. Check this commit for more details: OutSystems/Android-sqlite-native-driver@6a19159 |
Merge commit 'c4db58469edec06dbbe78caf13549b76bb61f1dc' of /~https://github.com/OutSystems/Android-sqlite-connector into main include updates from this PR on the OutSystems fork: - OutSystems/Android-sqlite-connector#1
Description
This PR introduces the changes that updates the SQLiteNative and the SQLGDatabaseHandle to start using the complex type for the SQL handle from the OutSystems/Android-sqlite-native-driver#1.
Context
Fixes https://outsystemsrd.atlassian.net/browse/RNMT-4515