Thank you for your help. So, what is this book you speak of...? I've modified my code according to your suggestions. I've also added a couple other tests to see if I get output. Curious thing is that the only time I see any output on the screen is when I load 'http:// commonsware.com'. None of the other attempts show anything on the screen. No real errors, just nothing shows up, however commonsware.com does show.
btw, here is my main.xml: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="fill_parent"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/ android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:orientation="horizontal"> <WebView android:id="@+id/webView" android:background="#77CC0000" android:layout_height="wrap_content" android:layout_width="fill_parent" android:focusable="false"/> </LinearLayout> </LinearLayout> public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); try { mainPage = (WebView) findViewById(R.id.webView); mainPage.loadData( "<html><body>Hello World!</body></html>", "text/html", "utf-8"); Thread.sleep(60000); mainPage.loadData( "<html><body><img src=\"file:///android_asset/ Winter.jpg\"></body></html>", "text/html", "utf-8"); Thread.sleep(60000); mainPage.loadData( "<img src=\"file:///android_asset/Winter.jpg\">", "image/jpeg", "utf-8"); Thread.sleep(60000); mainPage.loadUrl("http://commonsware.com"); Thread.sleep(60000); } catch (Exception e) { android.util.Log.e("Exception : ", e.getMessage()); } } On Jun 3, 9:14 am, "Mark Murphy" <[EMAIL PROTECTED]> wrote: > > what is working for you? I could find no real examples of any code > > using WebView to load a page from the internet. > > What you have should work fine other than the catch block. My example in > my book is similar to your implementation, minus the try/catch block, and > usinghttp://commonsware.comas the URL. Works like a champ. Moreover, > based on the logcat output, yours works fine for you -- leastways, those > DEBUG/browser messages at the end sure make it sound like the browser > loaded a page. > > Your catch block probably should use android.util.Log.e() to dump the > results to the logcat output. Unless you're following the instructions for > redirecting stdout/stderr to logcat per: > > http://code.google.com/android/reference/adb.html#stdout > > Try loading a different Web page other than the Google home (which has a > lot of whitespace and so the "meat" of the page might need to be scrolled > into view), and see if your catch block actually catches an error that > might offer a clue. If that doesn't help, write back with your symptoms. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > The Busy Coder's Guide to Android Development -- coming in June 2008! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---