I can not send a GET request to android.
try { URL url = new URL("http://10.0.2.2/denwer/php/index.php"); url.openConnection(); } catch (Exception e) { Context context = getApplicationContext(); Toast toast = Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT); toast.setGravity(Gravity.CENTER, 0, 0); toast.show(); }
But for some reason index.php is not executed (the data should be entered into the database), and the exception is not raised. Although if I open this address in the browser on the android, the script is executed. What to do?