简体   繁体   中英

Do all android devices have the folder “sdcard”?

I'm creating an application that saves a file inside /mnt/sdcard/.myapp

The folder "/mnt/sdcard" exists on Nexus 5 and G3, does it exist on all devices?

I'm creating an application that saves a file inside /mnt/sdcard/.myapp

Please use getExternalFilesDir() for a location unique for your app. Do not clutter up the user's external storage root.

The folder "/mnt/sdcard" exists on Nexus 5 and G3, does it exist on all devices?

Not necessarily. If you must work off of the root of external storage, please use Environment.getExternalStorageDirectory() to get it.

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