protected override async void OnAppearing() { base.OnAppearing(); INetworkManager nwm = DependencyService.Get <INetworkManager>(); if (nwm != null && nwm.IsNetworkConnected()) { var products = await ProductService.GetProductsAsync(); BindingContext = products; } else { await DisplayAlert("Not Connected", "you are not connected to the network", "OK"); } }
protected async override void OnAppearing() { base.OnAppearing(); INetworkManager mgr = DependencyService.Get <INetworkManager>(); if (mgr.IsNetworkConnected()) { var products = await ProductService.GetProductsAsync(); BindingContext = products; } else { await DisplayAlert("Not connected", "you are not connected to a network", "Ok"); } }