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 androidathPattern=".*\\.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 androidathPattern=".*\\.*" />
<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?
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 androidathPattern=".*\\.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 androidathPattern=".*\\.*" />
<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?