<commit_before>﻿using System;

using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

using Symbol.XamarinEMDK;
using System.Xml;
using System.IO;
using Android.Content;
using Xamarin.Forms;

namespace BarcodeForms.Droid
{
    [Activity(Label = "BarcodeForms", Name = "com.pietromaggi.sample.barcodeForms.MainActivity", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity, EMDKManager.IEMDKListener

    {

        private EMDKManager mEmdkManager = null;
        private ProfileManager mProfileManager = null;
        private const String mProfileName = "Barcode_1";

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

            EMDKResults result = EMDKManager.GetEMDKManager(Application.Context, this);
            if (result.StatusCode != EMDKResults.STATUS_CODE.Success)
            {
                Toast.MakeText(this, "Error opening the EMDK Manager", ToastLength.Long).Show();
            }
            else
            {
                Toast.MakeText(this, "EMDK Manager is available", ToastLength.Long).Show();
            }


			ScanReceiver _broadcastReceiver = new ScanReceiver();

			//EditText editText = FindViewById<EditText>(Resource.Id.editbox);

			global::Xamarin.Forms.Forms.Init(this, bundle);
			var my_application = new App ();
			_broadcastReceiver.scanDataReceived += (s, scanData) =>
			{
			//	editText.Text = scanData;
				//Toast.MakeText(this, scanData, ToastLength.Long).Show();
				//MessagingCenter.Send<BarcodeForms.MainPage, string> (this, "ScanBarcode", scanData);
				MessagingCenter.Send<App, string> (my_application, "ScanBarcode", scanData);
					
			};

			// Register the broadcast receiver
			IntentFilter filter = new IntentFilter(ScanReceiver.IntentAction);<commit_msg>A bit of cleanup of some tests leftovers.<commit_after>﻿using System;

using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;

using Symbol.XamarinEMDK;
using System.Xml;
using System.IO;
using Android.Content;
using Xamarin.Forms;

namespace BarcodeForms.Droid
{
    [Activity(Label = "BarcodeForms", Name = "com.pietromaggi.sample.barcodeForms.MainActivity", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
    public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity, EMDKManager.IEMDKListener

    {

        private EMDKManager mEmdkManager = null;
        private ProfileManager mProfileManager = null;
        private const String mProfileName = "Barcode_1";

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

            EMDKResults result = EMDKManager.GetEMDKManager(Application.Context, this);
            if (result.StatusCode != EMDKResults.STATUS_CODE.Success)
            {
                Toast.MakeText(this, "Error opening the EMDK Manager", ToastLength.Long).Show();
            }
            else
            {
                Toast.MakeText(this, "EMDK Manager is available", ToastLength.Long).Show();
            }


			ScanReceiver _broadcastReceiver = new ScanReceiver();

			global::Xamarin.Forms.Forms.Init(this, bundle);
			var my_application = new App ();
			_broadcastReceiver.scanDataReceived += (s, scanData) =>
			{
				MessagingCenter.Send<App, string> (my_application, "ScanBarcode", scanData);
					
			};

			// Register the broadcast receiver
			IntentFilter filter = new IntentFilter(ScanReceiver.IntentAction);
{'fraction_non_alphanumeric': 0.10102604577742699, 'fraction_numerical': 0.0005261773217574323, 'mean_word_length': 3.3903002309468824, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6194114', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1061, 'n_words': 235}