Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Datafiletype(自定义)无法打开im我的应用程序_Android_Android Manifest_File Type - Fatal编程技术网

Android Datafiletype(自定义)无法打开im我的应用程序

Android Datafiletype(自定义)无法打开im我的应用程序,android,android-manifest,file-type,Android,Android Manifest,File Type,我已经创建了自己的文件类型(.mmd)。 此文件类型我已在名为openMeasurement的子活动中保存了一些数据,并希望在我的应用程序中选择此类型的文件以将其打开时保存这些数据 我的清单已被修改,因此该活动具有以下属性,这些属性是我从另一个线程获得的。但这似乎还不够 <activity android:name="OpenMeasurement"> <intent-filter> <action android:name=

我已经创建了自己的文件类型(.mmd)。 此文件类型我已在名为openMeasurement的子活动中保存了一些数据,并希望在我的应用程序中选择此类型的文件以将其打开时保存这些数据

我的清单已被修改,因此该活动具有以下属性,这些属性是我从另一个线程获得的。但这似乎还不够

<activity android:name="OpenMeasurement">
        <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="http" android:host="*"
                android:pathPattern=".*\\.mmd" />
            <data android:scheme="https" android:host="*"
                android:pathPattern=".*\\.mmd" />
            <data android:scheme="content" android:host="*"
                android:pathPattern=".*\\.mmd" />
            <data android:scheme="file" android:host="*"
                android:pathPattern=".*\\.mmd" />
        </intent-filter>
    </activity>

我做错了什么\忘记了任何可以帮助我的人? -先谢谢你

编辑1:
可能是因为我只是在调试我的真实手机,因此没有安装和获得所有的具体要求,真的不应该是这样的,如果你这样认为的话,我想对它发表一些评论。 ------Edit3---它似乎在手机上注册了“openfiletype”,即使在“调试模式”下也是如此,因为我可以将其注册为.pdf文件

编辑2: 好吧,我试着把它分开,删除了HTTP方案,因为我认为它们是不必要的。 现在代码如下所示:

    <activity android:name="OpenMeasurement">
        <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="content" />
            <data android:host="*" />
            <data android:pathPattern=".*\\.mmd" />
        </intent-filter>
        <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:host="*" />
            <data android:pathPattern=".*\\.mmd" />
        </intent-filter>
    </activity>

当我选择我的文件(使用“我的文件”)时,它仍然没有打开,也没有给出选择

也尝试过在pathpattern中使用双转义(“.\\\.mmd”)也没有帮助

编辑4: 还试图添加:

<data android:mimetype="*/*"/>


但是仍然没有乐趣:“-(

在一般情况下,这是不可行的,因为意图机制正在处理MIME类型,并且您只能使用预定义的MIME类型

因此:您不能让它在本地文件资源管理器(如ASTRO)中工作,因为它可能使用内置MimeTypeMap在-ie中描述的方式工作


但是,如果文件在web上,由于可以拦截web浏览器URL打开机制,如

中所述,如果您使用双重解决方法,这实际上是可能的。您只需对交叉线进行双重散列,它应该允许您使用该文件类型,但前提是它是mark 40类型angelo,并且您始终可以升级公共mark 35,只需简单下载。

谢谢,虽然很烦人,但我希望android能让我们在某个时候制作自己的模版,这是imho真正需要的功能。