V
vh
I'm using threading in a J2ME app to allow a timeout on an attempt to
connect to server. However, I'm having an issue with the usual
confirmation the user gets on first connection attempt: you know, the
message that say something like "This application would like to send
HTTP traffic. Allow this?" The problem is that I have no idea of how
long the user takes to read this message before hitting "ok", so my
connection timeout could timeout before the user has even hit ok and
before any connection attempt has been made!
Is there any callback available so that I know when the user has
actually hit 'ok'?
My current workaround is to make a dummy first connection to a bad
address, e.g. "http://x", just to get the user to hit 'ok' and get that
out of the way before making my proper connection attempt.
Is there a better way though? This technique makes an attempted DNS
lookup which wastes a little time.
Thanks.
N.B.
I'm aware that in some cases the user can have a preference set so that
the HTTP traffic alert happens before *every* server communication, but
I'm ignoring this case for the moment.
connect to server. However, I'm having an issue with the usual
confirmation the user gets on first connection attempt: you know, the
message that say something like "This application would like to send
HTTP traffic. Allow this?" The problem is that I have no idea of how
long the user takes to read this message before hitting "ok", so my
connection timeout could timeout before the user has even hit ok and
before any connection attempt has been made!
Is there any callback available so that I know when the user has
actually hit 'ok'?
My current workaround is to make a dummy first connection to a bad
address, e.g. "http://x", just to get the user to hit 'ok' and get that
out of the way before making my proper connection attempt.
Is there a better way though? This technique makes an attempted DNS
lookup which wastes a little time.
Thanks.
N.B.
I'm aware that in some cases the user can have a preference set so that
the HTTP traffic alert happens before *every* server communication, but
I'm ignoring this case for the moment.