1
If I click on a link related to my site, I would like in the list of applications that can open that link (Google Chrome, UC Browser and etc), also appear my application, which is a very simple browser that works using a Webview, but only when it is a link to my website.
This is the code of my app:
mWebView = (WebView) findViewById(R.id.webview);
mWebView.loadUrl("http://google.com");
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setSupportZoom(false);
mWebView.setWebViewClient(new LinkWebViewClient());
Someone has clues as to how to do this?
Right, more like: if the link has this format: Meudominio.com/pagina2.html opens is the index of the site. How does this to open the requested link instead of the index?
– user41630
That’s all the link you want to open?
– ramaral
No. It’s just that my site has several pages... or so: any link that contains my domain.
– user41630
Edit the question and enter the code you are using. My answer should work for any link in your domain, so you are using it
<data android:pathPattern="/.*" />
– ramaral
I believe you must manipulate something in java to receive the link. I’m going to a search
– user41630
With the
intent-filter
answer your application already appears in the list under the conditions you intended?– ramaral
yes appears, just does not open the link I clicked. Opens is the index of the site.
– user41630
Then your question has been answered. It is best to open another question for this new problem. Put in it the code you are using to get the link.
– ramaral
Thank you! Thank you!
– user41630
See my new question: http://answall.com/questions/143280/webview-n%C3%A3o-opens-the-link-requested
– user41630