Fixed
Status Update
Comments
ak...@google.com <ak...@google.com>
ra...@google.com <ra...@google.com>
ra...@google.com <ra...@google.com> #2
We don't support cross-process invalidations yet.
an...@google.com <an...@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
st...@google.com <st...@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
Description
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Android Studio indicated there were no problems with this code (there was a green checkmark in the upper right corner of the code window). However, when I run ./gradlew check I get the following warning:
Monochrome icon is not defined
If android:roundIcon and android:icon are both in your manifest, you must either remove the reference to android:roundIcon if it is not needed; or, supply the monochrome icon in the drawable defined by the android:roundIcon and android:icon attribute.
For example, if android:roundIcon and android:icon are both in the manifest, a launcher might choose to use android:roundIcon over android:icon to display the adaptive app icon. Therefore, your themed application iconwill not show if your monochrome attribute is not also specified in android:roundIcon.
To suppress this error, use the issue id "MonochromeLauncherIcon" as explained in the Suppressing Warnings and Errors section.
The correction to fix this warning is to make this change to the XML file:
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>
I think Android Studio should detect this warning before running ./gradlew check.
Build: AI-241.18034.62.2411.12169540, 202408010325
AS: Koala | 2024.1.1 Patch 2
AI-241.18034.62.2411.12169540, JRE 17.0.11+0--11852314x64 JetBrains s.r.o., OS Windows 11(amd64) v10.0 , screens 1920.0x1080.0
Android Gradle Plugin: 8.5.2
Gradle: 8.7
Gradle JDK: JetBrains Runtime 17.0.11
NDK: from local.properties: (not specified), latest from SDK: (not found)
CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
```