CountryCodePicker icon indicating copy to clipboard operation
CountryCodePicker copied to clipboard

getSelectedCountryCode retrun null some device

Open ALAZZURRI opened this issue 6 years ago • 1 comments

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.rilixtech.Country.getPhoneCode()' on a null object reference at com.rilixtech.CountryCodePicker.getSelectedCountryCode + 658(CountryCodePicker.java:658)

ALAZZURRI avatar Sep 26 '19 09:09 ALAZZURRI

Hello. I am using this too. And I resolve this problem with:

EditText phoneNUmber = findById.....

//REGISTER FIRST ccp.registerPhoneNumberTextView(phoneNumber); String countryCode = "+"+ccp.getSelectedCountryCode(); //AND you should have code in String value.

Best Regards.

eniz1806 avatar Oct 29 '19 12:10 eniz1806