View action for non-standard file types

File Manager/Explorer for Android devices.

View action for non-standard file types

Postby tidosho » Tue Jul 16, 2013 4:30 pm

Hi there:

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).

<intent-filter>
<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="*" />
</intent-filter>

Regards,

Martin
tidosho
 
Posts: 1
Joined: Tue Jul 16, 2013 4:23 pm

Re: View action for non-standard file types

Postby support » Sun Oct 20, 2013 8:42 am

Yes, it's because KML is not our registry.
support
 
Posts: 996
Joined: Sun Apr 20, 2008 4:40 pm


Return to AndExplorer



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.