1

I have a WebView inside a Fragment.

How can I start another Activity when I click upon a link found in the WebView.

Knossos
  • 15,802
  • 10
  • 54
  • 91
Thiwanka Wickramage
  • 782
  • 1
  • 10
  • 22
  • You might find [this link of use](http://stackoverflow.com/questions/525063/android-respond-to-url-in-intent). The trick is to use an [intent filter](http://developer.android.com/guide/topics/manifest/intent-filter-element.html) to determine whether a URL matches one that your App will respond to. – Knossos Dec 09 '15 at 16:46
  • Im sorry I dont understand about this intent-filter. please can u give me a complete example.. – Thiwanka Wickramage Dec 09 '15 at 16:52
  • There are a lot of examples on [Google](https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=intent%20filter%20example). – Knossos Dec 09 '15 at 16:54
  • There has but all are base on the activity, not with the Fragment – Thiwanka Wickramage Dec 09 '15 at 17:02
  • In this case, the Fragment is completely irrelevant. The WebView is also irrelevant. You click on the URL, Android determines that your App handles it, the associated Activity is started. – Knossos Dec 09 '15 at 17:07
  • Please give me an example.. very very appreciate. – Thiwanka Wickramage Dec 09 '15 at 17:11

0 Answers0