How to open files in Firemonkey regardless of MIME type

  

When Gmail’s attachments are present:

If the file is a txt file, a list of applications that can be opened is opened.
If it is an image file, a list of applications that can open photos, photos, galleries, etc. is opened.

Assuming you know the path to a file that exists in Android locally, how can I implement this so I can open it by clicking on it?

On Windows, I used ShellExcute() to implement this feature.

It seems to be one of the ways native apps handle MIME type handling and Intent handling:

Launch A URL Or Document On IOS and Android With Delphi Firemonkey

I can not use the _system() function in Delphi 10.1, like this example?

_system (PAnsiChar(‘open ‘ + AnsiString(sCommand)));

I changed it as follows, according to 10.1 documentation:

_system (MarshaledAString (‘open ‘ + sCommand));

When debugging, the method is executed, but there is no response.

Comments are closed.