注册文件类型的应用程序无法正常工作 [英] Register file type for app does not work correctly
本文介绍了注册文件类型的应用程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用下面的意图过滤器对我的应用程序。
I am using the following intent filter for my app.
<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:mimeType="*/*" />
<data android:pathPattern=".*\\.etxt" />
</intent-filter>
不过,出乎我的意料,应用程序现在想打开其他类型的太像APK文件。什么是我的错?
But to my surprise, the app now wants to open other types too, like apk files. What is my mistake?
推荐答案
我想我找到了解决办法。至少,现在适用于Dropbox的。
I think I found a solution. At least, it works for Dropbox now.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file"/>
<data android:host="*"/>
<data android:mimeType="application/*"/>
<data android:pathPattern=".*\\.etxt" />
</intent-filter>
这篇关于注册文件类型的应用程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文