Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Android: WebView Only Shows Blank Page

I'm trying to display a remote URL using WebView. I can display the URL on iOS, but on Android, all I see is a blank white screen, although the window title does have the correct title.

Why is Android showing only a blank white screen but it works on iOS? I'm using the 2.2 emulator; I can't use 2.3 because the evalJS function is horribly broken on the 2.3 emulator.

Here's a very simple app.js that demonstrates the problem:

Titanium.UI.setBackgroundColor('#000');

var window = Titanium.UI.createWindow({
    title: "Show Google",
    backgroundColor: "#000"
});

webView = Ti.UI.createWebView({
  height: Ti.Platform.displayCaps.platformHeight,
  width: Ti.Platform.displayCaps.platformWidth,
  top: 0,
  url: "http://www.google.com"
});
window.add(webView);
window.open();

Thank you!!!!

-Ryan

— asked October 3rd 2011 by Ryan Asleson
  • android
  • webview
2 Comments
  • I just copied and pasted your code into a new mobile project and it runs fine on Android for me. Can you list what titanium mobile SDK you are using and what OS and version you are using? Are you using Titanium Studio?

    — commented October 3rd 2011 by Tony Lukasavage
  • OK, I've been digging deeper and I think it's some issue with our local proxy. Some sites I can get to, and others I can't (although they work on iOS) but I think it's something with the corporate proxy. I'll chase that idea and see what happens. Thank you for taking a look!!!!

    — commented October 3rd 2011 by Ryan Asleson

0 Answers

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.