style.GetRemoveTime(out hidetime, out deletetime);
Interop.Notification.SetHideTime(notification.Handle, hidetime);
- Interop.Notification.SetDeleteTime(notification.Handle, deletetime);
+ try
+ {
+ Interop.Notification.SetDeleteTime(notification.Handle, deletetime);
+ }
+ catch (TypeLoadException)
+ {
+ // To support in API version 3.0
+ style.SetRemoveTime(hidetime, 60);
+ }
}
ret = Interop.Notification.SetImage(notification.Handle, NotificationImage.Background, style?.BackgroundImage);
{
int hidetime, deletetime;
Interop.Notification.GetHideTime(notification.Handle, out hidetime);
- Interop.Notification.GetDeleteTime(notification.Handle, out deletetime);
+ try
+ {
+ Interop.Notification.GetDeleteTime(notification.Handle, out deletetime);
+ }
+ catch (TypeLoadException)
+ {
+ // To support in API version 3.0
+ deletetime = 60;
+ }
+
active.SetRemoveTime(hidetime, deletetime);
}
namespace Tizen.Applications.NotificationEventListener
{
+ using System;
+
internal static class NotificationStyleArgBinder
{
internal static void BindObject(NotificationEventArgs eventargs)
Interop.NotificationEventListener.GetHideTimeout(eventargs.Handle, out timeout);
activeStyle.HideTimeout = timeout;
- Interop.NotificationEventListener.GetDeleteTimeout(eventargs.Handle, out timeout);
+ try
+ {
+ Interop.NotificationEventListener.GetDeleteTimeout(eventargs.Handle, out timeout);
+ }
+ catch (TypeLoadException)
+ {
+ //To support in API version 3.0
+ timeout = 60;
+ }
activeStyle.DeleteTimeout = timeout;
NotificationReplyActionArgBinder.BindObject(eventargs);