I\'m trying to get the favicon of the url the user enters, for example
_url = \"google.com\";
I use HttpUrlConnection to get the Bitmap of
Note: I am not sure how helpful my answer would be.
You can grab the favicon using google:
http://www.google.com/s2/favicons?domain=stackoverflow.com
returns:

You don't have to specify http or https.
http://www.google.com/s2/favicons?domain=my.yorku.ca ===>> (https://my.yorku.ca)
returns:

But this is not the actual favicon that https://my.yorku.ca uses. So, I guess google returns a default one for sites that do not provide access their favicons.
InputStream is = null;
String urlPrefix = "http://www.google.com/s2/favicons?domain=";
String _url = "google.com";
Bitmap favicon = null;
try {
is = (InputStream) new URL(urlPrefix + _url).getContent();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
favicon = BitmapFactory.decodeStream(is);
You can actually keep a copy of the default favicon and check if:
if (defaultBitmap.sameAs(favicon)) {
// favicon wasn't available
}