I am attempting to do some operations with a WebView within an activity and was wondering about how to detect when a web page had loaded (this was in relation to an ad serving system). I emailed the very slow ad-agency tech support team, who eventually replied “You can use HTML banners inside a WebView and you will need to implement a WebViewClient class on the WebView”. I wasn’t 100% sure what this meant, but my first guess was to add the words “implements WebViewClient” to my actibvity, i.e.:
public class MyActivity extends Activity implements WebViewClient
{
I was then fully expecting eclipse to tell me that I had some missing imports which it would then give me the option of adding… but to my surprise, the two options were “create interface WebViweClient” and “Fix project setup”. So now I’m confused, not sure what to do next.
Can anyone show me some example code or give me a hint to set me off in the right direction?
EDIT: What I’m attempting to do is load up an ad on a webview, and then at some later time (and having checked that the ad-load was completed), I’ll display the webview.
1 Answer