fixed for mag stripe

This commit is contained in:
kizzy 2026-03-09 14:31:15 +07:00
parent 05a91782b5
commit ffc3908446
2 changed files with 10 additions and 0 deletions

View File

@ -262,6 +262,7 @@ public class CardWaitingFragment extends DataBindingFragment implements DataBind
} else { } else {
allType.add(CardSlotTypeEnum.ICC1); allType.add(CardSlotTypeEnum.ICC1);
allType.add(CardSlotTypeEnum.RF); allType.add(CardSlotTypeEnum.RF);
allType.add(CardSlotTypeEnum.SWIPE);
} }
// int allType = AidlConstants.CardType.IC.getValue() | AidlConstants.CardType.MAGNETIC.getValue(); // int allType = AidlConstants.CardType.IC.getValue() | AidlConstants.CardType.MAGNETIC.getValue();

View File

@ -6,6 +6,7 @@ import android.os.Looper;
import android.os.RemoteException; import android.os.RemoteException;
import android.util.Log; import android.util.Log;
import com.nexgo.common.LogUtils;
import com.nexgo.oaf.apiv3.SdkResult; import com.nexgo.oaf.apiv3.SdkResult;
import com.nexgo.oaf.apiv3.device.reader.CardInfoEntity; import com.nexgo.oaf.apiv3.device.reader.CardInfoEntity;
import com.nexgo.oaf.apiv3.device.reader.CardSlotTypeEnum; import com.nexgo.oaf.apiv3.device.reader.CardSlotTypeEnum;
@ -106,6 +107,14 @@ public class CheckCardX {
Log.d(TAG, "Find IC"); Log.d(TAG, "Find IC");
} else if(cardInfoEntity.getCardExistslot() == CardSlotTypeEnum.RF) { } else if(cardInfoEntity.getCardExistslot() == CardSlotTypeEnum.RF) {
checkCardResultX.onSuccess(CardTypeX.NFC,false); checkCardResultX.onSuccess(CardTypeX.NFC,false);
} else if(cardInfoEntity.getCardExistslot() == CardSlotTypeEnum.SWIPE) {
LogUtils.debug(TAG,"Found Swipe");
Bundle info = new Bundle();
info.putString("TRACK1",cardInfoEntity.getTk1());
info.putString("TRACK2",cardInfoEntity.getTk2());
info.putString("TRACK3",cardInfoEntity.getTk3());
MAGXReadCard.getInstance().setBundle(info);
checkCardResultX.onSuccess(CardTypeX.MAG,false);
} }
} else if( i == SdkResult.Fail) { } else if( i == SdkResult.Fail) {
checkCardResultX.onError(i,"Failure"); checkCardResultX.onError(i,"Failure");