Files
fdroidclient/app/src/androidTest
Hans-Christoph Steiner 402cbcc3c2 implement combined EXTRA_STREAM/EXTRA_TEXT Intents for createChooser()
An app can create an `ACTION_SEND Intent` to share a file and/or text
to another app.  This `Intent` can provide an `InputStream` to get the
actual file via `EXTRA_STREAM`.  This `Intent` can also include
`EXTRA_TEXT` to describe what the shared file is.  Apps like K-9Mail,
Gmail, Signal, etc. correctly handle this case and include both the
file itself and the related text in the draft message.

This is used in F-Droid to share apps.  The text is the
name/description of the app and the URL that points to the app's page
on f-droid.org.  The `EXTRA_STREAM` is the actual APK if available.
Having all together means that the user can choose to share a message
or the actual APK, depending on the receiving app.

Unfortunately, not all apps handle this well.  WhatsApp and Element
only attach the file and ignore the text.
https://github.com/vector-im/element-android/issues/3637
2021-07-06 23:24:51 +02:00
..