Scan barcode/qrcodes using Google Vision

KakeKake USMember ✭✭
edited August 2017 in Xamarin.Android

Have been using the zxing barcode reader up until recently, but have had some issues making use of the front camera. Therefore, we decided to switch to using the Google Vision API.
It is working but the scanning is less than good. It is not able to find barcodes on all devices. In addition, the preview has some ratio issues and is seemingly unable to focus.

Also have not found a xamarin implementation of how-to make a boxes showing/tracking the located barcodes ( ).

The code we use is equal to this code:

Any suggestions for how-to enhance the reader and implement tracking of the barcodes?



  • AlbertoCAlbertoC ITMember ✭✭


    Have you find the best way to read barcode, i have the same problem as you had.

  • SMModarresySMModarresy USMember ✭✭

    @Kake @AlbertoC
    Any luck?

  • AlbertoCAlbertoC ITMember ✭✭


    I use this peace of code for reading the result of the scan

    namespace iMioDocPdaEntry.Droid
    [BroadcastReceiver(Enabled = true, Exported = true)]
    [IntentFilter(new[] { "" })]
    public class BarCodeChiper : BroadcastReceiver
    public string result { get; set; }
    public override void OnReceive(Context context, Intent intent)
    //Code generator 128
    string bvalue1 = intent.GetStringExtra("Decoder_Data").TrimEnd();

                result = bvalue1;
                if (!String.IsNullOrEmpty(result))
                    MessagingCenter.Send<string, string>("iMioDocPdaEntry.Android", "BARCODE_RECEIVED", result);
            catch (Exception e)
                result = "data encode failed";


    I hope this code can help you

    Alberto C.

Sign In or Register to comment.