应用程序未显示为文件资源管理器中的选项 - 意图过滤器无法正常工作

时间:2016-08-12 01:22:35

标签: android android-intent intentfilter

我在这里尝试了所有的建议而没有运气。如果用户点击三星“我的文件”应用程序等文件浏览器中的文本文件,我只是希望我的应用程序能够接收到意图。它只显示在可用应用列表中。

我的活动目前如此指定:

<activity
        android:name=".ImportActivity"
        android:label="@string/title_activity_import"
        android:parentActivityName=".MainActivity"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter android:label="import">
            <action android:name="android.intent.action.VIEW" />
            <action android:name="android.intent.action.PICK" />
            <action android:name="android.intent.action.PICK_ACTIVITY" />
            <action android:name="android.intent.action.GET_CONTENT" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/plain" />
            <data android:scheme="file" android:host="*" android:pathPattern=".*\\.txt" />
            <data android:scheme="content" android:host="*" android:pathPattern=".*\\.txt" />
        </intent-filter>
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.hubbardsoftware.racetac.MainActivity" />
    </activity>

我在我的下载文件夹中放了一个'test.txt'文件,里面只有一行文字。使用“我的文件”导航到它,点击它,然后选择使用“HTML Viewer”,“Chrome”和“Hancom Office 2014”打开。我的应用程序被称为'RaceTac',它只是没有出现。该应用程序正常工作。我也尝试过更简单的过滤器版本。我知道它正盯着我看。

谢谢, 戴夫

1 个答案:

答案 0 :(得分:0)

我正在应用程序中打开 pdf 我正在为应用选择器中的“打开方式”选项获取我的应用,但是当我尝试“发送文件”选项时,我无法在选择器中获取我的应用 任何人都知道哪个动作观察“发送文件”选项的这个动作?

我的意图过滤器看起来像这样

:abd: 5768:92034 :erg: 94856023MXCI :oute: A RF WERS YUT :oowpo: 649217349GBT GB