Toast Notification issue with recent device update in Android

微笑、不失礼 提交于 2019-12-05 10:13:01

I don't know if this happens on all devices with jelly bean or not.

AFAIK, it does.

I rely on toasts a lot in the app to inform the user about some feedback

That is not a good idea. Toasts are very short-lived, and users can easily miss them. Toasts are fine for light advisory/confirmation messages -- and for book examples :-) -- but that's about it.

The objective is: show a toast or some replacement for it even if notifications are turned off for this app.

Hopefully, your real objective is to have a quality user experience. Relying on Toasts being seen will not result in a quality user experience.

Toasts have fallen out of favor for other reasons as well, such as the fact that they are independent of the underlying activity, and so a displayed Toast may not be relevant if the user has already navigated elsewhere in the app. The leading replacement implementation is called a "crouton", based upon a term used by Cyril Mottier in a blog post, with a couple of open source implementations, such as this one.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!