I have an app that could view different kinds of video files using intent filters from different sources. To allow the app to appears always as choice when I try to open whatever video file, I have placed this code in the manifest
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<action android:name="android.intent.action.PICK"/>
<data android:mimeType="video/*" />
</intent-filter>
So I can receive the Uri in the app handling It in the main activity.
Although everything seems working as supposed, every time that I try to edit the manifest Android Studio marks all intent filter code with a red underline reporting the error missing url
.
The error disappears If I remove <data android:mimeType="video/*" />
but If I do this the app appears as choice not only for video files.
Prompt missing url not because
action.PICK
, the error related toaction.VIEW
for
action.VIEW
,you could define a different intent-filter.@AndreaF I have tha same issue. You can just suppress this warning.
To suppress try this:
add xmlns:tools="http://schemas.android.com/tools" to your initial manifest tag if it's not already there.