左晓为主开发手持机充值管理机
zuoxiao
3 天以前 548dce0bcff06ee7a1795defe8e7789b9d7aad94
baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
@@ -31,8 +31,6 @@
    private static NativeNfcReadHelper helper;
    public NativeNfcReadHelper(Intent intent, Activity activity) {
    }
    @Override
@@ -49,7 +47,7 @@
     */
    public static NativeNfcReadHelper getInstence(Intent intent, Activity activity) {
        if (helper == null) {
            helper = new NativeNfcReadHelper(intent, activity);
            helper = new NativeNfcReadHelper();
        }
        helper.setIntent(intent);
        return helper;
@@ -128,7 +126,6 @@
    @Override
    public String getCradType() {
        MifareClassic mfc = MifareClassic.get(tag);
        if (null != mfc) {
            try {
@@ -388,6 +385,9 @@
    @Override
    public String getCardNumber() {
        if (tag == null) {
            return "";
        }
        MifareClassic mfc = MifareClassic.get(tag);
        if (null != mfc) {
            try {
@@ -402,7 +402,9 @@
                        }
                    }
                } else if (!listA_PS.isEmpty()) {
                    if (mfc.authenticateSectorWithKeyA(0, listA_PS.get(0))) {
                    if (mfc.authenticateSectorWithKeyA(0, defauleKey)) {
                        isOpen = true;
                    } else if (mfc.authenticateSectorWithKeyA(0, listA_PS.get(0))) {
                        isOpen = true;
                    }
                }
@@ -433,7 +435,13 @@
    }
    public String getCardNumberNoClose() {
        if (tag == null) {
            return "";
        }
        MifareClassic mfc = MifareClassic.get(tag);
        if (null != mfc) {
            try {
@@ -448,7 +456,9 @@
                        }
                    }
                } else if (!listA_PS.isEmpty()) {
                    if (mfc.authenticateSectorWithKeyA(0, listA_PS.get(0))) {
                    if (mfc.authenticateSectorWithKeyA(0, defauleKey)) {
                        isOpen = true;
                    } else if (mfc.authenticateSectorWithKeyA(0, listA_PS.get(0))) {
                        isOpen = true;
                    }
                }
@@ -664,4 +674,8 @@
        }
        return null;
    }
    public boolean changePasword(int a, MifareClassic mfc) {
    }
}