Get default favicon
import java.net.MalformedURLException;
import java.net.URL;
import android.util.Log;
class Main {
public URL getDefaultFavicon(String rssurl) {
try {
URL orig = new URL(rssurl);
URL iconUrl = new URL(orig.getProtocol(), orig.getHost(),
orig.getPort(), "/favicon.ico");
return iconUrl;
} catch (MalformedURLException e) {
Log.d("", Log.getStackTraceString(e));
return null;
}
}
}
Related examples in the same category