user631854
user631854

Reputation:

Copy a file and paste it to the desired location

I want to copy a file from say /mnt/sdcard/Pictures and paste to the location /mnt/sdcard/Pictures/myselection.. how to code it??

Upvotes: 0

Views: 1050

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006604

Use Java I/O. Do not hardcode /mnt/sdcard as a path, as that is invalid on some Android devices. Use Environment.getExternalStorageDirectory().

Upvotes: 1

Related Questions