EndedBySystem

The system ended the read, or the platform closed its link while the app had not cancelled. What leads here differs by platform:

  • iPhone: the system NFC session ended on its own: its time limit passed, the app went to the background, or the system ended it for another reason; or NFC became unavailable after a document was found.

  • Android: NFC, or its option for reading tags, was turned off during the read (NfcUnavailable.Reason.DISABLED, NfcUnavailable.Reason.TAG_READING_DISABLED); or the read's Activity was destroyed (NfcUnavailable.Reason.ACTIVITY_DESTROYED, the Activity-owning start only). The app's own wait for a document is not the system's: it ends as Failed. An Activity that only pauses (the app goes to the background, a dialog, the screen locking) does not end the read: the link drops as when the document moves, and the read waits for the document's return.

  • Both: a link the platform closed under the read, with no cause it reports, ends here with NfcUnavailable.Reason.CLOSED; never as Cancelled by the app.

It carries no files, for the reason given at Cancelled.

Since

1.0.0

Properties

Link copied to clipboard
open override val attempts: Int

How many attempts sent commands to a chip: 0 when none did, more than 1 after a lost link. A read that ends while it waits for the document after a lost link counts only the attempts that ran, so this can be one less than the ChipReadUpdate.attempt of the last updates, which already name the attempt the read was getting ready for.

Link copied to clipboard
open override val progress: ChipReadProgress

The progress when the read ended: 1.0 only for Complete; the last value otherwise.

Link copied to clipboard

What the platform reported.

Link copied to clipboard
open override val systemCode: Int?

The platform's own code for the failure that ended the read, as the platform reported it, when it gave one: on iPhone, Core NFC's NFCReaderError code of the session's end or of the failed connect that led to this ending (for example 2, 7 or 8 for NotStarted with NOT_PERMITTED, NOT_ELIGIBLE or ACCESS_NOT_ANSWERED). null when the ending did not come from a code of the platform, and always on Android, whose NFC calls report no codes. A fact for diagnosis: the typed reason is what the app acts on.

Functions

Link copied to clipboard
open override fun toString(): String

EndedBySystem( the reason ).