vendredi 20 février 2015

Android Lollipop Patterns.WEB_URL wrong behavior

I am validating a URL before to open using Patterns.WEB_URL. It works perfect until lollipop that return true to "http://www.google" url for example.



final String registrationUrl = "http://www.google";
final Pattern urlPattern = Patterns.WEB_URL;
Boolean bool = urlPattern.matcher(registrationUrl).matches();


Any idea how to validate a URL? URLUtil.isValidUrl() dont work for me.


Aucun commentaire:

Enregistrer un commentaire