Sub GetDir(SubFolder As String) As String
Dim JO As JavaObject
JO.InitializeStatic("anywheresoftware.b4a.BA")
Dim PackName As String = JO.GetField("packageName")
Dim UsrName As String = GetSystemProperty("user.name", "")
UsrName = UsrName.Replace(" ","\ ")
Dim LibDir As String = "/Users/" & UsrName & "/Library/Containers/" & PackName &"/Data/Library/"
If Not(File.Exists(LibDir & SubFolder,"")) Then
File.MakeDir(LibDir,SubFolder)
End If
Return LibDir & SubFolder
End Sub