AndroidフォンからWebサイトに値を送信しています。ウェブサイトは、いくつかの無料のソースを通じてオンラインで登録されています。
コードは、
public class HttpStorage extends AsyncTask{
protected void onPreExecute() {
super.onPreExecute();
}
protected void onPostExecute(Integer result) {
}
public void postData() {
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new
HttpPost("http://pavithrakrishnakumar.simplesite.com/");
try {
List <NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("IDToken1", "username"));
nameValuePairs.add(new BasicNameValuePair("IDToken2", "password"));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
} catch (ClientProtocolException e) {
} catch (IOException e) {
}
}
@Override
protected Object doInBackground(Object... arg0) {
postData();
return null;
}
}
これで、Android 側でエラーが発生しなくなりました。上記のサイトで値を取得するにはどうすればよいですか