hi
i am developing android application website address how can implemented validation
example : www.yahoo.com
please forward some solution
hi
i am developing android application website address how can implemented validation
example : www.yahoo.com
please forward some solution
Im assuming you want to check if a website exists
You could try this, make sure the android.INTERNET permission is selected in your manifest.
String host = "http://www.yahoo.com/";
int timeOut = 3000; // I recommend 3 seconds at least
boolean status = InetAddress.getByName(host).isReachable(timeOut);
You should of expanded a little bit on what you said, your question was very confusing, you should of also mention you were using regex.
Try this:
^[A-Za-z0-9.\\-]+.[A-Za-z0-9.\\-]+\\.[A-Za-z]{2,4}$