You can use the IniFiles
unit. I have used it on android, windows and linux and it seems to work fine. For the file path on android you would use something like:
System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini'
Code example on saving ini on adnroid:
procedure SaveSettingString(Section, Name, Value: string);
var
ini: TIniFile;
begin
ini := TIniFile.Create(System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini');
try
ini.WriteString(Section, Name, Value);
finally
ini.Free;
end;
end;
Example on loading a string:
function LoadSettingString(Section, Name, Value: string): string;
var
ini: TIniFile;
begin
ini := TIniFile.Create(System.IOUtils.TPath.GetDocumentsPath + System.SysUtils.PathDelim + 'config.ini');
try
Result := ini.ReadString(Section, Name, Value);
finally
ini.Free;
end;
end;
When loading what ever you set as the value will be returned if that Name/Key does not exist.