简体   繁体   中英

Access the SD card files from Android application

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 get 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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM