{"action":"created","issue":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1170","repository_url":"https://api.github.com/repos/Windows-XAML/Template10","labels_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1170/comments","events_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1170/events","html_url":"https://github.com/Windows-XAML/Template10/issues/1170","id":170817227,"number":1170,"title":"App lifecycle and startup events","user":{"login":"JurajPupak","id":15939357,"avatar_url":"https://avatars.githubusercontent.com/u/15939357?v=3","gravatar_id":"","url":"https://api.github.com/users/JurajPupak","html_url":"https://github.com/JurajPupak","followers_url":"https://api.github.com/users/JurajPupak/followers","following_url":"https://api.github.com/users/JurajPupak/following{/other_user}","gists_url":"https://api.github.com/users/JurajPupak/gists{/gist_id}","starred_url":"https://api.github.com/users/JurajPupak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JurajPupak/subscriptions","organizations_url":"https://api.github.com/users/JurajPupak/orgs","repos_url":"https://api.github.com/users/JurajPupak/repos","events_url":"https://api.github.com/users/JurajPupak/events{/privacy}","received_events_url":"https://api.github.com/users/JurajPupak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-12T07:52:04Z","updated_at":"2016-09-22T08:10:06Z","closed_at":"2016-09-22T01:02:00Z","body":"I just want to inform you about issue, but maybe it's a bug of VS. When you have backgroundtask with StreamSocketActivity and task is already registered in system, after re-running app from VS, the event OnStartAsync is fired with Running as PreviousExecutionState and event OnInitializeAsync is not fired. It's because backgroundtask is fired with case SocketClosed. This is scenario, when backgroundtask is in-process (Executable is set in Packagemanifest). \r\nIf you run it normally, without VS, so previous state is Terminated/ClosedByUser or NotRunning. Maybe it's normal behaviour, when you run app from VS, who knows :)\r\n\r\nEDIT:\r\nI found next issue. The code below is not working if I simulate the state above. NavigationService is null. Anybody knows, why? App() constructor is called and then OnStartAsync() event. \r\n`NavigationService.Navigate(typeof(ReconnectPage), null, new SuppressNavigationTransitionInfo());`"},"comment":{"url":"https://api.github.com/repos/Windows-XAML/Template10/issues/comments/248838550","html_url":"https://github.com/Windows-XAML/Template10/issues/1170#issuecomment-248838550","issue_url":"https://api.github.com/repos/Windows-XAML/Template10/issues/1170","id":248838550,"user":{"login":"JurajPupak","id":15939357,"avatar_url":"https://avatars.githubusercontent.com/u/15939357?v=3","gravatar_id":"","url":"https://api.github.com/users/JurajPupak","html_url":"https://github.com/JurajPupak","followers_url":"https://api.github.com/users/JurajPupak/followers","following_url":"https://api.github.com/users/JurajPupak/following{/other_user}","gists_url":"https://api.github.com/users/JurajPupak/gists{/gist_id}","starred_url":"https://api.github.com/users/JurajPupak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JurajPupak/subscriptions","organizations_url":"https://api.github.com/users/JurajPupak/orgs","repos_url":"https://api.github.com/users/JurajPupak/repos","events_url":"https://api.github.com/users/JurajPupak/events{/privacy}","received_events_url":"https://api.github.com/users/JurajPupak/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T08:10:06Z","updated_at":"2016-09-22T08:10:06Z","body":"I do it in OnStartAsync. But sometimes the object is null."}}
{"actor":{"display_login":"JurajPupak"}}