我想在我的应用程序中打开一个自定义扩展名为.ccf的文件
并阅读文件的内容。这是一个简单的文本文件没有别的,但我正在更改扩展名,因为我只想我的应用程序阅读它。
我正在使用以下intent-filter
打开该文件。但我不知道如何阅读内容。
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="http" android:host="*" android:pathPattern=".*\\.ccf" />
<data android:scheme="https" android:host="*" android:pathPattern=".*\\.ccf" />
<data android:scheme="content" android:host="*" android:pathPattern=".*\\.ccf" />
<data android:scheme="file" android:host="*" android:pathPattern=".*\\.ccf" />
</intent-filter>
就像在Adobe Reader中打开.PDF文件一样。 需要帮助。