How to check if URL is valid in Android
Use URLUtil to validate the URL as below. URLUtil.isValidUrl(url) It will return True if URL is valid and false if URL is invalid.
Use URLUtil to validate the URL as below. URLUtil.isValidUrl(url) It will return True if URL is valid and false if URL is invalid.
Here is another implementation of this solution: using System.Net; /// /// Checks the file exists or not. /// /// The URL of the remote file. /// True : If the file exits, False if file not exists private bool RemoteFileExists(string url) { try { //Creating the HttpWebRequest HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest; //Setting the … Read more