Merhabalar,
HTTP Request ile veri post edip dönüt almayı bekliyorum

Activity
Kod:
package com.sckn.androidtest;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.support.v4.app.NavUtils;

public class SecondActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_second);
		// Show the Up button in the action bar.
		Button btnhttp = (Button) findViewById(R.id.btnhttp);
		final TextView txtview = (TextView) findViewById(R.id.txthttpreq);
		final EditText txtserver = (EditText) findViewById(R.id.txtserver);
		btnhttp.setOnClickListener(new View.OnClickListener() {
        
            @Override
            public void onClick(View v) {
            	// Creating HTTP client
            	HttpClient httpClient = new DefaultHttpClient();
            	txtview.setText("Gönderiliyor"); 
            	// Creating HTTP Post
            	HttpPost httpPost = null;
            	try{
            		httpPost = new HttpPost(txtserver.getText().toString());
            	}catch(Exception ex){
            		txtview.setText(ex.toString());
            	}
            	
            	List<NameValuePair> nameValuePair = new ArrayList<NameValuePair>(2);
            	nameValuePair.add(new BasicNameValuePair("gelen", "HTTP Test"));
            	//nameValuePair.add(new BasicNameValuePair("password", "encrypted_password"));
            	
            	// Making HTTP Request
            	try {
            	    HttpResponse response = httpClient.execute(httpPost);
            	   
            	   txtview.setText(response.toString());
            	    // writing response to log
            	    //Log.d("Http Response:", response.toString());
            	 
            	} catch (ClientProtocolException e) {
            	    // writing exception to log
            		txtview.setText(e.toString());
            	 
            	} catch (IOException e) {
            	    // writing exception to log
            		txtview.setText(e.toString());
            	}
            	
            }
        });
		
		
		
		
		
		
		getActionBar().setDisplayHomeAsUpEnabled(false);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_second, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			// This ID represents the Home or Up button. In the case of this
			// activity, the Up button is shown. Use NavUtils to allow users
			// to navigate up one level in the application structure. For
			// more details, see the Navigation pattern on Android Design:
			//
			// http://developer.android.com/design/patterns/navigation.html#up-vs-back
			//
			NavUtils.navigateUpFromSameTask(this);
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

}
Android Manifest dosyasından internet erişiminide seçtim. Bu activity açılıp butona tıklayınca "Maalesef AndroidTest durdu" mesajı ile karşılaşıyorum.

txtserverda default olarak "http://192.168.2.180/" yazıyor burası web sunucum.
Teşekkür ediyorum. Herhangi bir hata fırlatmadığı için birşey yapamıyorum.