Appverse.Core.PushNotifications.AbstractPushNotifications.processNotification C# (CSharp) Method

processNotification() public static method

Processes the notification.
public static processNotification ( NSDictionary options, bool fromFinishedLaunching, UIApplicationState applicationState ) : void
options NSDictionary Options.
fromFinishedLaunching bool True if this method comes from the 'FinishedLaunching' delegated method
applicationState UIApplicationState The application state that received the remote notification
return void
		public static void processNotification(NSDictionary options, bool fromFinishedLaunching, UIApplicationState applicationState)
		{

			try {
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "******* Checking for PUSH NOTIFICATION data in launch options - fromFinishedLaunching="+fromFinishedLaunching+". application state: "+ applicationState);

				if (options != null) {

					if (fromFinishedLaunching) {
						NSDictionary remoteNotif = (NSDictionary)options.ObjectForKey (UIApplication.LaunchOptionsRemoteNotificationKey);
						ProcessRemoteNotification (remoteNotif, fromFinishedLaunching, applicationState);
					} else {
						ProcessRemoteNotification (options, fromFinishedLaunching, applicationState);
					}

				} else {
					SystemLogger.Log (SystemLogger.Module.PLATFORM, "******* NO launch options");

				}
			} catch (System.Exception ex) {
				SystemLogger.Log (SystemLogger.Module.PLATFORM, "******* Unhandled exception when trying to process notification. fromFinishedLaunching[" + fromFinishedLaunching + "]. Exception message: " + ex.Message);
			}

		}