Neo-Store icon indicating copy to clipboard operation
Neo-Store copied to clipboard

Add support for fdroidrepo:// URLs

Open emersion opened this issue 2 years ago • 4 comments

fdroidrepo:// is supported by the official client to add a new HTTP repository (and fdroidrepos:// for HTTPS). This is handy because it allows a website to expose a button with a link which directly opens up the F-Droid store page to add a new repository with all of the info pre-filled.

emersion avatar Apr 10 '22 19:04 emersion

Added support for auto-import from clipboard. Adding support for repo auto-add is as good as impossible considering Android latest restrictions for apps opening specific links as default, this being restricted to specifying hosts (which makes the intent filter useless).

machiav3lli avatar Aug 06 '22 01:08 machiav3lli

Added support for auto-import from clipboard

Nice, thanks!

Adding support for repo auto-add is as good as impossible considering Android latest restrictions for apps opening specific links as default, this being restricted to specifying hosts

Hm, can you elaborate? This has been working fine for my own app with the latest Android version, and I can't find documentation about the restrictions you mention.

emersion avatar Aug 08 '22 07:08 emersion

@emersion I think "impossible" isn't hte right word here's the description of the restriction.

From Android developers' documentation:

Note: Starting in Android 12 (API level 31), a generic web intent resolves to an activity in your app only if your app is approved for the specific domain contained in that web intent. If your app isn't approved for the domain, the web intent resolves to the user's default browser app instead.

"… approved for the specific domain …" may mean here just being manually given the open as default for this link permission from App's settings. Maybe I went overboard with my assumption on how restricted are we in that concern, I'll recheck this for the next iteration.

machiav3lli avatar Aug 08 '22 08:08 machiav3lli

I think this only applies to HTTP schemes ("web intent"). By "approved" I think they mean provide proof that you own the domain name, to avoid having apps intercepting intents for a domain they don't own (see the next section: https://developer.android.com/training/app-links/verify-site-associations). But that shouldn't apply to custom schemes.

emersion avatar Aug 08 '22 08:08 emersion