0

I know there are a lot of questions out there like mine, however, I could not get this to work as expected. All I want to do is to associate a he txt extension with my app.

The following code taken from here Android intent filter for a particular file extension? doesn't work for me

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.DeviceDefault" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />

            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />

            <data android:scheme="file" />
            <data android:mimeType="*/*" />
            <data android:pathPattern=".*\\.txt" />
            <data android:host="*" />
        </intent-filter>
    </activity>
</application>
Community
  • 1
  • 1
Display name
  • 2,697
  • 2
  • 31
  • 49
  • 1
    Install Intent Intercept app from Market and see if your filter matches intent you think of. App: https://play.google.com/store/apps/details?id=uk.co.ashtonbrsc.android.intentintercept – Marcin Orlowski Sep 07 '12 at 15:50
  • What do you mean by "does not work for me". Which kind of Intent is sent by the app with which you try to trigger your application? Maybe it uses another kind of action than in your intent filter? – Claas Wilke Sep 07 '12 at 19:15
  • @ClaasWilke I tried with several explorer applications such as SolidExplorer, LindaManager and AndExplorer. As far as I can see they all use the View action which I included in my intent filter – Display name Sep 10 '12 at 10:19

0 Answers0