Exchange

How to Chick a Url Valid or Not in Android Studio

 


String url = "http://www.doyouknow019.blogspot.com";

if (url.startsWith("http://") && !url.startsWith("https://")){
Toast.makeText(ProfileActivity.this, "This Is a valid Url", Toast.LENGTH_SHORT).show();
}else {
Toast.makeText(ProfileActivity.this, "This Is Not a valid Url", Toast.LENGTH_SHORT).show();
}



Post a Comment

0 Comments