Zxing QR Codes android

1

I am following this answer for the use of a perzonalized layout

link

summarizing the amount of all libraries

maven {
        url "https://raw.github.com/embarkmobile/zxing-android-minimal/mvn-repo/maven-repository/"
    }

   compile 'com.google.zxing:core:3.2.1'
   compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
   compile 'com.embarkmobile:zxing-android-minimal:2.0.0@aar'
   compile 'com.embarkmobile:zxing-android-integration:2.0.0@aar'
   compile 'com.google.zxing:core:3.0.1'

And in my Class

    IntentIntegrator scanIntegratorCI = new IntentIntegrator(this);
    scanIntegratorCI.addExtra("PROMPT_MESSAGE", "Lea el codigo QR correspondiente al CashIn");
    scanIntegratorCI.setCaptureLayout(R.layout.custom_layout_rq);
    scanIntegratorCI.initiateScan();

This is all correct, I generate a QR with the app I can read it extract the data etc, but the method setCaptureLayout appears as if it does not exist, and I do not see how to customize the xml according to the official documentation

So I do not know why you do not let me use this method any help is welcome

    
asked by Bruno Sosa Fast Tag 16.02.2018 в 17:39
source

1 answer

0

It seems that there are many variants of that library:

On the original zxing repository that method does not exist, but there is another martar user repository where the same class yes has that method, and it seems to be a fork that you use ( journeyapps ):

/**
     * Change the layout used by the intent.
     *
     * @param intent the scanning intent
     * @param resourceId the layout resource id to use.
     */
    public static void setCaptureLayout(Intent intent, int resourceId) {
        intent.putExtra(CaptureActivity.ZXING_CAPTURE_LAYOUT_ID_KEY, resourceId);
    }
    
answered by 16.02.2018 / 18:27
source