java - How to handle ConnectTimeoutException Android -


does know how handle connecttimeoutexception? i'm posting variables url using asynctask internet connection shocking i'm recieving null data because of connecttimeoutexception. best ways handle example if time out occurs try run again etc have not had problem before don't have clue how handle feel needs handling improve user experience. ideas?

you use handler let activity know got connecttimeoutexception

catch exception in asynctask , send message handler (then whatever want)

just information, asynctask aren't designed long running operation, if should use thread


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -