Skip to content

Let ShareDing accept web links from Android Open with #57

Open

Description

@juev

Problem

ShareDing accepts links from other apps via the Android Share menu (ACTION_SEND), but it is not registered to receive the web-link ACTION_VIEW intents used by “Open with”. A caller that offers only link opening cannot hand a URL to ShareDing through that path.

Proposal

Add a separate Android entry point for ACTION_VIEW on http and https, alongside the existing Share and Direct Share targets. Choosing ShareDing for a link should save the URL as a bookmark, as Share does today, not render the web page or turn ShareDing into a browser.

Take the URL from the intent's data URI, validate it and strip known tracking parameters via Urls.bookmark, then reuse AppContainer.queueLink. Save locally first, without a title, show the existing result message, and return to the caller. Do not open the Add Bookmark form, load the target page as part of the handoff, or request a change to the user's default browser. Existing bookmark sync (including short-link handling) is unchanged.

A matching ACTION_VIEW filter alone does not prove that a user can select ShareDing: Android's routing rules send generic web intents for unapproved domains to the default browser on Android 12 and later. Verify the actual selection flow on-device. If Android does not offer a usable selection path without changing the default browser, document that limitation before shipping; a package-targeted test alone is not evidence of chooser availability.

Release candidate and device verification

The owner requested merging and publishing an RC now. Verification of the system chooser and default-browser routing on Android 10 and a current Android version is deferred to the installable RC; the initial emulator instrumentation attempt stopped before assertions. ShareDing 0.5.0-rc.1 is published with the implementation from #58. Keep this issue open to record device results.

Acceptance

  • From another Android app that uses the system's app selection for a web link, selecting ShareDing passes the URL to the save flow. Verify HTTP and HTTPS, and record the observed selection behavior on Android 10 and a current supported Android version (including what happens on an ordinary tap with another browser set as default).
  • Opening https://example.com/article?id=7&utm_source=test#section through ShareDing queues only https://example.com/article?id=7#section. It works offline and with no server configured, does not open the Add Bookmark form, and gives the same result feedback as Share. A repeat reports Already in queue without adding a second row.
  • An unsupported scheme, malformed URL, or missing data URI does not create a bookmark. The incoming intent does not read Share extras as a substitute for its data URI.
  • The existing single text/plain Share target and Direct Share behavior remain unchanged. Add Android intent regression tests covering the new entry point, validation, and queue behavior; add R35 and its verification scenario and test references to the spec, and document the user-visible entry point and any platform limitation in the README.

Code (main at e8c79a75e69378757e3ce31626a413f049f549d2)

  • app/src/main/AndroidManifest.xml:16 and :27 — the launcher and the existing text/plain Share entry point; neither declares ACTION_VIEW.
  • app/src/main/java/org/evsyukov/shareding/ShareActivity.kt:68 and :77 — Share parses its own intent and then calls the common queue path.
  • app/src/main/java/org/evsyukov/shareding/ShareDingApplication.kt:90 — queueLink saves locally and returns the common result message.
  • app/src/main/java/org/evsyukov/shareding/network/LinkdingApi.kt:45 and :51 — use Urls.bookmark on the full data URI; Urls.sharedText is for extracting a URL out of shared text.
  • app/src/androidTest/java/org/evsyukov/shareding/ShareIntentTest.kt:90 — existing assertion for exactly one Share target.
  • docs/specs/share-to-linkding.md:13 and :44 — R1 and R33 describe the existing Share and Direct Share behavior to preserve.

Activity

  1. added
    enhancement
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions