|
YAACC - UPNP Client and Server
|
Copies a single item's resource into the app's cache (not the user-visible Downloads folder - this copy only exists to be handed to another app, not for the user to keep) and hands it off to the system share sheet as a content:// URI via FileProvider, rather than just sharing the resource's own URI as text - an http(s) URL is often only reachable on the local network (this device's own embedded UPnP server, or another server on the same LAN), and a content:// URI isn't a shareable link at all, so the receiving app/person frequently can't actually resolve either as plain text.
More...


Public Member Functions | |
| ShareFileTask (Context context, Uri sourceUri, String title, String mimeType) | |
Protected Member Functions | |
| File | doInBackground (Void... voids) |
| void | onPostExecute (File file) |
Copies a single item's resource into the app's cache (not the user-visible Downloads folder - this copy only exists to be handed to another app, not for the user to keep) and hands it off to the system share sheet as a content:// URI via FileProvider, rather than just sharing the resource's own URI as text - an http(s) URL is often only reachable on the local network (this device's own embedded UPnP server, or another server on the same LAN), and a content:// URI isn't a shareable link at all, so the receiving app/person frequently can't actually resolve either as plain text.
sourceUri may be http(s):// (fetched via a plain connection, same as de.yaacc.util.FileDownloader) or a local content:///file:// URI (read via the android.content.ContentResolver, same as de.yaacc.imageviewer.ImageFragment's non-http branch) - callers don't need to know which.