Reputation: 4845
I am working project that require to get the URL when user share a selected text from the Chrome browser.
I was able to get the text by using ACTION_PROCESS_TEXT
but how do I get the URL? so that I know where the text copied from.
Is it even possible?
Upvotes: 0
Views: 280
Reputation: 1007359
how do I get the URL?
You don't. If the user chooses "Share" in Chrome, and you have an activity with an <intent-filter>
for ACTION_SEND
and text/plain
, your app should appear in the share sheet and, if the user chooses your app, your activity can get the text. However, that is a separate user action than the one for sharing text with your app with ACTION_PROCESS_TEXT
.
Upvotes: 1