Sep 26 |
3:55 PM |
Mark M. |
has entered the room |
Mark M. |
turned on guest access |
Sep 26 |
4:00 PM |
Lefko |
has entered the room |
Mark M. |
hello, Lefko!
|
Mark M. |
how can I help you today?
|
Lefko |
hey Mark
|
Lefko |
The company that I work for has a B2B app that is used with wifi only
|
Lefko |
the connection in the stores where the app is used can sometimes be spotty
|
Lefko |
what seems to be happening is that the wifi doesn't disconnect
|
Lefko |
I mean the connection doesn't disconnect
|
Lefko |
but practically speaking there is no connection at all (for all intents and purposes)
|
Lefko |
no requests make it through they all timeout
|
Sep 26 |
4:05 PM |
Lefko |
so first of all do you know of an event that the os broadcasts that would happen if the device sudenly has extremely slow connection speeds
|
Mark M. |
I am not aware that there is such a broadcast
|
Lefko |
darn
|
Lefko |
ok do you have a suggestion for me then?
|
Mark M. |
in terms of what?
|
Lefko |
perhaps a wifi heartbeat monitor or somehting like that?
|
Mark M. |
why do you proactively need to know about the problem?
|
Mark M. |
as opposed to simply dealing with the timeout when it happens?
|
Mark M. |
after all, a heartbeat is simply a way of getting timeouts to happen more frequently
|
Lefko |
right,
|
Lefko |
yes that is a fair point,
|
Mark M. |
if you need to let the user know about the issue, sooner than you might otherwise find out, then a heartbeat might be appropriate
|
Lefko |
basically my higher ups want a message displayed that there is no connection available currently and t disable certain ui elements in that case
|
Mark M. |
what sort of communications is this? HTTP? something else?
|
Lefko |
yes
|
Lefko |
standard PUT GET etc
|
Lefko |
I mean POST
|
Lefko |
haha
|
Lefko |
do you know of a wifi heartbeat library so that I dont have to reinvent the wheel?
|
Mark M. |
no, sorry
|
Mark M. |
another approach would be to establish a separate long-term connection with the server (e.g., WebSocket), and see how that behaves
|
Sep 26 |
4:10 PM |
Mark M. |
if that fails during your connectivity problems, then you could just detect that failure, instead of doing a periodic heartbeat
|
Lefko |
wow. that might work as we are in the process of adding a websocket for other reasons anyway. thanks!
|
Lefko |
enjoy the rest of your day!
|
Mark M. |
you too!
|
Lefko |
has left the room |