I have a WebView in which I display my site, in that site I have 3 pages in sequence, of those 3 pages I need to identify when the user is on the last page, and from that to get the html content that display that page.
I manage to do a WebViewClient in which i can now identify when the user is on the last page, the problem is that I don t know how to move pass that, I don 't know how to get the html content from that page.
This is what I have so far:
namespace WebViewExample
{
[Activity(Label = "WebView", MainLauncher = true)]
public class WebView : Activity
{
Android.Webkit.WebView web_view;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
SetContentView(Resource.Layout.WebView);
web_view = FindViewById<Android.Webkit.WebView>(Resource.Id.webview);
web_view.Settings.JavaScriptEnabled = true;
web_view.SetWebViewClient(new MyWebViewClient());
web_view.LoadUrl(url);
}
public class MyWebViewClient : WebViewClient
{
public override bool ShouldOverrideUrlLoading(Android.Webkit.WebView view, string url)
{
view.LoadUrl(url);
return true;
}
public override void OnPageStarted(Android.Webkit.WebView view, string url, Android.Graphics.Bitmap favicon)
{
base.OnPageStarted(view, url, favicon);
}
public override void OnPageFinished(Android.Webkit.WebView view, string url)
{
base.OnPageFinished(view, url);
int i = 0;
}
}
}
}
Thanks.