| | |
| | | |
| | | companion object { |
| | | private const val TAG = "NewCard2Activity" |
| | | private const val REQUEST_CODE_NFC_WRITE = 1001 |
| | | } |
| | | |
| | | |
| | |
| | | putExtra("operationTypeCode", CardOperationType.OpenCard.code) |
| | | putExtra("orderNumber", response.content?.orderNo) |
| | | putExtra("cardFee", cardFee) |
| | | startActivity(this) |
| | | startActivityForResult(this, REQUEST_CODE_NFC_WRITE) |
| | | } |
| | | } catch (e: Exception) { |
| | | CrashReport.postCatchedException(e) |
| | |
| | | } |
| | | } |
| | | |
| | | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
| | | super.onActivityResult(requestCode, resultCode, data) |
| | | if (requestCode == REQUEST_CODE_NFC_WRITE && resultCode == RESULT_OK) { |
| | | // 写卡成功,关闭当前Activity |
| | | finish() |
| | | } |
| | | } |
| | | |
| | | } |