Hi All I need help on reading html source code of a page after page loading in android following is my code Here i am able to read the source but the access tokens,user id and some data of the page are missing please help me.
public void onPageFinished(WebView view, String url) { // TODO Auto-generated method stub super.onPageFinished(view, url); try { URL urlObj = new URL("http://ncpo.cc/test/example.php"); Log.d("url", urlObj.getHost()); HttpClient client = new DefaultHttpClient(); HttpGet request = new HttpGet(url); response = client.execute(request); String html = ""; java.io.InputStream in = response.getEntity().getContent(); BufferedReader reader = new BufferedReader( new InputStreamReader(in)); StringBuilder str = new StringBuilder(); String line = null; while ((line = reader.readLine()) != null) { str.append(line); } while ((line = reader.readLine()) != null) { str.append(line); } in.close(); html = str.toString(); if (html.contains("): <!DOCTYPE html PUBLIC ")) { } else { if (html.contains("Popular Media")) { mWebView.loadUrl(url); } else { Log.d("html in the else begining", html); } } } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } Please help me to solve this problem. Thanks Naveen. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en