Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i had made html+jquery mobile app using webview , my all code is inside assest folder, i noticed sometime my app hangs and sometime it works fine ,if i am missing some thing

below is andorid java code

i made html +jquery app , app hangs most of time , and some time it works any way to make it work fine

below problem:

1: some time object in canvas gets duplicated however there is not changes of getting duplicate object on any of canvas this problem occurs only in android browser

2: sometime while dragging object gets stuck any where without being dropped in canvas only in android browser
below is my java code for that

C#
public class MainActivity extends Activity implements OnClickListener {

       private static final String URL = "file:///android_asset/index.html";
       private WebView mWebView;

       @SuppressLint("SetJavaScriptEnabled")
       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);
           mWebView = (WebView) findViewById(R.id.webview);
           mWebView.getSettings().setJavaScriptEnabled(true);
           mWebView.setWebChromeClient(new WebChromeClient());
           mWebView.setWebViewClient(new WebViewClient(){

           });
           refreshWebView();
       }

       private void refreshWebView() {
           mWebView.loadUrl(URL);
       }

       @Override
       public void onClick(View v) {
           refreshWebView();
       }

   }



and html code that i am using inside assest folde is below link:


http://liveweave.com/JckSgC
Posted
Updated 30-Oct-14 22:50pm
v2
Comments
Member 11092310 31-Oct-14 15:03pm    
Make sure you are testing on a real device with minimum 1GB RAM and running Android 4.0 (ICS) or higher. Anything below that will lag.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900