public void Dispose() { if (receiver != null) { context.UnregisterReceiver(receiver); receiver.Dispose(); receiver = null; } //base.Dispose(); }
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); }