| | |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Intent; |
| | | import android.nfc.NfcAdapter; |
| | | import android.nfc.Tag; |
| | | import android.nfc.tech.MifareClassic; |
| | | import android.util.Log; |
| | | |
| | | import com.dayu.baselibrary.tools.HexUtil; |
| | | import com.dayu.baselibrary.tools.nfc.NfcWriteAdapter; |
| | | import com.dayu.qihealonelibrary.card.UserCard; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @author zx |
| | |
| | | if (helper == null) { |
| | | helper = new NFCWriteHelper(intent, activity); |
| | | } |
| | | helper.adapter.setIntent(intent); |
| | | return helper; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean writeUserData(UserCard userCard) { |
| | | try { |
| | | return adapter.writeUserData(userCard); |
| | | return adapter.writeUserData(userCard,1); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |