Alerts are pretty critical for communicating with your user. But it helps to know what is appropriate so that your users don’t hate you. Fortunately, there’s a simple answer: use a Snackbar! (https://developer.android.com/referen...)
But, for those nuanced cases where you want to choose between a Toast and a Snackbar, the design docs have pretty much every detail you could need. (https://material.google.com/component...) And if you really like being wrong, there’s always a Dialog! (https://material.google.com/component...) But you’re better than that. So be a better developer and use the better choice: Snackbar.