This is based on the Metaio sdk, but not sure the problem is dependant of it. I have created a basic AREL based Android app, using the Creator. On detection of marker I would like to load a url in a webview.
However when the marker is detected, I get the dialog of choosing what browser to open the url in.
How can I override that and make it open inside a webview in my app?
I tried using public boolean shouldOverrideUrlLoading(WebView view, String url) but it does not get called.
How can I make sure I get all the urls that are attempted to open by an Activity? so I can direct the calls to a webview..
In my activity I have this inside onCreate:
mWebView = (WebView) findViewById(R.id.webview); mWebView.setWebViewClient(new WebViewHandler());
and this outside onCreate:
class WebViewHandler extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon)
{
Log.d("LEE","ping1!!!!!"+url);
mProgress.setVisibility(View.VISIBLE);
}
@Override
public void onPageFinished(WebView view, String url)
{
Log.d("LEE","ping2!!!!!"+url);
mProgress.setVisibility(View.GONE);
}
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
Log.d("LEE","Triggered url: !!!!!"+url);
}
}