Android: WebView Only Shows Blank Page

You must Login before you can answer or comment on any questions.

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 2 years ago by Ryan Asleson
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 2 years ago 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 2 years ago by Ryan Asleson

Your Answer

Think you can help? Login to answer this question!