kuesji / link_eye

choose app before opening links in android
MIT License
39 stars 5 forks source link

Exclude shared webpage's title #11

Open klaurence opened 2 years ago

klaurence commented 2 years ago

Currently, when the active tab of a browser (both Chrome and Firefox, from my testing) is shared to link eye, the app receives and shows them in this format:

(webpage title)
(webpage link)

This format prevents link eye from detecting the shared link and consequently from showing target apps for that link. These are prevented no matter if a title is shared or not. This doesn't work:

(empty line -- title wasn't shared)
(webpage link)

but this does:

(webpage link)

While trimming empty lines is a possible solution, it only works when no webpage title was shared.

kuesji commented 1 year ago

android's share action have two data name EXTRA_TITLE and EXTRA_TEXT. some apps put link into EXTRA_TITLE while most of other puts into EXTRA_TEXT. so, i included both of them to cover more large area but it comes expense with extra user interaction which needed by cleaning shared text before opening.

i will change this behaviour and only parse EXTRA_TEXT starting by next update. this will fix this issue too.

nihal697 commented 1 year ago

Would there be a major disadvantage due to this change?

kuesji commented 1 year ago

correct way to share things is put data in EXTRA_TEXT area. so, it's senders responsibility to correctly implement sharing.

klaurence commented 1 year ago

Would a compromise be possible, for example by parsing EXTRA_TEXT first and if it is empty, consequently parsing EXTRA_TITLE?

Unfortunately, the inconsistency between shared links might only serve to inconvenience link eye users. A compromise like this can ensure both larger coverage and better convenience for users.