在Android 4.4的奇巧,写入文件到外部存储 [英] Writing File To External Storage in Android 4.4 kitkat

查看:137
本文介绍了在Android 4.4的奇巧,写入文件到外部存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好球员我想下载,并把一个文件公开文件夹中的移动站的SD卡,使得用户可以直接访问它。到Android 4.4之前,这很容易,但现在Android是不是让我创造的SD卡文件夹或文件。
请帮助....

Hello guys I want to download and put a file in public folder on the sdcard of the mobile so that the user can directly access it. Prior to android 4.4 it was easy but now android is not allowing me to create a folder or file on the sdcard. Please Help....

推荐答案

您只需要从您的活动通话getExternalFilesDirs(空),以获得绝对路径与您的应用程序内部/外部文件夹。

You just need to make a call getExternalFilesDirs(null) from your activity to get absolute paths to internal/external folders related to your application.

这篇关于在Android 4.4的奇巧,写入文件到外部存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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