You can create a SQlite DB with DBUtils, with a Table that saves preferences:
ID,User,Password,etc...
On startup, Query the table and if it's not present,create the table, query the fields, and fill the table
You can show a settings panel to enter/modify the table fields
Code to save settings to a file in text, very basic but at the moment is fine for testing.
scrittura
B4X:
Sub WriteSetting()
Dim s,FileName As String
s = emailaddress & "|" & password & "|" & nik
FileName = "b4iosSetting"
If File.Exists(File.DirAssets, FileName) = False Then
File.WriteString(File.DirAssets, FileName,s)
Else
File.WriteString(File.DirAssets,FileName,s)
End If
End Sub
Lettura
B4X:
Sub ReadSetting As Boolean
Dim s,FileName As String
FileName = "b4iosSetting"
If File.Exists(File.DirAssets, FileName) = True Then
s = File.ReadString(File.DirAssets, FileName)
Dim value() As String
value = Regex.Split("\|",s)
emailaddress = value(0)
password = value(1)
nik = value(2)
Return True
Else
Return False
End If
End Sub