Error with Android App play Video

Xavi22Xavi22 ESMember
edited April 2016 in Xamarin.Android

Hello,
I'm making an Android app in which I want to play a video hosted on a URL and run it I get the error attached in the image.

Attached also the code used to it:

using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Media;
namespace Rep_Video_1
{
[Activity (Label = "Rep_Video_1", MainLauncher = true, Icon = "@mipmap/icon")]
public class Activity1 : Activity
{

    protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

        // Set our view from the "main" layout resource
        SetContentView (Resource.Layout.Main);

        // Get our button from the layout resource,
        // and attach an event to it

        var videoView = FindViewById<VideoView> (Resource.Id.SampleVideoView);
        var uri = Android.Net.Uri.Parse ("http://46.105.140.18/ADAlcorcon/ALEVIN-A/20151031_1330_AleA_Arr.mp4");
        videoView.SetVideoURI (uri);
        videoView.Start (); 


    }
}

}

Thank you very much! It is a little urgent!

Sign In or Register to comment.