Nfc

object Nfc

NFC-related utilities independent of SDK instance lifecycle.

This object is instance-agnostic: its configuration and listener state are independent of any specific SDK instanceId and can be used before the SDK is initialized.

Functions

Link copied to clipboard
fun getNfcConfiguration(context: Context): NfcConfiguration

Retrieve the currently persisted NFC configuration.

Link copied to clipboard
fun onActivityPause(activity: Activity)

Call this API to release resources when the activity passed to onActivityResume is no longer in the foreground.

Link copied to clipboard
fun onActivityResume(activity: Activity)

When multiple applications can handle an NFC request, the system normally displays a disambiguation prompt.

Link copied to clipboard

Remove the currently registered device engagement listener.

Link copied to clipboard
fun setDeviceEngagementListener(listener: (Throwable?) -> Unit)

Registers a callback to receive the result of NFC device engagement.

Link copied to clipboard
fun setNfcConfiguration(context: Context, newConfiguration: NfcConfiguration)

Persist a new NFC configuration to be applied for subsequent device engagements.