fordiy
fordiy

Reputation: 264

How to detect NFC in multiple Activities?

Do we still need SETUP NfcAdapter, PendingIntent and enableForegroundDispatch in every Activity?

Upvotes: 0

Views: 530

Answers (1)

NFC guy
NFC guy

Reputation: 10228

Yes. A simple way to do it is to define a BaseNfcActivity class, where you set this up. For all Activities that need it you can then extend BaseNfcActvity (instead of Activity).

Upvotes: 2

Related Questions