Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom Filetype in Android not working

I'm currently writing an Android App and it should open Files with the ending .meetme

Actually it should open them directly from Gmail, but I don't think that is possible.

This is the Code of my AndroidManifest.xml:

<activity android:name=".MeetingRequest" android:label="Meeting Request">
    <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:host="*" />
        <data android:pathPattern=".*\\.meetme" />
    </intent-filter>
</activity>

I've tried quite a few variations, if I open the file in Astro wit h a long click and open as text, my app shows up and can open it normally. Would be grateful for any help.

Markus

like image 481
Markus Avatar asked Jan 12 '11 23:01

Markus


1 Answers

After a lot of trial and error and reading nearly everything I could find, here's what finally worked for me:

    <activity android:name=".DrawActivity"
              android:screenOrientation="portrait"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW"/>
            <action android:name="android.intent.action.EDIT"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:pathPattern="*.snowdragon"/>
            <data android:mimeType="text/snowdragon"/>
        </intent-filter>
    </activity>
like image 55
HolyHog Avatar answered Oct 19 '22 17:10

HolyHog