I am developing the chatting application but by using that application two persons are not received chatting messages properly.If one person send a chat message to other did not receive it immediately .For that i want the refresh that application For that what can i do?Give me some suggestion .Thanks in advance
A:
First of all declare the WebView control globally in your activity.
WebView wvWebView;
Now load the web page into the
//created an instance of the webview from the XML layout.
wvWebView = (WebView) findViewById(R.id.mywebview);
//then open your web page in the web view
wvWebView.loadUrl("http://....");
//now schedule a timer which will reload/refresh the page every 60 seconds.
new Timer().schedule(new TimerTask(){
@Override
public void run() {
// TODO Auto-generated method stub
wvWebView.reload();
}}, 60000, 60000);
I hope this will help you.
Rahul Patel
2010-03-29 19:27:25