Q:

How to find the file passed to a Delphi app on Android?

We must write an Android app who knows how to open .xyz files.
However when we assign the .xyz files to our application, and after that we tap on an .xyz file in the Android's File Explorer, the application is properly started but the program doesn't see the file name as a parameter.
The code 
  ShowMessage(ParamStr(0)); //for debug...
  ShowMessage(ParamStr(1));

Instead of showing in message boxes the application's full path and after this the full path of the tapped (clicked) file name it shows two empty strings.
How can we get the full path of the tapped (clicked) file?
UPDATE: 
(A part of) The manifest looks like this:
    <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
            android:label="MMBook"
            android:configChanges="orientation|keyboardHidden">
        <!-- Tell NativeActivity the name of our .so -->
        <meta-data android:name="android.app.lib_name"
            android:value="MMBook" />
        <intent-filter>  
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter> 
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="file"  android:host="*" android:pathPattern=".*\\.mma" android:mimeType="*/*"  />
        </intent-filter>
    </activity>

A:

You need to call SharedActivity.getIntent() to check if your app was started by an Intent or not.  If a non-nil Intent is returned, you can retrieve its data (ie, the filename) and act accordingly.  See my answer to the following question for an example:
Handling Custom URI in Delphi XE5 Android App
https://stackoverflow.com/a/20465775/65863

