如何更改浏览器的默认下载文件夹?
我正在使用此代码从 Uri 下载歌曲。
String url = "url of song that will download";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
Download.this.startActivity(intent);
Download.this.finish();
Toast.makeText(Download.this,
"The file you are downloading will be saved in your SD Card downloads folder.",
Toast.LENGTH_LONG).show();
默认情况下,我的歌曲保存在 SDCards/Downloads 文件夹中。我想将我的歌曲保存在 SDCards/Device 文件夹中。
请建议我,如何以编程方式更改浏览器的下载路径。
提前致谢。
I am using this code to download songs from a Uri.
String url = "url of song that will download";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
Download.this.startActivity(intent);
Download.this.finish();
Toast.makeText(Download.this,
"The file you are downloading will be saved in your SD Card downloads folder.",
Toast.LENGTH_LONG).show();
By default my songs saved in SDCards/Downloads folder.i want to save my songs in SDCards/Device folder.
Kindly suggest me, how can i change the downloading path of browser programmatically.
Thanks in Advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,您无法通过代码更改浏览器设置。对不起。
As far as I'm aware, you cannot change browser settings by code. Sorry.