Closed TheLazyHatGuy closed 4 years ago
This might be a problem with the ionic wrappers. Can you test this with a simple app using just the callbacks? The ionic code is another project. This is also a pain to test since it locks a tag every time it is run.
Looking at the code, it looks like it logs that the tag is read only then unsubscribes. What code isn't running?
In the then block only the console.log runs. Setting scanningTag to false and changing the status message don't run at all
Do the lines not run or do you not see the result? If you're using Ionic Angular, you probably need something like ngZone to the UI refreshes. Capacitor probably has something similar.
this.ngZone.run(() => {
this.scanningTag = false;
this.statusMessage = 'Tag is now read-only';
});
I think this is an app issue rather than a problem with the plugin.
I use the code below to make tags read-only on android but for some reason, when the read-only is successful I only get the console log and none of the other code runs. Logcat and chrome do not show any error of exceptions
This happens with package version 1.1.1 and capacitor 2.2.0