Thursday, April 25, 2013

[android help] Android: Connect to a Server when offline

Android: Connect to a Server when offline - Stack Overflow








Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















Hi I'm working on an Android App which has the possibility of connecting to a server. This application can work online or offline. For connection to the server, I use AsyncTask, which and in doInBackground is where I do all the network operations. Then I create a new instance of the Asynctask when I click a button. What I would like to know is if there is a way of checking if the server is active in order to launch the AsyncTask. I have thought of try and catch but I would like to know if there is a better solution
















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default







.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...