Windows store app - How to avoid App Hang when app is doing a Server communication process for long time?

Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,861 Reputation points
2019-12-12T12:22:23.487+00:00

Hi,

I am having a widows store app running in Windows 8.1. In that, I am doing some server communication. the process step is as below

  1. Before starting server communication, i show a loading screen by showing a UI with Progress ring in a popup.
    1. Disable the Corewindow's input as below to avoid any interaction in UI.
    Window.Current.CoreWindow.IsInputEnabled = false
    1. Start the function which talks to server. [Which takes maximum 15 seconds to 25 seconds]
    2. Once get the response from server, i close the popup
    3. I enable the Corewindow's input as below for enabling app's interaction await Task.Delay(TimeSpan.FromSeconds(0.1));
      Window.Current.CoreWindow.IsInputEnabled = true;
      await Task.Delay(TimeSpan.FromSeconds(0.1));

When the app showing, i am just touching the loading screen continuously. now app crashes and eventlog says that it is as App Hang.

How to solve this?

anyone please give me solution..

Thanks.

Universal Windows Platform (UWP)
0 comments No comments
{count} vote

0 additional answers

Sort by: Most helpful