Here's some really simple code that I think should get me the favicon
for facebook, but my callback is never called, and all I see in the
logs after my app launches is (running logcat *:V)
D/skia ( 245): xxxxxxxxxxx jpeg error 53 Not a JPEG file: starts
with 0x%02x 0x%02x
... which is obvious, since I want an ico file, not a jpeg.
package com.whizziwig.icodbtest;
import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.os.Message;
import android.util.Log;
import android.webkit.WebIconDatabase;
import android.webkit.WebView;
public class IcoDbTest extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
String bookmark_url = "http://facebook.com";
// Do I need to do this? WebIconDatabase says it needs a
WebView.
WebView wv = new WebView(this);
WebIconDatabase db = WebIconDatabase.getInstance();
db.requestIconForPageUrl(bookmark_url, new
WebIconDatabase.IconListener() {
public void onReceivedIcon(String url, Bitmap icon) {
Log.e("BB", "received icon");
}});
}
}
thanks,
--dave
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---