Android Question Path/File Info from My Files

xfernal

Member
Licensed User
Longtime User
I have added KML file association to my app in the manifest like:
AddActivityText(OpenKML,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.kml" />
<data android:mimeType="*/*" />
</intent-filter>
)
AddActivityText(OpenKML,
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:host="*" />
<data android:pathPattern=".*\\.*" />
<data android:mimeType="application/vnd.google-earth.kml+xml" />
</intent-filter>)

If I use My Files app (Android's built in file explorer) and click on a KML file, this works correctly and opens the OpenKML module within my app. How do I get the path/file that was clicked on so I can use in within OpenKML module?
 
Top