java - Offer foreground download to user with possible dialog -


i'm fighting usability design.

let's have application has 1 permission, android.permission.internet.

i want download image remote url (where cannot control server-side), download user can choose whether , download file.
displaying dialog process approval and/or choosing final destination.

i have considered these solutions:

  • downloadmanager using setdestinationinexternalpublicdir
    • two bugs, don't want add write_external_storage permission, , user cannot decide whether download or not
  • using intent.action_view launch browser
    • standalone display image user, not initiate download automatically
  • using intent.action_view , custom proxy script
    • server not mine, , don't want provide server-side proxy download forcing script
  • replacing http(s) ftp, , let user decide
    • does not work, images on server not available through ftp
  • providin compatibility download applications (such "download files", various "file managers", ...)

how achieve without expanding current permissions or depend on non-standard app?


linked github issue https://github.com/smarek/simple-dilbert/issues/1

your app downloads files , potentially writes them external storage. feel should requesting write_external_storage (which implies read_external_storage) permission, accurately represent app does.

then first solution works. need method of prompting user before making download call. or otherwise make active acceptance part of work flow.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -