I'm getting exception while hitting a url from android app. I have added Internet permission to the app's manifest.
URL url = new URL("www.example.com?query=abcd");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
urlConnection.connect();
urlConnection.disconnect();