自定义文件类型的机器人不工作自定义、人不、文件类型、机器

由网友(言汐)分享简介:我目前正在写一个Android应用程序,它应该打开的文件,并结束.meetme I'm currently writing an Android App and it should open Files with the ending .meetme其实应该从Gmail中直接打开他们,但我不认为这是可能的。Act...

我目前正在写一个Android应用程序,它应该打开的文件,并结束.meetme

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

其实应该从Gmail中直接打开他们,但我不认为这是可能的。

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

这是我的Andr​​oidManifest.xml中的code:

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.

马库斯

推荐答案

大量的试验和错误,并读取几乎所有我能找到后,这里就是终于为我工作:

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>
阅读全文

相关推荐

最新文章