Private Sub StartAStream (In As InputStream, out As OutputStream)
Log("StartAStream")
astream.InitializePrefix(In, True, out, "astream")
If File.IsDirectory("/mnt/extSdCard", "") = True Then ' SD Card on Galaxy Note 10.1 & Galaxy Phone
If File.IsDirectory("/mnt/extSdCard", "FileTransferBT") = False Then
File.MakeDir("/mnt/extSdCard", "FileTransferBT")
End If
astream.StreamFolder = "/mnt/extSdCard/FileTransferBT"
Else If File.IsDirectory("/mnt/sdcard0", "") = True Then ' On-board storage Galaxy Note 10.1
If File.IsDirectory("/mnt/sdcard0", "FileTransferBT") = False Then
File.MakeDir("/mnt/sdcard0", "FileTransferBT")
End If
astream.StreamFolder = "/mnt/sdcard0/FileTransferBT"
Else If File.IsDirectory("/mnt/sdcard", "") = True Then ' On-board storage Galaxy Phone
If File.IsDirectory("/mnt/sdcard", "FileTransferBT") = False Then
File.MakeDir("/mnt/sdcard", "FileTransferBT")
End If
astream.StreamFolder = "/mnt/sdcard/FileTransferBT"
Else
Msgbox("Storage space not available ...", "Unable to transfer")
End If
End Sub