在 Android 中接收来自图库或可浏览文件管理器的视频意图

Receive video intent from gallery or browsable file manager in Android

我尝试了几乎所有方法来接收来自另一个应用程序的视频意图,但不知何故这对我来说是不可能的。 这是我的活动意图过滤器:

<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="rtsp" />
</intent-filter>
<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="video/*" />
    <data android:mimeType="application/sdp" />
    <data android:scheme="*" />
</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="http" />
    <data android:mimeType="video/*" />
    </intent-filter>
<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <action android:name="android.intent.action.PICK" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:mimeType="video/*" />
    <data android:scheme="*" />
</intent-filter>

对于没有收到意图的每个人来说,here 是一个具有工作意图过滤器的清单。