dvAndroidNfcAvailable function

bool dvAndroidNfcAvailable({
  1. required bool hasAdapter,
  2. required bool enabled,
})

Whether NFC can read something now.

Both halves, and neither on its own. A phone with the hardware and NFC switched off in settings is exactly the case where a true puts "hold your card against the back of the phone" in front of somebody whose phone will never answer. Linux draws the same line: it looks for a powered neard adapter rather than a present one.

Implementation

bool dvAndroidNfcAvailable({
  required bool hasAdapter,
  required bool enabled,
}) =>
    hasAdapter && enabled;