protected override void OnSleep() { // The app is going to the background. NetworkInfo.DisposeResources(); }