samedi 31 octobre 2015

Android webview: How to get webview to load my website

So I am currently trying to learn the android webview but have run into some issues. I got it to load youtube.com perfectly but when I try my website it will not work; I just get a blank white screen. Why is that? My website does not have https and this is my code inside the activity's .java class:

    web = new WebView(this);
    web.loadUrl("nickhulsey.com");
    web.getSettings().setJavaScriptEnabled(true);
    web.setWebChromeClient(new WebChromeClient());
    web.setWebViewClient(new WebViewClient());

    setContentView(web);

Is it some sort of security issue or is my website not built properly for the webview to work?




Aucun commentaire:

Enregistrer un commentaire