title: Volley runs on Emulator but fails on device
body: <p>I have an LG G3 and when I run my app on it, Volley fails to work. All I am doing is sending a post request to my local server and it works perfectly on the emulator but then fails on the device. The error I get is the timeout error. Here is the code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          final Button button = (Button) findViewById(R.id.button);
          final TextView textview = (TextView) findViewById((R.id.test));
          button.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  sendRequest("example", "0", "0", "0", "0", "0", "0");
  
              }
          });
      }
  
  
      public void sendRequest(final String location, final String mood, final String gender, final String age,
                              final String day, final String month, final String year) {
  
          RequestQueue requestQueue = Volley.newRequestQueue(this);
          String url = "http://10.0.2.2:8000/polls/add/";
  
          StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
                  new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          Toast.makeText(MainActivity.this, "works", Toast.LENGTH_SHORT).show();
                      }
                  }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(MainActivity.this, "Error is: " + error.toString(),
                          Toast.LENGTH_LONG).show();
                  Log.e("VOLLEY", error.toString());
              }
          }) {
              @Override
              protected Map&lt;String, String&gt; getParams() {
                  Map&lt;String, String&gt; parameters = new HashMap&lt;&gt;();
                  parameters.put("age", age);
                  parameters.put("location", location);
                  parameters.put("mood", mood);
                  parameters.put("gender", gender);
                  parameters.put("day", day);
                  parameters.put("month", month);
                  parameters.put("year", year);
                  return parameters;
              }
  
              @Override
              public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
                  Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
                  params.put("Content-Type", "application/x-www-form-urlencoded");
                  return params;
              }
          };
          requestQueue.add(stringRequest);
      }
  }  
  </code></pre>
  
  <p>Any help would be really appreciated. Thanks!</p>