setDiscoveryTechnology method
Future<void>
setDiscoveryTechnology({
- required Set<
NfcPollTech> poll, - required Set<
NfcListenTech> listen,
Restricts what the controller polls for, and what it answers as, while this activity is in the foreground.
Narrower than reader mode and independent of it: this reaches the controller's own
discovery loop, so it also governs tags delivered by intent and by other apps' sessions
while the app is on screen. Use it to keep the phone from waking on card types the app
has no use for -- and, with an empty listen, to stop it answering readers at all.
Reset it with resetDiscoveryTechnology; the platform also resets on its own when the activity leaves the foreground.
Throws a PlatformException with code unsupported_api_level below API 35.
Implementation
Future<void> setDiscoveryTechnology({required Set<NfcPollTech> poll, required Set<NfcListenTech> listen}) =>
androidApi.setDiscoveryTechnology(poll.map(_pollTechToWire).toList(), listen.map(_listenTechToWire).toList());