Magic XPA 3.3 RIA problem #ria #xpa


lehoczki@...
 

The below problem arise in our Magic XPA 3.3 Rich Client application:

The application runs on Android telephones and tablets.

Sometimes the user goes too far and the telephone loose wifi signal. Immediately when this happens the magic „Communication Error” appears (Network unavailable. Do you wish to retry connecting?)

It would be better delaying the message for x seconds and after the elapsed time the error message can appear. In case user goes back near to the wifi in x secends there should be no error message.

We tried using:

[MAGIC_RIA]

HttpRequestTimeout=70

Or

URLTimeout= 70

 

[MAGIC_ENV]

RequesterTimeout = 70

 

We also tried:

Unavailable Server event with ServerLastAccessStatus() function

Or

ClientSessionSet('EnableCommunicationDialogs','FALSE'LOG) function

 

None of above solves the problem. Sometimes other message appears and the application quits, sometimes after 7 second no error message appears and the application just hangs.

May be combination of settings or functions can solve the problem, but what combination?

 

I really appreciate any help in this topic.


Todd Baremore
 

Viktor,

Have you tried using the following?
ClientSessionSet('EnableCommunicationDialogs','FALSE'LOG)
I have this in following program.


This will allow you to monitor the Unavailable Server event and handle it as you wish.
Todd
On 9/20/2019 4:01 AM, lehoczki.viktor via Groups.Io wrote:

The below problem arise in our Magic XPA 3.3 Rich Client application:

The application runs on Android telephones and tablets.

Sometimes the user goes too far and the telephone loose wifi signal. Immediately when this happens the magic „Communication Error” appears (Network unavailable. Do you wish to retry connecting?)

It would be better delaying the message for x seconds and after the elapsed time the error message can appear. In case user goes back near to the wifi in x secends there should be no error message.

We tried using:

[MAGIC_RIA]

HttpRequestTimeout=70

Or

URLTimeout= 70

 

[MAGIC_ENV]

RequesterTimeout = 70

 

We also tried:

Unavailable Server event with ServerLastAccessStatus() function

Or

ClientSessionSet('EnableCommunicationDialogs','FALSE'LOG) function

 

None of above solves the problem. Sometimes other message appears and the application quits, sometimes after 7 second no error message appears and the application just hangs.

May be combination of settings or functions can solve the problem, but what combination?

 

I really appreciate any help in this topic.



lehoczki@...
 

Dear Todd Barmore,

Thanks for your comment!
Yes, I've tried.
I've made several more tests.
[MAGIC_RIA]
HttpRequestTimeout=70
Works more or less. Sometimes when wifi signal lost I got Server Unavailable in 2 seconds. Sometimes it works as expected so the program hangs the cursor shape changes and when I have wifi signal again the program continues. Sometimes the program hangs, cursor shape changes but after 7 seconds no  "Do you wish to retry connecting?" message appear.
So, I don't know to force the application to behave always the same way. When signal lost wait for 7 seconds then when signal is back continue if signal is lost drop an error message "Do you wish to retry connecting?". So only the error message appearance should be delayed for a while to give a chance to the user go back near the wifi.


Todd Baremore
 

Viktor,

My Android RIA app is almost entirely offline programs so I have not encountered exactly what you are experiencing.   I'm wondering if the "Do you wish to retry connecting?" message is coming from the Android OS.

You may want to try loading records locally in a batch task before allowing the user to work with the data.  When the user saves the data or closes the window, you can save the changes to the working tables in the server.  Before reading or writing data to the server, check that you have a server connection.  To test server access, I have a batch program (end task after updating record)  that tries to open a table on the server. 




MSE recommends that the Start Program be Offline.

Todd
On 9/24/2019 5:30 AM, lehoczki.viktor via Groups.Io wrote:

Dear Todd Barmore,

Thanks for your comment!
Yes, I've tried.
I've made several more tests.
[MAGIC_RIA]
HttpRequestTimeout=70
Works more or less. Sometimes when wifi signal lost I got Server Unavailable in 2 seconds. Sometimes it works as expected so the program hangs the cursor shape changes and when I have wifi signal again the program continues. Sometimes the program hangs, cursor shape changes but after 7 seconds no  "Do you wish to retry connecting?" message appear.
So, I don't know to force the application to behave always the same way. When signal lost wait for 7 seconds then when signal is back continue if signal is lost drop an error message "Do you wish to retry connecting?". So only the error message appearance should be delayed for a while to give a chance to the user go back near the wifi.