开发者

Access the SD card files from Android application

开发者 https://www.devze.com 2023-02-05 10:06 出处:网络
I have the following requirements: When the user clicks on the button , the SD card should be accessible to the user.

I have the following requirements:

  1. When the user clicks on the button , the SD card should be accessible to the user.

  2. The user clicks on a specific image & I need to save the SD card path of the image selected

  3. I need to resize the image before displaying that to the user within the Android application

Kindly provide me any blog/article link from where I can 开发者_如何学JAVAget the sample code for the same. Thanks in advance.


You can use standard file APIs to access "/sdcard", or more safely:

Environment.getExternalStorageDirectory() 

Also, you can scale images easily using

Bitmap.createScaledBitmap()
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号