External Directory

stevel05

Expert
Licensed User
Longtime User
I have an Android tablet which has a nand partition. B4a returns this as the DefaultExternal directory. My phone does not have a nand partition and the SD card is returned as the DefaultExternal directory.

I'm just wondering if anybody has come up with a 'best practise' for dealing with this?

There are several options:

Just install user data on the DefaultExternal directory. Which could then be either.

Always (try to) install to the SDCard so the installations are consistent across devices. Silently use the nand if SD card is not present/available.(Don't ask the user)

Ask the user to install to nand if SD card is not present/available.

Ask the user where to install if both are available.

I notice that some of the apps I have installed on the tablet are on the SD card, some are on the nand partition, so there doesn't seem to be a consistent approach from developers.

Steve
 

LittleEddie

Member
Licensed User
Longtime User
The believe the best practise is to use DirDefaultExternal and let the device handle it.

OR

Dim TargetDir As String
If File.ExternalWritable Then TargetDir = File.DirDefaultExternal Else TargetDir = File.DirInternal

Ed
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…