3 Replies Latest reply on Feb 12, 2016 9:29 AM by Billie Hecox

    Scanner data using BroadcastReceiver (Xamarin Application)

    Soumya Nampoothiri

      I have a Xamarin Forms Application, which I would like to integrate with TC700H scanner.In my app, I listened to an Intent via BroadcastReceiver. I tried configuring my intentfilter  action as per document and changed profile Intent delivery to broadcast, but no success. Am i missing something here ?

        • Re: Scanner data using BroadcastReceiver (Xamarin Application)
          Pietro Francesco Maggi

          Hi Soumya,

          take a look at this sample application:

          pfmaggi/Xam_BarcodeForms - GitHub


          Is a Xamarin Forms application, using the Profile API to setup DataWedge to send a broadcast intent.


          In the application there's a ScanReceiver class that implement the broadcast receiver and that is registered using the code:


          // Register the broadcast receiver
          IntentFilter filter = new IntentFilter(ScanReceiver.IntentAction);
          Android.App.Application.Context.RegisterReceiver(_broadcastReceiver, filter);


          The event handler uses the MessagingCenter to send the data to the Form so that it can display the data.


          In addition this app, uses a DependencyService to send a DataWedge intent (the interface is in the Portable library, I've implemented only the Android side).




            • Re: Scanner data using BroadcastReceiver (Xamarin Application)
              Soumya Nampoothiri

              Dear Pietro,


              I get following deployment error with the project shared.


              Detecting installed packages


              Waiting for packaging to complete


              Installing application on device


              Deployment failed because of an internal error: Failure


              Deployment failed. Internal error.


              I will try to extract the logic and put in a different project. I have few questions with regards to it..



              1.       Does it has any dependency on EMDK plugin libraries?


              2.       If I want to listen only to the device h/w scan button, do I need to use EMDKResults ?







              Soumya Neelakandan

              I.T Systems Developer


              44 Raglan Street Preston Victoria 3072


              d:   +61 3 9462 9082


              t:   +61 3 9462 9111

              f:   +61 3 9462 9133

              e:   soumya.neelakandan@amsolutions.net.au



              This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender immediately. If you are not the named addressee you should delete this e-mail from your system and not disseminate, distribute or copy this e-mail. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Document Version