Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transceive() blocking UI thread [android] #18

Open
ghost opened this issue May 28, 2020 · 0 comments · May be fixed by #19
Open

transceive() blocking UI thread [android] #18

ghost opened this issue May 28, 2020 · 0 comments · May be fixed by #19

Comments

@ghost
Copy link

ghost commented May 28, 2020

Calls to "transceive", "connect" and "close" methods currently blocks the UI and therefore should be called inside a background thread.

To reproduce:

  1. Place CircularProgressIndicator(value: null) in the widget tree
  2. Inside your "onDiscovered", call tag.transceive(data)
  3. The progress indicator stutters for a brief amount of time

Relevant: https://developer.android.com/reference/android/nfc/tech/IsoDep#transceive(byte[])

This is an I/O operation and will block until complete. It must not be called from the main application thread.

@ghost ghost changed the title NFC calls blocking UI thread [android] transceive() blocking UI thread [android] May 28, 2020
@ghost ghost linked a pull request May 28, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants