Cannot have access to writable memory or it's size (Android App). error :TAG_CMD_CALLED_FROM_UI_THREAD
I'm working on an android app and using your SDK (using version 1.5.1).
The app can read the Tag name and UID, however, I have not been able to make it read the memory size or the content of the NDEF message.
String tagName = mNfcTag.getName();
TextView tagNameTextView = (TextView) findViewById(R.id.tagNameTextView);
tagNameTextView.setText(tagName);
String uidString = mNfcTag.getUidString();
TextView uidTextView = (TextView) findViewById(R.id.uidTextView);
uidTextView.setText(uidString);
mTagSize = ": " + String.valueOf(mNfcTag.getMemSizeInBytes()) + " bytes";
TextView tagMemSizeTextView = (TextView) findViewById(R.id.tagMemSizeTextView);
tagMemSizeTextView.setText(String.valueOf(mTagSize));
NDEFMsg ndefContent=nfcTag.readNdefMessage();
String contenu=ndefContent.toString();
TextView ndefTextView=(TextView) findViewById(R.id.ndefScanTextView);
ndefTextView.setText(contenu);mNfcTag.getMemSizeInBytes() on line 9 and nfcTag.readNdefMessage() on line 14 both create an error while mNfcTag.getName() and mNfcTag.getUidString(); both work perfectly.
What is required in order for those commands to work, that I possibly missed/didn't think of?
Regards,
Edwin
