Android中的自定义文件类型无效

Mar*_*kus 5 android file-type android-manifest

我正在编写一个Android应用程序,它应该打开带有结尾.meetme的文件

实际上它应该直接从Gmail打开它们,但我不认为这是可能的.

这是我的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>
Run Code Online (Sandbox Code Playgroud)

我已经尝试了很多变化,如果我在Astro中打开文件,长时间点击并打开文本,我的应用程序显示并可以正常打开它.将不胜感激任何帮助.

马库斯

Hol*_*Hog 5

经过大量的反复试验并阅读了我能找到的几乎所有内容,以下是最终对我有用的内容:

    <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>
Run Code Online (Sandbox Code Playgroud)