WAI
Status Update
Comments
ma...@airalo.com <ma...@airalo.com> #2
We don't support cross-process invalidations yet.
ma...@airalo.com <ma...@airalo.com> #3
At least , add a "refresh all observables" function to alpha4 ? i am trying to implement it by myself with your InvalidationTracker class
rk...@google.com <rk...@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
bo...@google.com <bo...@google.com> #5
Cross process invalidation is now support in Room 2.1.0 with the enableMultiInstanceInvalidation() API.
rg...@google.com <rg...@google.com> #6
The beta 1 sdk_gphone build won't automatically enable the change even the screen is sw600dp or greater. Future betas and the final release candidate will automatically enable the change if the screen is sw600dp or greater.
You can enable the forced change manually in one of the following two ways:
- With
adb shell
: Rundevice_config put window_manager ignore_activity_orientation_request true
to enable the change for all apps. - With Settings: enter "app info" -> "aspect ratio" -> "full screen" to enable the change for one app.
ma...@airalo.com <ma...@airalo.com> #7
Thanks!
I tried with the Pixel Tablet emulator with build number `BP22.250124.008` and the `UNIVERSAL_RESIZABLE_BY_DEFAULT` flag enabled and now it works as expected.
I tried with the Pixel Tablet emulator with build number `BP22.250124.008` and the `UNIVERSAL_RESIZABLE_BY_DEFAULT` flag enabled and now it works as expected.
Description
I'm trying to run an app to try the new changes to orientation and resizability APIs in Android 16. I'm running a sample app with `android:screenOrientation="portrait"` on a Pixel Tablet, Pixel 9 Pro Fold and resizable emulator and the app is still letterboxed.
I've tried with both Google API (build number: sdk_gphone64_arm64-userdebug Baklava BP22.250103.008 12932282 dev-keys) And Google Play images (Build Number: BP22.250103.008)
Sample project:
Build: AI-243.22562.218.2432.12959061, 202501230930
AS: Meerkat Feature Drop | 2024.3.2 Canary 2
AI-243.22562.218.2432.12959061, JRE 21.0.5+-12932927-b750.29x64 JetBrains s.r.o., OS Mac OS X(aarch64) v14.7.2, screens 3024x1964 (200%), 3440x1440 (100%)
Android Gradle Plugin: 8.10.0-alpha02
Gradle: 8.11.1
Gradle JDK: JetBrains Runtime 21.0.5 - aarch64
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)