Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6908429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:33:44+00:00 2026-05-27T08:33:44+00:00

I am trying sending data from android application (with emulator) to web server (a

  • 0

I am trying sending data from android application (with emulator) to web server (a php page) nowadays. Firstly, I had tried this program with emulator and it was working. After that, I tried this program with telephone and an exception occurred :

–> IO Exception : The operation timed out.

One part of my code :

HttpClient httpclient = new DefaultHttpClient();

HttpPost httppost = new HttpPost("http://10.0.2.2:90/takeDatas.php");
try {                   
    List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
    nameValuePairs.add(new BasicNameValuePair("enlem", latitude ));
    nameValuePairs.add(new BasicNameValuePair("boylam", longitude ));
    httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
    httpclient.execute(httppost);

} catch (ClientProtocolException e) {
    Toast.makeText(ReportLocationActivity.this, "Client protokol exception ", Toast.LENGTH_LONG).show();
} catch (IOException e) {
    Toast.makeText(ReportLocationActivity.this, "IO exception "+e.getMessage(), Toast.LENGTH_LONG).show();
}

I hope you will help me.
Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:33:44+00:00Added an answer on May 27, 2026 at 8:33 am

    The localhost in emulator is the emulator itself. Not sure about Windows environment, but under Linux I was able to get an access to web server on the host system from the emulator by IP 10.0.2.2 (Note: this IP is not the IP of my Linux system, but from the emulator it’s accessible exactly by this IP).
    You can read more about emulator networking here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to receive a json object back from php after sending data
I was trying to parse response data from web server. I am using Xcode
I'm trying to refresh a page without sending POST from the previous time. I've
I currently develop a server application which has to receive serialized data from clients,
I'm still trying to figure out WebSockets. I'm sending over data from the javascript
I am trying to transfer data from one page to another but some problem
I've been trying for days now to create an application client server,both on android,running
I'm trying to make motion controller using the values from android sensors. Currently sending/receiving
I'm trying to save a dynamic pdf file generated from a web server using
I'm trying to send data from my Android app to my PC over TCP.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.