Page 1 of 1

pui.onoffline and reconnection

Posted: Tue Jun 09, 2015 9:51 am
by Bruno97
Hi,

The pui.onoffline event fires when Profound UI cannot make a connection to the server.. ok !
Now, if in case of a loss of connection I display an offline screen like indicated here, how can I get back to my program when the connection is restored ?

Example : let's imagine 3 similar screen formats.
1) Display of an screen format 1.
2) Loss of connection, enter key is pressed.
3) pui.offline event fires and displays an offline version of screen format 2.
4) Connection is back !
5) Enter key is pressed.
6) What do I need here to display the online version of screen format 3 ??

It seems that the pui.onoffline is not triggered from an already offline screen, right ?

Thanks,
Bruno

Re: pui.onoffline and reconnection

Posted: Wed Jun 10, 2015 11:29 am
by Scott Wagers
Bruno,

I'm looking into how this event should work. I'll let you know what I find out about this.

Thank you,
Scott

Re: pui.onoffline and reconnection

Posted: Fri Jun 12, 2015 9:18 am
by Scott Wagers
Bruno,

I found out the once the offline mode is detected the app would need to be restarted after the connection is reestablished. Your offline screen can allow data to be stored on the device locally, then when the connection is available and the app is restarted the stored data can be resubmitted using the pui.submitResponse() function.

Thank you,
Scott

Re: pui.onoffline and reconnection

Posted: Fri Jun 12, 2015 10:19 am
by Bruno97
Scott,

Thank you for your time. It's not the reply I was hoping to read, but I'll deal with it !

Bruno