I try to load HTML5 game from internet and show it in my WebView but when I try to do that I can't load the game, my monitor is black and there is only one line (about 30px high) that is on my screen this is my code
public class BrowserGame extends MenuHandler {
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.browsergame);
WebView browser = (WebView)findViewById(R.id.webGame);
browser.setFocusableInTouchMode(false);
browser.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
view.loadUrl(url);
return true;
}
});
Bundle game = getIntent().getExtras();
String gameURL = game.getString("gameURL");
browser.loadUrl(gameURL);
}
}
When I try same link on mobile browser it shows the game.
Thanks.