hbb20/CountryCodePickerProject

Error Callback

Closed this issue · 1 comments

hbb20 commented

@hbb20
ccp.setOnCountryChangeListener(new CountryCodePicker.OnCountryChangeListener() { @OverRide public void onCountrySelected() { Toast.makeText(PhoneNumberOtpActivity.this, "This is from OnCountryChangeListener. \n Country updated to " + ccp.getSelectedCountryName() + "(" + ccp.getSelectedCountryCodeWithPlus() + ")", Toast.LENGTH_SHORT).show(); } });

setOnCountryChangeListener will be called when it's autodetection executed/or failed?

onCountrySelected(Error e) will awesome we are getting error use custom other logic to detect country!

suggested by @LOG-TAG

hbb20 commented

@LOG-TAG, CountryChangeListener is already being used by developers and changing it's default behavior is sensitive.

To provide a way to implement what you asked, now version 2.2.0 has new listener FailureListener that should help you listen to failure on country detection. Post back with details if that does not work, we will open the issue if required.