jQuery won't work properly on Android SDK (webview)

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

jQuery won't work properly on Android SDK (webview)

Postby zer0timesx » Sat Aug 11, 2012 2:15 pm

I've got this problem..
I'm trying to make an android web-application for devrabbit.com.
On all browsers, the content on the main page loads using ajax,
but I can't seem to get this working on my webview...
So here is my code that i have right now:

Code: Select all
    package com.devrabbit.com;
     
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.Window;
    import android.webkit.WebChromeClient;
    import android.webkit.WebSettings;
    import android.webkit.WebSettings.RenderPriority;
    import android.webkit.WebView;
    import android.webkit.WebViewClient;
     
    public class DevrabbitMain extends Activity
    {
        final Activity activity = this;
     
        public void onCreate(Bundle savedInstanceState)
        {
            super.onCreate(savedInstanceState);
           
   
            this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
            setContentView(R.layout.activity_devrabbit_main);
            WebView webView = (WebView) findViewById(R.id.wvDevrab);
            webView.getSettings().setLoadWithOverviewMode(true);
            webView.getSettings().setUseWideViewPort(true);
            webView.getSettings().setJavaScriptEnabled(true);
            webView.getSettings().setRenderPriority(RenderPriority.HIGH);
            webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
            webView.getSettings().setBuiltInZoomControls(false);
            webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
           
            webView.setWebChromeClient(new WebChromeClient() {
                public void onProgressChanged(WebView view, int progress)
                {
                    activity.setTitle("Loading...");
                    activity.setProgress(progress * 100) ;
     
                    if(progress == 100)
                        activity.setTitle(R.string.app_name);
                }
            });
     
           
            webView.setWebViewClient(new WebViewClient() {
                @Override
                public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
                {
                    // Handle the error
                }
     
                @Override
                public boolean shouldOverrideUrlLoading(WebView view, String url)
                {
                    view.loadUrl(url);
                    return true;
                }
            });
             
            webView.loadUrl("http://www.devrabbit.com/login.php");
           
           
        }
       
    }


Can't really post the javascript of the site.. It would be too complicated and too much...
But the part that doesn't work is just the loading of the topics and the top video's loading.. You can always take a look at the site if that would help you to help me.. ;)

Thanks a lot,
Nicolas
zer0timesx
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Aug 11, 2012 2:12 pm

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 5 guests