-1

I am trying to port a website to an Android Tablet using KitKat 4.4.

WebView vendWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = vendWebView.getSettings();
// Enable JavaScript
webSettings.setJavaScriptEnabled(true);


vendWebView.setWebViewClient(new WebViewClient());
vendWebView.loadUrl("https://xxxxxxx.xxxxxx.com/");

The website works on a Chrome browser but not all of the HTML works on the Android Chrome web browser. Should the website be portable from the Chrome PC browser to the Android browser.

                              Thanks

The specific HTML that is not working on the Android browser but works on a PC Chrome browser is -

    <div id="quick-keys" class="sell">
        <div id="menu" class="quick-key-menu">
            <ul></ul>
        </div>
        <div id="list">
            <ul></ul>
        </div>
        <div id="pages">
            <ul></ul>
            <a href="#prev" id="page-previous"><i class="icon-quick-keys-pagination-previous"></i></a>
            <a href="#next" id="page-next"><i class="icon-quick-keys-pagination-next"></i></a>
        </div>
        <div id="quick-key-default">
            <div class="quick-key-menu">
                <ul>
                    <li style="width: 516px;">
                        <a href="/setup/quick_keys">Quick Keys</a>                        </li>
                </ul>
            </div>
            <div class="striped-box">
                <a href="/setup/quick_keys" class="btn btn--primary btn--large btn--well quick-key-call-to-action" alt="Set up your Quick Keys">Set Up Quick Keys</a>
                <p>Quick Keys let you configure a grid of buttons <br />to quickly add products to a sale.</p>
            </div>
        </div>
    </div>
</div>
user1026046
  • 21
  • 1
  • 7
  • 1
    define `not all of the HTML works`. otherwise i don't see what kind of answer you can expect. – njzk2 Nov 19 '13 at 22:01
  • What about that isn't working? Is it not displaying? Not working properly? Please explain. – hichris123 Nov 20 '13 at 22:29
  • The Quick keys that are product selection buttons appear on the desktop version of the web page but not the Android WebView application. Both application pull the web page content from a server on the cloud. – user1026046 Nov 20 '13 at 22:58
  • It sounds like, you want to use a WebView as the application, am I right? It's not related to your question, but this is a bad idea. – Leandros Nov 21 '13 at 00:33
  • That is exactly what I would like to do. I want to take the basic program the is currently working and add some features to the application for an Android tablet. – user1026046 Nov 21 '13 at 16:51
  • Firstly - try running this in Chrome for Android, while there is feature partiy between Chrome Desktop and Chrome for Android, you might be finding something is going wrong somewhere where you are using a feature which isn't available in mobile Chrome. – Matt Gaunt Nov 25 '13 at 00:05
  • The application does work as intended on the Chrome desktop version but not on the Chrome for Android. What I am trying to do is see what specific HTML is causing the problem. All of the HTML is straight forward stuff so I am going to try setWebContentDebuggingEnabled and debug from there. – user1026046 Nov 25 '13 at 06:23
  • @Leandros you might wanna look at PhoneGap. This whole framework is based on "using a WebView as the application" – Vaiden Nov 27 '13 at 16:50
  • 1
    @Vaiden I don't want to look at PhoneGap. I know PhoneGap, though I've never used it, but it's complete crap. Native or nothing. – Leandros Nov 27 '13 at 17:09
  • Can you explain what exactly isn't working / provide a demo on jsbin.com that replicates the issue or provide some screenshots. Doesn't work isn't enough to help I'm afraid. – Matt Gaunt Dec 11 '13 at 10:57

1 Answers1

1

Have you seen the page for migrating WebViews to 4.4?

There are a number of changes in 4.4 to WebView handling, one thing may be to setWebContentDebuggingEnabled and seeing what the WebView is actually receiving.

Does the WebView work as expected in previous versions?

(Sorry I wanted to make this a comment but I would have lost a lot of formatting)

Eric Barr
  • 443
  • 4
  • 8