Reputation: 255
When I click on a link (let's say: www.facebook.com
) and I choose my app to open it, the webview in my app always loads my home page, not the one I clicked on. What could be causing this?
When I click on it:
I choose my browser (unnamed) and then:
Upvotes: 0
Views: 431
Reputation: 770
The main problem you have is that you are opening google.com not the url that it pass to your application via the Intent mechanism.
To get the targeted url you need to parse the data from the intent with this.
Intent intent = getIntent();
link = intent.getDataString();
myWebView.loadUrl(link);
Upvotes: 1