Fixed
Status Update
Comments
dy...@google.com <dy...@google.com>
aa...@google.com <aa...@google.com> #2
We don't support cross-process invalidations yet.
ma...@gmail.com <ma...@gmail.com> #3
At least , add a "refresh all observables" function to alpha4 ? i am trying to implement it by myself with your InvalidationTracker class
ma...@gmail.com <ma...@gmail.com> #4
Okey, I made it and created a method to invalidate all observables below;
private void refreshAllLiveData() {
AppDataBase YOUR_DATABASE_WHICH_YOU_BUILD = .....
SupportSQLiteDatabase writableDatabase = YOUR_DATABASE_WHICH_YOU_BUILD.getOpenHelper().getWritableDatabase();
//get the database count;
Cursor cursor = writableDatabase.query("SELECT count(*) FROM sqlite_master WHERE type = 'table' AND name != 'android_metadata' AND name != 'room_master_table';");
int tableCount = 0;
while(cursor.moveToNext()) {
tableCount = cursor.getInt(0);
}
for (int i = 0; i < tableCount; i++) {
//update version table with the incremented count because room modification log stores tables with ids instead of names
writableDatabase.execSQL("INSERT OR REPLACE INTO room_table_modification_log VALUES(null, "+(i)+")");
}
YOUR_DATABASE_WHICH_YOU_BUILD.getInvalidationTracker().refreshVersionsAsync();
}
-----
This is a workaroud for refreshing all live datas, I still prefer to use a proper API you implemented.
Thanx
private void refreshAllLiveData() {
AppDataBase YOUR_DATABASE_WHICH_YOU_BUILD = .....
SupportSQLiteDatabase writableDatabase = YOUR_DATABASE_WHICH_YOU_BUILD.getOpenHelper().getWritableDatabase();
//get the database count;
Cursor cursor = writableDatabase.query("SELECT count(*) FROM sqlite_master WHERE type = 'table' AND name != 'android_metadata' AND name != 'room_master_table';");
int tableCount = 0;
while(cursor.moveToNext()) {
tableCount = cursor.getInt(0);
}
for (int i = 0; i < tableCount; i++) {
//update version table with the incremented count because room modification log stores tables with ids instead of names
writableDatabase.execSQL("INSERT OR REPLACE INTO room_table_modification_log VALUES(null, "+(i)+")");
}
YOUR_DATABASE_WHICH_YOU_BUILD.getInvalidationTracker().refreshVersionsAsync();
}
-----
This is a workaroud for refreshing all live datas, I still prefer to use a proper API you implemented.
Thanx
aa...@google.com <aa...@google.com> #5
Cross process invalidation is now support in Room 2.1.0 with the enableMultiInstanceInvalidation() API.
ma...@gmail.com <ma...@gmail.com> #6
yes
aa...@google.com <aa...@google.com>
ma...@gmail.com <ma...@gmail.com> #7
It's not fixed!
aa...@google.com <aa...@google.com> #8
It'll be fixed in the next release. We mark thing fixed when the code is submitted, not when it's released.
ma...@gmail.com <ma...@gmail.com> #9
You close all the bugs for nothing. Without fixing anything.
That's what those who don't understand what a bug is or don't want to work.
That's what those who don't understand what a bug is or don't want to work.
an...@google.com <an...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Ladybug Feature Drop | 2024.2.2 Canary 1
- Android Gradle Plugin 8.8.0-alpha01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Build #AI-241.18034.62.2411.12071903, built on July 11, 2024
Runtime version: 17.0.11+0--11852314 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 16
Registry:
ide.instant.shutdown=false
debugger.watches.in.variables=false
Non-Bundled Plugins:
com.markskelton.one-dark-theme (5.11.0)
com.intellij.marketplace (241.17890.39)
idea.plugin.protoeditor (241.15989.49)
dev.polek.adbwifi (1.2.6)
Docker (241.18034.82)
com.thoughtworks.gauge (241.14494.158)
com.yandex.appmetrica.intellij (0.1.0)
com.github.blarc.gitlab-template-lint-plugin (1.14.1)
Demonstration of the bug in the video.