omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
13.6k stars 879 forks source link

Share Activity URL Parsing - Android #1860

Closed satindar closed 1 year ago

satindar commented 1 year ago

Sometimes the title and url for a page can be bunched in the same string we get in the share activity. As described in this PR: https://github.com/omnivore-app/omnivore/pull/1855

Background: When use Android app, for links shared from some apps, links are not pure url but with additional text such as article title. Example: "The Missing Semester of Your CS Education - https://new.ycombinator.com/item?id=34934216"

Solution: To improve user experience, instead of just returning parse error, it could be better to try to parse the urlStr first and check whether any valid url. So I add a check with regex before that, the code change is rather simple and understandable.

We should attempt to extract the url on device before sending the save request to the server.

jacksonh commented 1 year ago

Done.