-
public final class NfcAntennaHintKt
-
-
Method Summary
Modifier and Type Method Description final static BooleansupportsNfcAntennaHint(Context context)Returns true if the device reports NFC antenna positions that can be visualized by NfcAntennaHint. final static UnitNfcAntennaHint(Modifier modifier, Dp iconSize, Color iconColor, Boolean showAntennas)Displays animated NFC antenna location indicators on top of the current layout, positioned at the physical NFC antenna locations reported by the device. -
-
Method Detail
-
supportsNfcAntennaHint
final static Boolean supportsNfcAntennaHint(Context context)
Returns true if the device reports NFC antenna positions that can be visualized by NfcAntennaHint.
Returns false on Android versions below API 34, when NFC is unavailable, or when the device does not expose antenna location data.
- Parameters:
context- A context used to access the NFC system service.
-
NfcAntennaHint
@Composable() final static Unit NfcAntennaHint(Modifier modifier, Dp iconSize, Color iconColor, Boolean showAntennas)
Displays animated NFC antenna location indicators on top of the current layout, positioned at the physical NFC antenna locations reported by the device.
Has no visible effect on Android below API 34 or on devices that do not expose antenna location data. Use supportsNfcAntennaHint to check support before showing this composable.
- Parameters:
modifier- Modifier applied to the full-size container.iconSize- Size of each antenna indicator icon.iconColor- Color of the NFC icon.showAntennas- Whether to show the antenna indicators.
-
-
-
-