import java.net.URL;
public final class NetworkUtil {
+ private static final int thirtySeconds = 30000;
public static HttpURLConnection prepare_connection(SharedPreferences pref, String path) throws
IOException {
final String backend_url = pref.getString("backend_url", "");
http.setRequestProperty("Accept-Charset", "UTF-8");
http.setInstanceFollowRedirects(false);
http.setUseCaches(false);
+ http.setReadTimeout(thirtySeconds);
+ http.setConnectTimeout(thirtySeconds);
return http;
}