从Android应用程序访问SD卡上的文件应用程序、卡上、文件、Android

由网友(风都笑我痴颠)分享简介:我有以下要求1>当用户点击该按钮时,SD卡应该是用户可访问的1> When the user clicks on the button , the SD card should be accessible to the user.2>用户点击一个特定的图像和放大器;我需要保存选择的图像2> The user cli...

我有以下要求

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>我需要显示该用户的Andr​​oid应用程序中之前调整图像大小

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()
阅读全文

相关推荐

最新文章