从Android应用程序访问SD卡上的文件 [英] Access the SD card files from Android application
本文介绍了从Android应用程序访问SD卡上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下要求
1>当用户点击该按钮时,SD卡应该是用户可访问的
1> When the user clicks on the button , the SD card should be accessible to the user.
2>用户点击一个特定的图像和放大器;我需要保存选择的图像
2> The user clicks on a specific image & I need to save the SD card path of the image selected
3>我需要显示该用户的Android应用程序中之前调整图像大小
3> I need to resize the image before displaying that to the user within the Android application
请给我从哪里可以得到样品code为同任何博客/文章链接。 先谢谢了。
Kindly provide me any blog/article link from where I can get the sample code for the same. Thanks in advance.
亲切问候,
CB
推荐答案
您可以使用标准的文件API来访问/ SD卡,或更安全的:
You can use standard file APIs to access "/sdcard", or more safely:
Environment.getExternalStorageDirectory()
此外,您还可以轻松地使用缩放图像
Also, you can scale images easily using
Bitmap.createScaledBitmap()
这篇关于从Android应用程序访问SD卡上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文