rdelrosario / xamarin-plugins

Cross platform Xamarin & Windows plugins for PCLs
MIT License
178 stars 161 forks source link

ShouldShowNotification #52

Open Duranom opened 8 years ago

Duranom commented 8 years ago

Hello,

I think the ShouldShowNotification should be reconsidered on how it currently works as it also differs from the platforms and feels weird. For example if you override it to return true Android will try to show a local notification (code reformatting required there btw) but iOS does nothing as there is no default implementation, and neither the ones should they ever be implemented. The ShouldShowNotification feels more like an implementation for one to check to see if the user desired to see notifications or in your own configuration is allowed.

I think thus the ShouldShowNotification should be called before OnMessage and has the bool supplied so the implementer knows if it should show or is allowed to show a notification, but you can also determine that for yourself in the handling of the OnMessage. Though I think if disabled on the platform one will not be shown one anyway, and thus could be considered removed?

rdelrosario commented 8 years ago

Yes i agree should be reconsidered in other way. Just haven't figure out a good way to be able to decide when to receive or not a notification in Android.