protected async override void OnStart() { if (Connectivity.NetworkAccess == NetworkAccess.Internet) { await EventHubRegistrator.Register(); } }
protected override async void OnResume() { if (Connectivity.NetworkAccess == NetworkAccess.Internet) { await EventHubRegistrator.Register(); } else { await MainPage.Navigation.PushModalAsync(new NoConnectionPage()); } }
private async void ConnectivityChanged(object sender, ConnectivityChangedEventArgs e) { if (Connectivity.NetworkAccess == NetworkAccess.Internet) { MainPage = new MainPage(); await EventHubRegistrator.Register(); } else { MainPage = new NoConnectionPage(); } }
protected async override void OnSleep() { await EventHubRegistrator.Unregister(); }