Vilgot Fredenberg
07/30/2025, 8:53 AMandroid:configChanges="allKnown"
? I'm not able to find any references to this value outside of Android's source code, but it seems like an obvious replacement to specifying all known values (``density|fontScale|keyboard|...``). One additional benefit of the "allKnown"
value is that wallpaper changes no longer cause activity recreation.KamilH
07/30/2025, 9:08 AMresourcesUnused
should be the one that will allow you to opt out of any new configuration in the futureStylianos Gakis
07/30/2025, 9:16 AMOne additional benefit of theWhere did you get this information from?value is that wallpaper changes no longer cause activity recreation."allKnown"
KamilH
07/30/2025, 9:18 AMassetsPath
Vilgot Fredenberg
07/30/2025, 9:18 AMVilgot Fredenberg
07/30/2025, 9:22 AMThere was a great talk about that topic during the DroidCon NY made by Alex Vanyo:
https://www.droidcon.com/2025/07/23/handling-configuration-changes-in-compose/Thanks, I had seen that before but must have missed/forgotten about
allKnown
Stylianos Gakis
07/30/2025, 9:29 AMAlex Vanyo
07/30/2025, 5:49 PMallKnown
is a “meta” value for android:configChanges
that gets expanded out to all of the ones that are currently known at that point in time.
One additional benefit of theThat’s specifically thevalue is that wallpaper changes no longer cause activity recreation."allKnown"
assetsPaths
option (which allKnown
will expand out to include), which is newly declarable with Android 16. A fun detail of how it works is that the same bitmask value was used back since Android 12 when the wallpaper changes first caused activity recreation.
So if you add assetsPaths
to android:configChanges
, you should see wallpaper changes no longer causing activity recreation even before Android 16.Stylianos Gakis
07/31/2025, 12:11 PMthe same bitmask value was used back since Android 12 when the wallpaper changes first caused activity recreation.Does this mean that one would've been able to skip those recreations back in 12 as well by flipping those bits, but there was just no way for normal consumers to flip said bits? Because afaik there was no way to do that earlier
Alex Vanyo
07/31/2025, 9:21 PMAlex Vanyo
07/31/2025, 9:24 PMColton Idle
08/04/2025, 4:47 PM