payload: {"action":"opened","issue":{"url":"https://api.github.com/repos/OneSignal/OneSignal-Xamarin-SDK/issues/139","repository_url":"https://api.github.com/repos/OneSignal/OneSignal-Xamarin-SDK","labels_url":"https://api.github.com/repos/OneSignal/OneSignal-Xamarin-SDK/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/OneSignal/OneSignal-Xamarin-SDK/issues/139/comments","events_url":"https://api.github.com/repos/OneSignal/OneSignal-Xamarin-SDK/issues/139/events","html_url":"https://github.com/OneSignal/OneSignal-Xamarin-SDK/issues/139","id":427621956,"node_id":"MDU6SXNzdWU0Mjc2MjE5NTY=","number":139,"title":"Onesignal.HandleNotificationOpened! The different behavior when delay added and without delay when app is closed.","user":{"login":"ZalesskyMaxim","id":6808720,"node_id":"MDQ6VXNlcjY4MDg3MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/6808720?v=4","gravatar_id":"","url":"https://api.github.com/users/ZalesskyMaxim","html_url":"https://github.com/ZalesskyMaxim","followers_url":"https://api.github.com/users/ZalesskyMaxim/followers","following_url":"https://api.github.com/users/ZalesskyMaxim/following{/other_user}","gists_url":"https://api.github.com/users/ZalesskyMaxim/gists{/gist_id}","starred_url":"https://api.github.com/users/ZalesskyMaxim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZalesskyMaxim/subscriptions","organizations_url":"https://api.github.com/users/ZalesskyMaxim/orgs","repos_url":"https://api.github.com/users/ZalesskyMaxim/repos","events_url":"https://api.github.com/users/ZalesskyMaxim/events{/privacy}","received_events_url":"https://api.github.com/users/ZalesskyMaxim/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-04-01T10:14:46Z","updated_at":"2019-04-01T10:14:46Z","closed_at":null,"author_association":"NONE","body":"**Description:**\r\nHi everyone. I have issue with opening a page when clicking on push notification when app is closed. \r\nCode (delay commented):\r\n`public App()\r\n        {\r\n            InitializeComponent();\r\n            MainPage = Settings.IsTokenSet\r\n                ? new CustomNavigationPage(new MenuPage())\r\n                : new CustomNavigationPage(new PracticesPage());\r\n\r\n            OneSignal.Current.StartInit(ConstantHelper.OneSignalToken)\r\n                .InFocusDisplaying(OSInFocusDisplayOption.None)\r\n                .HandleNotificationOpened(async (result) =>\r\n                {\r\n                    try\r\n                    {\r\n                        if (Application.Current.MainPage == null)\r\n                        {\r\n                            MainPage = Settings.IsTokenSet\r\n                                ? new CustomNavigationPage(new MenuPage(true))\r\n                                : new CustomNavigationPage(new PracticesPage());\r\n                        }\r\n\r\n                        if (result.notification.payload.additionalData.ContainsKey(ConstantHelper.AppointmentId) &&\r\n                            result.notification.payload.additionalData.ContainsKey(ConstantHelper.RealName))\r\n                        {\r\n                            CurrentAppointment = result.notification.payload.additionalData[ConstantHelper.AppointmentId].ToString();\r\n                            CurrentDoctorName = result.notification.payload.additionalData[ConstantHelper.RealName].ToString();\r\n\r\n                            if (!(Current.MainPage.Navigation.NavigationStack.Last() is ConferencePage))\r\n                            {\r\n                                await Current.MainPage.Navigation.PopToRootAsync();\r\n                                var conferencePage = new ConferencePage();\r\n                                //await System.Threading.Tasks.Task.Delay(1500);\r\n                                await Current.MainPage.Navigation.PushAsync(conferencePage);\r\n                            }\r\n                        }\r\n                        await PopUpService.HideAllLoadings();\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        Analytics.TrackEvent(\"Exception: \", new Dictionary<string, string>\r\n                        {\r\n                            {\"Message\", e.Message},\r\n                            {\"StackTrace\", e.StackTrace},\r\n                        });\r\n                    }\r\n                })\r\n                .HandleNotificationReceived(notification => { })\r\n                .EndInit();\r\n        }` \r\nlink on video:\r\nhttps://www.dropbox.com/s/w9p0x8rol8ei5e5/VID_20190401_124708.mp4?dl=0\r\n\r\nCode (delay uncommented):\r\n`public App()\r\n        {\r\n            InitializeComponent();\r\n            MainPage = Settings.IsTokenSet\r\n                ? new CustomNavigationPage(new MenuPage())\r\n                : new CustomNavigationPage(new PracticesPage());\r\n\r\n            OneSignal.Current.StartInit(ConstantHelper.OneSignalToken)\r\n                .InFocusDisplaying(OSInFocusDisplayOption.None)\r\n                .HandleNotificationOpened(async (result) =>\r\n                {\r\n                    try\r\n                    {\r\n                        if (Application.Current.MainPage == null)\r\n                        {\r\n                            MainPage = Settings.IsTokenSet\r\n                                ? new CustomNavigationPage(new MenuPage(true))\r\n                                : new CustomNavigationPage(new PracticesPage());\r\n                        }\r\n\r\n                        if (result.notification.payload.additionalData.ContainsKey(ConstantHelper.AppointmentId) &&\r\n                            result.notification.payload.additionalData.ContainsKey(ConstantHelper.RealName))\r\n                        {\r\n                            CurrentAppointment = result.notification.payload.additionalData[ConstantHelper.AppointmentId].ToString();\r\n                            CurrentDoctorName = result.notification.payload.additionalData[ConstantHelper.RealName].ToString();\r\n\r\n                            if (!(Current.MainPage.Navigation.NavigationStack.Last() is ConferencePage))\r\n                            {\r\n                                await Current.MainPage.Navigation.PopToRootAsync();\r\n                                var conferencePage = new ConferencePage();\r\n                                await System.Threading.Tasks.Task.Delay(1500);\r\n                                await Current.MainPage.Navigation.PushAsync(conferencePage);\r\n                            }\r\n                        }\r\n                        await PopUpService.HideAllLoadings();\r\n                    }\r\n                    catch (Exception e)\r\n                    {\r\n                        Analytics.TrackEvent(\"Exception: \", new Dictionary<string, string>\r\n                        {\r\n                            {\"Message\", e.Message},\r\n                            {\"StackTrace\", e.StackTrace},\r\n                        });\r\n                    }\r\n                })\r\n                .HandleNotificationReceived(notification => { })\r\n                .EndInit();\r\n        }` \r\nlink on video:\r\nhttps://www.dropbox.com/s/qnqnbqll7x94qek/VID_20190401_124918.mp4?dl=0\r\n\r\nCan some one explain me, why application work incorrect without Delay? \r\nWhat I doing wrong?\r\n\r\n**Environment**\r\n1. Version Xamarin SDK 3.4.0.\r\n2. Version One Signal 3.2.2\r\n\r\n"}}
other: {"actor":{"display_login":"ZalesskyMaxim"}}