Android Objectbox Version 3.1.2
Flutter Objectbox Version 1.4.1
Android code does read/write operation
Flutter code only does read operation
Sometimes the android side throws this exception:
Could not renew tx (another read transaction is still active on this thread) (error code -30783)
This exception never occurs when I use android only.
Android:
boxStore = MyObjectBox.builder().androidContext(application).build()
Flutter:
final documentDir = await getApplicationDocumentsDirectory();
var androidDir =
'${documentDir.parent.absolute.path}/files/objectbox/objectbox/';
var objectboxDir = Directory(androidDir);
var exists = await objectboxDir.exists();
if (!exists) {
objectboxDir.create(recursive: true);
}
store = await openStore(directory: androidDir);