How do you check if an sd card or a usb thumb drive is mounted?

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

Can you show me the coding to check if an sd card or a usb thumb drive is mounted on a tablet and on a phone?

Can you show me how to check the remaining memory size on the sd card or thumb drive?

Thanks.
 

Caravelle

Active Member
Licensed User
Longtime User
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Hi,

Thanks for the useful link. :)

See this thread:

http://www.b4x.com/forum/basic4android-updates-questions/13013-free-space-removable-cards.html#post73426

If you call the phone library to tell you, for example, free space on all drives, it will tell you the free space on all installed drives. If the one you are looking for is NOT returned, that is because it is NOT found, so it is NOT mounted. If it is found you can get various details about it, which could well come in useful for the rest of your project.

Caravelle
 
Upvote 0
Top