I'd like to extract URL from hi there this is a URL String http://mytest.com
.
I tried to use EditText.getURLs but it didn't work for me.
EditText.setText("hi there this is a URL String http://stackoverflow.com");
EditText.getURLs.toString();
How can I get URL from EditText?
change input type of your EditText ---- android:inputType="textUri"
and get your url using --- String url=edittext.getText().toString();
Check this library: (https://github.com/robinst/autolink-java)
Working fine with Android.
Example:
Here is the function: