Status Update
Comments
xa...@google.com <xa...@google.com> #2
We don't support cross-process invalidations yet.
sp...@google.com <sp...@google.com> #3
At least , add a "refresh all observables" function to alpha4 ? i am trying to implement it by myself with your InvalidationTracker class
il...@google.com <il...@google.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
ub...@gmail.com <ub...@gmail.com> #5
Cross process invalidation is now support in Room 2.1.0 with the enableMultiInstanceInvalidation() API.
si...@gmail.com <si...@gmail.com> #6
I believe
Description
Using the new
namespace
property in build.gradle instead of thepackage
attribute in AndroidManifest.xml while also using a customapplicationIdSuffix
breaksandroidx.navigation.safeargs
plugin.See sample project . The project does not compile, unless you
package
back to AndroidManifest.xmlapplicationIdSuffix
The new projects dialog creates working projects (with the legacy
package
attribute instead ofnamespace
property), but the update assistant offered me to migrate an existing project to the defunct setup.Studio Build: Chipmunk Version of Gradle Plugin: 7.2.0 Version of Gradle: 7.3.3 Version of Java: 11 OS: MacOS
This issue is for Android Public Tracker > App Development > Android Studio > Gradle > Android Gradle Plugin but I don't have permission to create it there.