URL url = new URL(versionPath);
Toast.makeText(getApplicationContext(), versionPath, Toast.LENGTH_SHORT).show();
HttpURLConnection c = (HttpURLConnection) url.openConnection();
c.setRequestMethod("GET");
c.setDoOutput(true);
c.connect();
Toast.makeText(getApplicationContext(), "HttpURLConnection Complete!", Toast.LENGTH_SHORT).show();
Exception catched, first versionPath text is correct, cannot see the "HttpURLConnection Complete!" text. When I copy the same "versionPath" on the browser inside my device, I can see the content. I have INTERNET permission in my manifest. Any idea?