Android Question SQLite over microSD card

Diego Marcelo Croatto

Licensed User
Hi... Im trying to register a lot of data into a SQLite Table but into a microSD memory. Every works Ok but in the root internal memory.
I try to search in the forums and is sugested the "ExternalStorage Class" and there isn't a clearly example to open a SQLite Database.
I use with sucess the "ExternalStorage" class to copy files from USB pendrive to internal memory but the question is:

If possible open a file for input/output for a database file?

Since the description of the Class indicates OpenInputStream (for input) and OpenOutputStream (for output) and not Input/Output at the same time.

Please a little help or orientation.... Thank's a Lot. 😉


Licensed User
I can be wrong but i don´t think this is possible.
Upvote 0

RB Smissaert

Well-Known Member
Licensed User
I can be wrong but i don´t think this is possible.

It is possible, but have only used this on my particular device a Samsung S10.

This is how I get the application folder (on the SD). This is in the starter module:

Private rp As RuntimePermissions
Public Sub GetSDAppFolder As String

'get the application folder on the SD
'this will need to be altered as it currently is
'mainly applicable to my particular device (Samsung S10)
Dim i As Int
Dim strDir As String
 Dim strDir2 As String
 For Each strDir As String In rp.GetAllSafeDirsExternal("")
If strDir.Length > 0 Then
i = i + 1
Log("GetSDAppFolder, strDir(" & i & "): " & strDir)
If i = 2 Then
strDir2 = strDir
End If
End If

Return strDir2

End Sub

Upvote 0