From a9c1231be4e3c1c5bd5e9fc61489d55363090407 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期一, 04 三月 2024 15:26:22 +0800 Subject: [PATCH] 齐河项目相关修改 --- app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java index 650415d..e8ed9d6 100644 --- a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java +++ b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java @@ -1,5 +1,6 @@ package com.dayu.recharge.tools; +import android.app.Activity; import android.content.Intent; import android.nfc.NfcAdapter; import android.nfc.Tag; @@ -11,7 +12,6 @@ import java.io.IOException; import java.util.ArrayList; - import java.util.HashMap; import java.util.List; import java.util.Map; @@ -29,7 +29,8 @@ private static NfcReadHelper helper; - public NfcReadHelper(Intent intent) { + public NfcReadHelper(Intent intent, Activity activity) { + super(activity); this.tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); } @@ -40,9 +41,9 @@ * @param intent * @return */ - public static NfcReadHelper getInstence(Intent intent) { + public static NfcReadHelper getInstence(Intent intent, Activity activity) { if (helper == null) { - helper = new NfcReadHelper(intent); + helper = new NfcReadHelper(intent, activity); } return helper; } -- Gitblit v1.8.0