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
This got missed in ef90fd2dfdfdroid/fdroidclient!829
for f in `find app/src/ -type f -name \*.xml|xargs grep --no-filename -F '<org.fdroid.fdroid' | awk '{ print $1}' |sort -u`; do test -e app/src/*/java/`echo $f | sed -e 's,<,,' -e 's,\.,/,g'`.java || echo FAIL $f; done
This moves all logic for setting up the local fdroid repo to its own
IntentService. That makes it much easier to interact with since things can
just use the static helper method to request it to update, and it'll do the
right thing.
* Rename ids to something meaningful
* Remove inner layouts from constraint layout
* Use same text and button styles
* Make sure the background image doesn't overlap with the text
It seems that ARM emulators timeout even when just trying to run the
assumeTrue() tests via Espresso. There needs to be one test still enabled
in the file, otherwise, the run fails with:
org.fdroid.fdroid.MainActivityEspressoTest > initializationError[Nexus_One_API_19(AVD) - 4.4.2] FAILED
java.lang.Exception: No runnable methods
at org.junit.runners.BlockJUnit4ClassRunner.validateInstanceMethods(BlockJUnit4ClassRunner.java:191)
The two excluded URLs seem to always resolve to IPv6 addresses first, then
fail since there isn't IPv6 connectivity. Donno why, but only on old android
versions, so just skip them there.
This uses the new Storage Access Framework, which was required for
accessing files on the SD Card starting in android-19. But the API
was really limited until android-21, and not really complete until
android-23 or even android-26. So the levels of usability will vary a
lot based on how new the version of Android is.
ARM emulators are too slow to run these tests in a useful way. The
sad thing is that it would probably work if Android didn't put up the
ANR "Process system isn't responding" on boot each time. There seems
to be no way to increase the ANR timeout.