Open Maverobot opened 3 years ago
Because we are focused on cross-platform UI, we can't really add platform-specific features. That said if there is a general use-case that toast provides we could consider adding a cross-platform solution.
I see your point. It makes sense to avoid platform-specific features.
When I search for "toast" in the repo, I found
Windows.UI.Notifications.ToastNotificationManager
here. It seems to me that at least in Windows there is a kind of "toast notification".
The "standard" notification (e.g. app.sendNotification
) has very similar characteristics like a mobile "toast" message.
I have no experience with IOS. But after a bit of googling, I found out IOS also has "toast message" support.
Does this mean that App.SendNotification
is a good enough replacement? That already works on all platforms.
I don't think so. On Android, App.SendNotification
sends an notification instead of an "toast message". Probably same on IOS. "Notification" and "Toast message" have different use cases.
OK, but can you expand on what this use-case is then? I got confused in the last message because you called things a notification.
Sorry. I will try to explain it.
I called "toast message" also a "notification" because it seems so in the world of Windows.
Windows.UI.Notifications.ToastNotificationManager
"Toast message" is a kind of notification which disappears automatically after a few seconds, while App.SendNotification
sends a notification which stays persistent in the "Notification center" of Android until you manually dismiss it. For me, these two kinds of ways of delivering information are different and can not be replaced by each other. Are you asking what use cases toast messages can have? The most important feature is that it disappears after a timeout which AFAIK cannot be done with any of the existing fyne APIs. Please correct me if I am wrong.
That makes sense. Perhaps ShowTemporaryNotification
or adding Notification.Timeout
would be a suitable solution?
Notification.Timeout
sounds like a good option.
Is your feature request related to a problem? Please describe:
Toast is a standard way in Android to give feedback to the users.
Is it possible to construct a solution with the existing API?
I am not entirely sure because I just started to use this library and am generally also newbie in the Android Development. But after a long time search, I did not find any existing API which provides "toast".
Describe the solution you'd like to see:
An API which does the same as: https://developer.android.com/guide/topics/ui/notifiers/toasts.html