I have a toast that is displayed in the following way:
Toast.makeText(context, "The message", Toast.LENGTH_LONG).show();
I am absolutely certain I am displaying the toast from the UI thread, and I can add that it worked fine for many devices including older updates of the Galaxy S3, but after the latest update none of my toasts are being displayed.
Has anyone else experienced this and has a solution?
In newer Android phones there is a "Show notifications" checkbox in App Settings and for some reason if notifications are disabled it also disables Toasts. The issue has been reported here:
http://code.google.com/p/android/issues/detail?id=35013
But looking on the source code:
it seems like it might be intentional:
Line 114:
private static final boolean ENABLE_BLOCKED_TOASTS = true;
Lines 693-707:
final boolean isSystemToast = ("android".equals(pkg));
if (ENABLE_BLOCKED_TOASTS && !isSystemToast && !areNotificationsEnabledForPackageInt(pkg)) {
Slog.e(TAG, "Suppressing toast from package " + pkg + " by user request.");
return;
}