<commit_before>﻿using System;
using Android.App;
using Android.Widget;
using Android.OS;
using Org.Videolan.Libvlc;

namespace VlcXamarin.Sample
{
    [Activity (Label = "VlcXamarin.Sample", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : Activity
    {
        int count = 1;
        LibVLC mLibVLC = null;

        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
            Button button = FindViewById<Button> (Resource.Id.myButton);
            
            button.Click += delegate {
                button.Text = string.Format ("{0} clicks!", count++);
                if(mLibVLC == null)
                    mLibVLC = new LibVLC();
                mLibVLC.PlayMRL("http://www.montemagno.com/sample.mp3");
            };
        }
    }
}

<commit_msg>Updated sample with working code<commit_after>﻿using System;
using Android.App;
using Android.Widget;
using Android.OS;
using Org.Videolan.Libvlc;

namespace VlcXamarin.Sample
{
    [Activity (Label = "VlcXamarin.Sample", MainLauncher = true, Icon = "@drawable/icon")]
    public class MainActivity : Activity
    {
        int count = 1;
        LibVLC mLibVLC = null;

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

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

            if(mLibVLC == null)
            {
                mLibVLC = new LibVLC();
                mLibVLC.Init(this);
            }

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button> (Resource.Id.myButton);
            
            button.Click += delegate {
                button.Text = string.Format ("{0} clicks!", count++);
                mLibVLC.PlayMRL("http://www.montemagno.com/sample.mp3");
            };
        }
    }
}


{'fraction_non_alphanumeric': 0.10506912442396313, 'fraction_numerical': 0.0027649769585253456, 'mean_word_length': 1.8049095607235142, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6253718', 'n_tokens_mistral': 619, 'n_tokens_neox': 604, 'n_words': 159}