// Called when a notification is opened by the user. private void HandleOneSignalNotificationOpened(OSNotificationOpenedResult result) { var delivered = OneSignalHelper.ToCrossPlatformRemoteNotification(result); // Fire event if (RemoteNotificationOpened != null) { RemoteNotificationOpened(delivered); } }
//-------------------------------------------------------- // OneSignal Remote Notification Event Handlers //-------------------------------------------------------- // Called when your app is in focus and a notification is recieved (no action taken by the user). private void HandleOneSignalNotificationReceived(OSNotification notification) { var delivered = OneSignalHelper.ToCrossPlatformRemoteNotification(null, notification); // Fire event if (RemoteNotificationOpened != null) { RemoteNotificationOpened(delivered); } }