using Android.Content;
using Android.OS;

namespace unitechRFID_CSharp_Sample
{
    public class MainReceiver : BroadcastReceiver
    {
        public static string rfidGunPressed = "com.unitech.RFID_GUN.PRESSED";
        public static string rfidGunReleased = "com.unitech.RFID_GUN.RELEASED";
        public static string systemExtendedPort = "com.unitech.EXTENDED_PORT";

        //public SampleFragment fragment;
        public interface IEventLitener
        {
            void OnCustomActionReceived(Context context, Intent intent);
        }
        private IEventLitener _eventLitener;

        public MainReceiver(IEventLitener eventLitener)
        {
            this._eventLitener = eventLitener;
        }


        public override void OnReceive(Context context, Intent intent)
        {
            string action = intent.Action;
            _eventLitener.OnCustomActionReceived(context, intent);
        }
    }
}