I know that I can use EXTRA_APPLICATION_ID
so as not to make chrome always open a new tab, but this has an undesired effect: it will open the URL in the last used tab, which I don't want to.
My intention is this: open the URL in a new tab only for the first time and then always use that tab, independently of whether the user has been navigating to other tabs.
Why I want this: Because I'm getting the copied to clipboard text and I want that text to be searched at a specific URL. So if the user is in some news website and copied a word he wants to be searched for, chrome will be opened at the same tab he was, which is undesired.
Is there a way to achieve this?
there's no way to do that (because never getting the index of the opened tab returned - and not being able to tell which tab one wants to remote; this does not work alike a Chrome extension).
but you could instead just use a WebView
- which would provide the desired effect - despite never leaving the app; or even a WebView
in an overlaid DialogFragment
, instead of a new Activity
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With