Android DownloadManager “Impossible to open file”

后端 未结 2 518
陌清茗
陌清茗 2021-02-09 22:43

I\'m using DownloadManager to download a file from a webService. The download end successfuly, but when I try to open the new file in the \"download\" folder I\'ve got this erro

2条回答
  •  情深已故
    2021-02-09 23:37

    Okay I found the problem !

    I had to specify the "MIME content type" of the file using setMimeType().

    public DownloadManager.Request setMimeType (String mimeType);
    

提交回复
热议问题