WebBrowser setPage() leads to blank screen on iOS

41 views
Skip to first unread message

State Thirteen

unread,
Nov 15, 2013, 8:01:14 AM11/15/13
to codenameone...@googlegroups.com
Hi,

I am getting a blank white screen on iPad ios 6.0.1 when setting page with setPage() WebBrowser method.
The same code doesn't have this issue on Android device.

myWb.setPage("<html><body>"+mypage+"</body></html>");

mypage is an HTML content without headers and <html> <body> tags. 
Should I put some specific headers for the iOS browser?

"ios.application_exits false" still doesn't work on the same iPad device. 
Could it be something wrong with the device?

State Thirteen

unread,
Nov 15, 2013, 1:41:20 PM11/15/13
to codenameone...@googlegroups.com
Additional info. I am also using this code and call .setPage() in postResponse method of the ConnectionRequest
((BrowserComponent) myWb.getInternal()).setPinchToZoomEnabled(false);
f.addComponent(BorderLayout.CENTER, myWb);
f.putClientProperty("MyWeb", myWb);
((BrowserComponent) myWb.getInternal()).setBrowserNavigationCallback(...);


Shai Almog

unread,
Nov 15, 2013, 4:21:46 PM11/15/13
to codenameone...@googlegroups.com
Hi,
iOS devices are far more sensitive to HTML syntax than Android devices. I suggest creating an actual HTML file and using that.

Applications should just restore themselves assuming you have the lifecycle object defined correctly and don't have any major background threads still running after stop() is invoked.
Reply all
Reply to author
Forward
0 new messages