Code example for HttpClient

Methods: getParams

0
	private HttpGet httpGet;
	private Activity context;
 
	public AllPollsTask(String url, SplashActivity context) {
		this.httpClient = new DefaultHttpClient();
		this.httpClient.getParams().setIntParameter("http.socket.timeout",
				10000); 
		this.httpClient.getParams().setIntParameter("http.connection.timeout",
				4000); 
		this.httpGet = new HttpGet(url);
		this.context = context;
	} 
 
	@Override 
	protected String[] doInBackground(Void... params) {
		try { 
			// verify if the connection is activated 
			if (this.isOnline()) {
 
			} 
			// else try to activate it