Пример #1
0
        public void Dispose()
        {
            if (receiver != null)
            {
                context.UnregisterReceiver(receiver);

                receiver.Dispose();
                receiver = null;
            }

            //base.Dispose();
        }
Пример #2
0
        internal PluginBarcodeScanner(string serviceName, PluginBarcodeScannerConnection connection, Context context)
        {
            this.serviceName = serviceName;
            this.connection  = connection;
            this.context     = context;

            if (PluginManagerBase.CommonContext == null)
            {
                PluginManagerBase.CommonContext = context;
            }


            //SetCallback();

            receiver = new PluginBarcodeScannerBroadcastReceiver(this);

            var filter = new IntentFilter();

            filter.AddAction("com.cleverence.plugins.barcodeScannerScan");

            context.RegisterReceiver(receiver, filter);
        }