Forum Xamarin.Forms

IntentFilter created with empty in AndroidManifest.xml

BruceWilkinsBruceWilkins USMember
edited March 2016 in Xamarin.Forms

When using an IntentFilter to allow my app to handle videos, the rendered AndroidManifest file contains empty elements for each of the values provided for DataSchemes and DataMimeTypes.

Is this a bug or is there something incorrect in the IntentFilter?

[Activity(... etc ...)] [IntentFilter( new[] { Intent.ActionView }, Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable }, DataHost = "*", DataSchemes = new string[] { "http", "https", "content", "file" }, DataMimeTypes = new string[] { "application/octet-stream", "video/mpeg4", "video/mp4", "video/3gp", "video/3gpp", "video/3gpp2", "video/webm", "video/avi", "application/sdp", "*/*", } )] public class MainActivity : FormsApplicationActivity {...}

AndroidManifest.xml renders intent-filter as:

<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:host="*" /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> <data /> </intent-filter>

Using Xamarin.Forms v2.1.0.6529.

Can anyone recommend a fix or workaround, perhaps by manually adding to template AndroidManifest.xml?

Best Answer

Answers

Sign In or Register to comment.