Hello
I'm currently developing an app to read/write NFC tags, using a third-party library.
The app works on a timer, checking for nfc activity , calling a READ from the library when that happens to become true.
Problem is, that library works in different ways in different scenarios and phones. If nfc connection is lost during I/O, sometimes it will launch an exception (correct behaviour ), but other times the library will just not return anything, leaving the b4a execution suspended at that same line for long periods of time, and blocking the UI thread, giving the impression the the app froze
Can this be remedied by starting my b4a sub that calls the library.READ_TAG as a thread (from agraham's library)? So i can brutally kill it and abort the read after too much time has passed ? Also, will that be actually possible if the library is deadlocked?
Thanks!
I'm currently developing an app to read/write NFC tags, using a third-party library.
The app works on a timer, checking for nfc activity , calling a READ from the library when that happens to become true.
Problem is, that library works in different ways in different scenarios and phones. If nfc connection is lost during I/O, sometimes it will launch an exception (correct behaviour ), but other times the library will just not return anything, leaving the b4a execution suspended at that same line for long periods of time, and blocking the UI thread, giving the impression the the app froze
Can this be remedied by starting my b4a sub that calls the library.READ_TAG as a thread (from agraham's library)? So i can brutally kill it and abort the read after too much time has passed ? Also, will that be actually possible if the library is deadlocked?
Thanks!