UIWebView sometimes doesn't show on Android

Hello.

I’m using UIWebView on my game. Mostly it works fine. White square shows then contents appear. But sometimes (very rare) even white square doesn’t show as if webview hasn’t been addChilded.

auto webView = cocos2d::experimental::ui::WebView::create();
webView->setAnchorPoint(Vec2::ANCHOR_MIDDLE);
webView->setContentSize(Size(WINSIZE.width * 0.8, WINSIZE.height * 0.55));
webView->setPosition(Vec2(WINSIZE.width/2, WINSIZE.height/2));
webView->setScalesPageToFit(true);
_baseLayer->addChild(webView);
webView->loadURL(urlStr);

Does anyone know how to solve this issue?

Thank you.


I got new info to make this issue happens.

  • Use Under Android5.0 devices. (Android4)
  • Procedure
    1: Open UIWebView normally. (It goes well.)
    2: Go background.
    3: Open Google Play Store app.
    4: push open button next to uninstall button on the app’s page.
    5: open UIWebView again. But nothing happens. totally blank.