I have been trying to transfer files via Bluetooth between two Samsung devices. The problem I am having is trying to write those transferred files to an external SD Card. I can’t do this. The files are always written to internal on device storage. The External SD Card does not seem to be seen as writable.
The first device runs Android 4.1.2, and shows storage as sdcard0 and extSdCard.
The second device runs Android 4.0.4, and shows storage as sdcard and extSdCard.
I am using the code below, which to me appears to be correct in all respects. Am I missing something, or have Android’s volume mounting points become problematic for accessing?
Below is the Manifest.
Any help or enlightenment would be greatly appreciated.
The first device runs Android 4.1.2, and shows storage as sdcard0 and extSdCard.
The second device runs Android 4.0.4, and shows storage as sdcard and extSdCard.
I am using the code below, which to me appears to be correct in all respects. Am I missing something, or have Android’s volume mounting points become problematic for accessing?
B4X:
If File.ExternalWritable Then
If File.IsDirectory(File.DirRootExternal, "FileTransferBT") = False Then
File.MakeDir(File.DirRootExternal, "FileTransferBT")
End If
astream.StreamFolder = File.DirRootExternal & "/FileTransferBT"
Else
If File.IsDirectory(File.DirDefaultExternal, "FileTransferBT") = False Then
File.MakeDir(File.DirDefaultExternal, "FileTransferBT")
End If
astream.StreamFolder = File.DirDefaultExternal & "/FileTransferBT"
End If
Below is the Manifest.
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
Any help or enlightenment would be greatly appreciated.
Last edited: