I am working on Android. Trying to display the "favicon" (aka "shortcut icon") or web pages.
So I already have the code to get the URL of this icon from any website, and download it onto my Android.
Now I am trying to make a Bitmap out of it, but always get null as a result.
The code:
String src = String.format("file:///data/data/com.intuitiveui.android/files/%s",prefName);
// prefName is "facebook.ico", and I do see tht file in my DDMS file browser. It's
// a valid icon file.
Bitmap res = BitmapFactory.decodeFile(src);
// This returns null
TIA
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…