private void CPClient_NotificationReceived(CPNotification notification) { Console.WriteLine("CPClient_NotificationReceived(...) " + notification.ToString()); //if(notification.ObjectName == "Notify") //{ // if(notification.Method == "WindowsState") // {// +Notify WindowsState { nCount TWindowState pData[ ] } (Id Kind nState nStateChange x y w h ZAfter) // var valueList = notification.ValueList; // var windows = new TWindowStateList(valueList); // Console.WriteLine(windows.ToString()); // } //} }
public static CPNotification CPNotificationToNative(Android.Notification notif) { var notification = new CPNotification(); notification.customData = new Dictionary <string, object>(); if (notif.CustomData != null) { foreach (var item in (Dictionary <string, object>)notif.CustomData) { notification.customData.Add(item.Key, item.Value); } } notification.id = notif.Id; notification.title = notif.Title; notification.text = notif.Text; notification.url = notif.Url; notification.mediaUrl = notif.MediaUrl; notification.iconUrl = notif.IconUrl; return(notification); }