code: public static void setDecodeHintAllowedLengths(Intent intent, int[] lengths) {
      intent.putExtra(DecodeHintType.ALLOWED_LENGTHS.name(), lengths);
    }
docs: Set allowed lengths of encoded data.
  @param intent Target intent.
  @param lengths allowed lengths.