| | |
| | | import com.dayu.recharge.utils.MyCommon; |
| | | import com.dayu.recharge.utils.SocketUtil; |
| | | import com.dayu.recharge.utils.TipUtil; |
| | | import com.dayu.recharge.view.ProgressDialog; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Calendar; |
| | |
| | | public void onNewIntent(Intent intent) { |
| | | super.onNewIntent(intent); |
| | | this.intent = intent; |
| | | startAnim(); |
| | | ProgressDialog.show(this); |
| | | if (NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) { |
| | | readAllData(intent); |
| | | } |
| | |
| | | * 读取全部数据 |
| | | */ |
| | | |
| | | public void readAllData(Intent intent) { |
| | | public void readAllData(Intent intent) { |
| | | NfcReadHelper.getInstence(intent) |
| | | .getAllData(new NfcReadHelper.NFCCallListback() { |
| | | @Override |
| | |
| | | |
| | | } |
| | | |
| | | void startAnim() { |
| | | redCardBinding.avi.setVisibility(View.VISIBLE); |
| | | redCardBinding.avi.show(); |
| | | // or avi.smoothToShow(); |
| | | } |
| | | |
| | | void stopAnim() { |
| | | redCardBinding.avi.hide(); |
| | | ProgressDialog.dismiss(); |
| | | // or avi.smoothToHide(); |
| | | } |
| | | |