2

In my react native app I am trying to get URL with the highlighted text from
any browser, I used ShareMenu to get highlighted text but failed to get URL, while sharing the highlighted text I want to get Url of that page also, how can I achieve this I have tried many ways but failed, please suggest any solution.

Note: I don't want to use webView inside react native app but it should be a browser to app communication

Priyanka.k
  • 21
  • 4

1 Answers1

0

You can use Deep linking, for more details checkout this article.

Maneesh
  • 664
  • 5
  • 12
  • I have tried this already but this is not what I want while sharing the highlighted text I want to get URL of that page also. – Priyanka.k Mar 14 '19 at 05:43
  • Do u mean if any user highlighted any text from any website in a browser you want that website URL also?? – Maneesh Mar 14 '19 at 05:47
  • Yes, that's exactly what I want. – Priyanka.k Mar 14 '19 at 05:52
  • As of my knowledge I don't think this will happen why because browser won't share that data I guess. – Maneesh Mar 14 '19 at 06:08
  • but the browser page URL is public, there must be some way to get that – Priyanka.k Mar 14 '19 at 09:23
  • Check out this [article](https://stackoverflow.com/questions/18601038/getting-the-current-url-in-an-android-browser)which looks similar to your question – Maneesh Mar 14 '19 at 10:37
  • Check out this [article](https://stackoverflow.com/questions/18601038/getting-the-current-url-in-an-android-browser) which looks similar to your question but no success I guess.Check out if it is helpful, but I am not sure it will be possible because if a user opens single browser then we can check maybe in worst case, every users different browsers and the structure or mechanisms of the browser differs from one browser to another. If you got any solution let me know if possible. – Maneesh Mar 14 '19 at 11:36