• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How to get URL from a browser(Chrome, Firefox…) while sharing highlighted text on react native app?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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, If any user highlighted any text from any website in a browser I want that website URL also, how can I achieve this I have tried many ways but failed, please suggest any solution.
 
Saloon Keeper
Posts: 5478
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure I'm understanding correctly - are you saying that the app is supposed to be monitoring all browser activity for text that the user is highlighting? That sounds nefarious - please elaborate what the use case is.

If you merely want the user to be able to use your app to act on highlighted text, you can implement it using custom text processing actions: https://medium.com/androiddevelopers/custom-text-selection-actions-with-action-process-text-191f792d2999
 
Priyanka Vb
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean if any user highlighted any text from any website in a browser I want that website URL also.
 
Tim Moores
Saloon Keeper
Posts: 5478
143
Android Firefox Browser Mac OS X Safari Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, that doesn't describe the use case (which is the WHY of what you intend to do), but it does confirm that I understood correctly. That sounds creepy - would the user know that your app intends to collect this information? TellTheDetails about the use case.

Since you didn't mention the custom text processing idea I mentioned, may we assume that you looked at it, and concluded that it does not meet your needs?
 
Always! Wait. Never. Shut up. Look at this tiny ad.
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!