コード例 #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);
        }