androidscanningcard.io

How to get full card number in human readable formate using card.io android SDK?


I have used card.io to scan my credit card in my android application. I got the scanned number but it shows •••• •••• •••• 2157.

Now I need to exact card number so that I can pass that number on payment detail form.

CreditCard scanResult = data.getParcelableExtra(CardIOActivity.EXTRA_SCAN_RESULT);
strCardNumber = scanResult.getRedactedCardNumber()

Solution

  • Replace this line

    scanResult.getRedactedCardNumber() 
    

    with

    scanResult.getFormattedCardNumber() 
    

    and you will get the readable card number.