我想用我的应用程序打开一个文件。添加了这个意图过滤器,但是文件管理器没有在我的应用程序中列出。该文件是一个自定义文本文件,类型为。tdr。我做错了什么?
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:mimeType="file/*"/>
</intent-filter>
也试过mime类型">/"我有多个意图过滤器,这是其中之一。
font =宋体;我说我必须使用android.intent.action.VIEW
this now works:
<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="*/*"
android:scheme="file"/>
</intent-filter>