The documentation says that Toasts are truncated to two lines on applications targeting Android 12 or later. The behaviour that I observe is that Toasts are truncated to two lines on applications installed on a device running Android 12 or later.
Specifically, one of my apps which was installed before my phone was updated to Android 12 does not get its toasts truncated, but if I install it on the emulator running Android 12 it gets its toasts truncated. Another app which I rebuilt and installed after my phone was updated to Android 12 gets its toasts truncated.
Update:
The situation appears actually to be more complicated: the behaviour also depends on the device and apparently also on whether it's a debug or a release build. The same app which was getting its toasts truncated displays them correctly with a release build on my phone, but truncates them with the same release build on the emulator.
Note that this is not the same question as 70307699 where the OP updated his targetSdk
to 31. Both my apps have targetSdk
set to less than 31.
How can I get the documented behaviour and get my toasts back?