title: get url from String in android
body: <p>Currently I am using the following method to get a URL from a string and insert into a TextView. It works fine, but does see  anybody any issues with this approach?</p>
  
  <pre><code>       public String StringURL(String args) {
              String s = args;
              String [] parts = s.split("\\s");
              String withURL = "";
              for( String item : parts ){
                  if (Patterns.WEB_URL.matcher(item).matches()) {
                      if (!item.startsWith("http://") &amp;&amp; !item.startsWith("https://")){
                             item = "http://" + item;
                      }
                      withURL += "&lt;a href=\"" + item + "\"&gt;"+ item + "&lt;/a&gt; ";  
                  }
                  else {
                      withURL += item + " ";
                  }
              }
              return withURL;
          }
  </code></pre>
  
  <p>In the TextView I set the returned String the following way:</p>
  
  <pre><code>TextView.setText(Html.fromHtml(StringURL(P))); 
  TextView.setMovementMethod(LinkMovementMethod.getInstance());
  </code></pre>
  
  <p>This method works only for SdkVersions 8+ since Patterns.WEB_URL was introduced as of SdkVersion 8.</p>