提供下载的前景与可能的用户对话 [英] Offer foreground download to user with possible dialog

查看:157
本文介绍了提供下载的前景与可能的用户对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和可用性设计的战斗。

I'm fighting with usability design.

让我们的应用程序,只有一个许可, android.permission.INTERNET对

Let's have application which has only one permission, android.permission.INTERNET.

我想从远程URL(在这里我无法控制服务器端)下载图像,但是下载它,以便用户可以选择是否以及在何处下载该文件。结果
显示对话框过程的批准和/或选择的最终目的地。

I want to download image from remote URL (where I cannot control server-side), but download it so user can choose whether and where download that file.
Displaying dialog for process approval and/or choosing final destination.

我已经考虑这些解决方案:

I have considered these solutions:


  • 使用下载管理器 setDestinationInExternalPublicDir

    • 的两个问题,我不希望添加 WRITE_EXTERNAL_STORAG​​E 权限,用户无法决定是否要下载或不

    • DownloadManager using setDestinationInExternalPublicDir
      • Two bugs, I don't want to add WRITE_EXTERNAL_STORAGE permission, and user cannot decide whether to download or not

      • 独立显示图像的用户,但不能自动启动下载


      • 服务器不是我的,我不希望我提供服务器端代理下载迫使脚本​​


      • 不行的,因为该服务器上的图像无法通过FTP

      如何实现这一不扩大当前的权限或依赖于非标准应用程序?

      与此相关的问题GitHub的 https://github.com/smarek/Simple-Dilbert /问题/ 1

      Linked to this github issue https://github.com/smarek/Simple-Dilbert/issues/1

      推荐答案

      您应用软件下载的文件,并可能将其写入外部存储。我觉得你应该要求 WRITE_EXTERNAL_STORAG​​E(这也意味着READ_EXTERNAL_STORAG​​E)许可,准确地重新present它是什么,你的应用程序一样。

      Your App downloads files and potentially writes them to the external storage. I feel you should be requesting the WRITE_EXTERNAL_STORAGE (which implies also READ_EXTERNAL_STORAGE) permission, to accurately represent what it is your App does.

      那么你的第一个解决方案的工作。你只需要制作下载呼叫前提示用户的任何方法。或以其他方式使您的工作流的主动接受的部分。

      Then your first solution works. You just need any method of prompting the user before making the download call. Or otherwise make active acceptance part of your work flow.

      这篇关于提供下载的前景与可能的用户对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆