Add "Install with F-Droid" to website page for each app.
The button should take them to a URL such as https://f-droid.org/download/com.example.app. This page will always display the same thing: Display easy instructions for installing F-Droid on a phone.
The F-Droid client will then register an intent-filter for https://f-droid.org/download/*. When it receives this intent, it will
- Do the same thing as pressing the install button in the AppDetails view would do.
- If the app is already installed, it should provide an appropriate message then do nothing.
- If the app can be upgraded, it should ask the user if this is what they want to do, then proceed to do the same thing as pressing the upgrade button would have done.
One thing I'm unsure of: if it can be upgraded, but they currently have the latest suggested version, then should it warn them that they are upgrading to a "non-stable" version?
Another thing: the https://f-droid.org/download/... web page should also show instructions for if the user has F-Droid installed, but the page didn't redirect there (e.g. they didn't click "open with f-droid").