I am testing with HttpGet to simply see if it would download anything from my website, but the application crashes on startup. Anyone know why?
package com.httptest;
import java.net.URI;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import org.apache.http.client.methods.HttpRequestBase;
public class httptest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button recieve = (Button)findViewById(R.id.Button);
recieve.setOnClickListener((OnClickListener) this);
}
@SuppressWarnings("null")
public void onClick(View v) {
String url = "http://fuggles7.110mb.com/";
HttpRequestBase http = null;
http.setURI(URI.create(url));
}
}