From 548dce0bcff06ee7a1795defe8e7789b9d7aad94 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期五, 25 四月 2025 16:52:50 +0800
Subject: [PATCH] refactor(nfc): 重构 NFC 读写助手类并优化相关功能
---
baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java b/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
index 4c8aa09..fd1651e 100644
--- a/baselibrary/src/main/java/com/dayu/baselibrary/tools/nfc/NativeNfcReadHelper.java
+++ b/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;
@@ -387,6 +385,9 @@
@Override
public String getCardNumber() {
+ if (tag == null) {
+ return "";
+ }
MifareClassic mfc = MifareClassic.get(tag);
if (null != mfc) {
try {
@@ -434,7 +435,13 @@
}
+
+
+
public String getCardNumberNoClose() {
+ if (tag == null) {
+ return "";
+ }
MifareClassic mfc = MifareClassic.get(tag);
if (null != mfc) {
try {
@@ -667,4 +674,8 @@
}
return null;
}
+
+ public boolean changePasword(int a, MifareClassic mfc) {
+
+ }
}
--
Gitblit v1.8.0