title: I'm not getting the original URL Based Android
body: <p>After creating a separate thread on Android, they try to get a original URL. Through the short URL.
  But I didn't get it - sorry not native english.</p>
  
  <p>My code:</p>
  
  <pre><code>public class Expander_URL{
  
    private String expandURL="";
    private URL url;
  
  
    public String Expand(String short_url)throws IOException {
      url = new URL(short_url);
      HttpURLConnection conn = (HttpURLConnection) url.openConnection();
  
  
      conn.setInstanceFollowRedirects(false);
      conn.setRequestMethod("HEAD");
  
      this.expandURL = conn.getHeaderField("Location");
      conn.disconnect();
  
      return this.expandURL;
    }
  
  }
  </code></pre>