Reputation: 55
I am using a Samsung Galaxy Note 8 with Android 8.0.
My Toast message (which was working) does not show up
Toast.makeText(this, "ABC", Toast.LENGTH_SHORT).show();
getApplicationContext()
, getBaseContext()
are not helping instead of this. Using this in an activity
.
Upvotes: 3
Views: 5541
Reputation: 128
Go to your app settings -> Notifications
and check if notifications are turned on. This action is possible in newer android versions
Even though a Toast is not a notification, it seems that NotificationManagerService.java
will not show Toast
if Notifications are disabled.
I'm posting a link with the issue: https://issuetracker.google.com/issues/36951147
Upvotes: 7
Reputation: 3729
try with class name
Toast.makeText(ActivityName.this, "ABC", Toast.LENGTH_SHORT).show();
here ActivityName is your activity name
Upvotes: 1