Good afternoon! I am starting to develop in android in which they passed me a project, in the comes with a StripeText library and in one of the methods it marks me an error that can not use private classes from the aforementioned library.
The library that is used.
import com.stripe.android.StripeTextUtils;
This is my code where the error marks it in hasAnyPrefix
public String getType(String number) {
if (!StripeTextUtils.isBlank(number)) {
if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_AMERICAN_EXPRESS)) {
return AMERICAN_EXPRESS;
} else if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_DISCOVER)) {
return DISCOVER;
} else if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_JCB)) {
return JCB;
} else if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_DINERS_CLUB)) {
return DINERS_CLUB;
} else if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_VISA)) {
return VISA;
} else if (StripeTextUtils.hasAnyPrefix(number, PREFIXES_MASTERCARD)) {
return MASTERCARD;
} else {
return UNKNOWN;
}
}
return UNKNOWN;
}
Error marking
Error:(332, 32) error: hasAnyPrefix(String,String...) is not public in StripeTextUtils; cannot be accessed from outside package
I hope you can help me or give me some idea of how to solve it, thank you very much!