Fixed
Status Update
Comments
be...@google.com <be...@google.com> #2
We don't support cross-process invalidations yet.
ta...@gmail.com <ta...@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
sa...@google.com <sa...@google.com>
sa...@google.com <sa...@google.com>
is...@google.com <is...@google.com>
du...@google.com <du...@google.com>
an...@google.com <an...@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
all required information.
Studio Build: 3.0 beta 7
Version of Gradle Plugin: 3.0.0-beta7
Version of Gradle: 4.1
Version of Java: 1.7
OS: mac
Steps to Reproduce:
1. Create a new Android Auto Messaging Service from the template
File -> New -> Android Auto -> Messaging Service
2. In MessagingService.java/kt, it uses the deprecated constructor of NotificationCompat.Builder. [NotificationCompat.Builder(getApplicationContext())]
Update the template to create a channel if the buildApi is greater than or equal to 26.