I'm using Delphi Berlin 10.1. I could not use OpenDialog, it just does not open inside Android.
I searched the root of the android that stays in / storage / emulated / 0 / where I should find a .txt file The same procedure for Desktop Win32 is ok.
I was able to get the file.
procedure TF_form1.FileSearch(PathName, FileName: string; const InDir: boolean);
var
Rec: TSearchRec;
path: string;
LItem: TListViewItem;
begin
path := IncludeTrailingBackslash(PathName);
if FindFirst(path + FileName, faAnyFile - faDirectory, Rec) = 0 then
repeat
LItem := ListView.Items.Add;
LItem.Text := path + Rec.Name;
until FindNext(Rec) <> 0;
If not InDir then
begin
TabControl.TabIndex := 0;
exit;
end;
if FindFirst(path + '*.*', faDirectory, Rec) = 0 then
repeat
if ((Rec.Attr and faDirectory) <> 0) and (Rec.Name <> '.') and (Rec.Name <> '..') then
FileSearch(path + Rec.Name, FileName, true);
until FindNext(Rec) <> 0;
end;
But I have not been able to use OpenDialog yet. If you have something similar, let me know.