Here is the error: request time failed: java.net.SocketException: Address family not supported by protocol
and here is the code:
public class LoginPage extends Activity { protected void OnCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.login_layout); final EditText account = (EditText) findViewById(R.id.editText1); final EditText Login = (EditText) findViewById(R.id.editText2); final EditText Password = (EditText) findViewById(R.id.editText3); // ProgressBar Progress = (ProgressBar) findViewById(R.id.progress); Button butlogin = (Button) findViewById(R.id.button1); butlogin.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getBaseContext(), "Please wait, connecting to server.", Toast.LENGTH_LONG) .show(); try { HttpClient Client = new DefaultHttpClient(); String URL = "http://" + account + ".megaplan.ru/" + Login + "&password" + Password; Log.i("httpget", URL); try { String SetServerString = ""; HttpGet httpget = new HttpGet(URL); ResponseHandler<String> responseHandler = new BasicResponseHandler(); SetServerString = Client.execute(httpget, responseHandler); } catch (IOException e) { Log.i("Exception", "Exception:" + e); } finally { } } finally { }}});}}
If the code is not working, then at least the form should open, but it does not open ...