File Manager/Explorer for Android devices.
2 posts • Page 1 of 1
I have written an app that handles ACTION_VIEW intents for KML files, based on path patterns (see below) but clicking on a KML file just raises an error dialog (Error - cannot open file). Is this because you look up the MIME type to create an ACTION_VIEW intent? And don't have KML in your registry? Or is there something wrong with my Intent filter?
You can use the PackageManager to check whether any Activities can handle a simple URI-based intent, so as to avoid crashes (and circularities, i.e. AndExplorer calling itself).
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:pathPattern=".*\\.kml" />
<data android:host="*" />