Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between isExternalStorageRemovable and isExternalStorageEmulated

Tags:

android

Environment.isExternalStorageRemovable() was added in API 9

And Environment.isExternalStorageEmulated() was added in API 11

isExternalStorageRemovable returns true when getExternalStorageDirectory's path is removable or not, more like a SD Card and if it return false, its internal storage and can never be removed physically.

And isExternalStorageEmulated is just do opposite of isExternalStorageRemovable ?

Now, my question is whats the difference ? Is it just different name with opposite output ?

like image 489
xmen Avatar asked Feb 05 '14 15:02

xmen


1 Answers

isExternalStorageEmulated() == true means that there is no real SD card and it is just emulated (Nexus 5 for example). if the external storage isn't emulated isExternalStorageEmulated() == false then it can either be removable or not that is why we have isExternalStorageRemovable()

like image 120
Hannoun Yassir Avatar answered Oct 03 '22 19:10

Hannoun Yassir