Updated on 2026-08-14
This commit is contained in:
parent
577fc79e68
commit
64ded4f72e
1 changed files with 2 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ import android.nfc.Tag
|
|||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.lifecycle.ViewModelProviders
|
||||
import androidx.navigation.findNavController
|
||||
import com.scottyab.rootbeer.RootBeer
|
||||
import com.tangem.App
|
||||
import com.tangem.di.ToastHelper
|
||||
|
|
@ -39,6 +40,7 @@ class MainActivity : AppCompatActivity(), NfcAdapter.ReaderCallback {
|
|||
if (intent != null && (NfcAdapter.ACTION_TECH_DISCOVERED == intent.action || NfcAdapter.ACTION_NDEF_DISCOVERED == intent.action)) {
|
||||
val tag = intent.getParcelableExtra<Tag>(NfcAdapter.EXTRA_TAG)
|
||||
if (tag != null) {
|
||||
findNavController(R.id.nav_host_fragment).navigate(R.id.main)
|
||||
onTagDiscovered(tag)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue