Android Question Some me file handling questions

mjtaryan

Active Member
Licensed User
Longtime User
Where in the b4a documentation can I find answers to the following related questions (so that I can it in an app).

1. How do I determine if a truly external (user supplied) SD card is present?
2. How do I determine how much storage space is available both on the internal storage and the external SD card?
3. How do I determine how much space my installed app and its data require (both separately and together)?

A related issue is this: I've been having problems in setting up the path to an external folder and its files. The issue arises when the test app runs on devices that use Android Gingerbread or earlier. If I use the following path with IceCreamSandwhich or JellyBean it works fine: "/storage/extSdCard/somedir..." but doesn't work on my devices that use Gingerbread. On the other hand, "/mnt/extSdCard/somedir..." or "/mnt/SDCard/somedir..." work on the Gingerbread divices but not with ICS or JB. So...

4. How do I determine which Android version is in use?

Thanks.
 

NJDude

Expert
Licensed User
Longtime User
To answer question #1, I suggest you read THIS thread, as you will see, there's really no effective way to detect an external SD card.

And the answer to #4, check the Phone library documentation, specifically THIS part.
 
Last edited:
Upvote 0

mjtaryan

Active Member
Licensed User
Longtime User
To answer question #1, I suggest you read THIS thread, as you will see, there's really no effective way to detect an external SD card.

And the answer to #4, check the Phone library documentation, specifically THIS part.

Thanks, NJ. The links will be helpful and are a start.
 
Upvote 0
Top