code: public static void setDecodeMode(Intent intent, String scanMode) {
      intent.putExtra(Intents.Scan.MODE, scanMode);
    }
docs: Set barcode formats to scan for onto {@code Intent}.
  @param intent Target intent.
  @param scanMode Mode which specify set of barcode formats to scan for. Use one of
  {@link Intents.Scan#PRODUCT_MODE}, {@link Intents.Scan#ONE_D_MODE},
  {@link Intents.Scan#QR_CODE_MODE}, {@link Intents.Scan#DATA_MATRIX_MODE}.