2 Replies Latest reply on May 11, 2013 9:52 AM by Pietro Francesco Maggi

    Unable to invoke MC40 inbuilt Scanner

      Hi All,

       

      I am trying to invoke "MC40 inbuilt scanner" through the rho native app. I don't have any license as of now on rho products. IF license is needed for this, what is the license need to be procured?

       

      I had created Rhomobile application and in the ruby class written the below code for scanner invocation

       

      def enableScanner

            Scanner.decodeEvent = url_for(:action => :scannerEventListener)

            Scanner.enable

      end

       

      def scannerEventListener

           Alert.show_popup(@params['data'])

      end

       

       

      but it is invoking camera to scan the barcode instead of MC40 inbuilt scanner.I also disabled the datawidge. Pls guide.

        • Re: Unable to invoke MC40 inbuilt Scanner
          Kutir Mobility

          Hi Vamsi

           

          Can you try Scanner.enumerate and check whether inbuilt scanner is listed in the result?

           

          Thanks

          Dhepthi

          Kutir Mobility

          1 of 1 people found this helpful
          • Re: Unable to invoke MC40 inbuilt Scanner
            Pietro Francesco Maggi

            Hi Srinu,

            The scanner API require to have a RhoElements application, otherwise you get an alert box requesting for a valid license.

            During development you can simply close this alert and work for 15minutes. Then you get another Alarm.

            The idea is that you are not required to have a license to test your app. Everything works.

             

            Regarding your question, the MC40 integrated imager is identified as SCN2, so you've to add to your code:

                  Scanner.enabled = "SCN2"

            in your enableScanner functions.

             

            Otherwise the Scanner API will use the default SCN1 module that, on the MC40, it's the device camera.

             

            Best regards

            Pietro