App with NTAG5 problem: SecurityException: Permission Denial: Tag ( ) is out of date

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App with NTAG5 problem: SecurityException: Permission Denial: Tag ( ) is out of date

1,037 Views
jpbino
Contributor I

I'm working on an Android Application. I tested the example code for the passthrough but I'm going over a problem.

My Use Case needs the phone to be put over a holder :

  1. There is a New Intent
  2. I configure the passthrough
  3. After around 1min I get the following log

 

2024-06-13 10:57:37.570 System.err com.npilot W java.lang.SecurityException: Permission Denial: Tag ( ID: 00 66 21 2C 58 01 04 E0 ) is out of date
2024-06-13 10:57:37.571 System.err com.npilot W at android.nfc.Tag.getTagService(Tag.java:382)
2024-06-13 10:57:37.571 System.err com.npilot W at android.nfc.tech.BasicTagTechnology.transceive(BasicTagTechnology.java:149)
2024-06-13 10:57:37.571 System.err com.npilot W at android.nfc.tech.NfcV.transceive(NfcV.java:115)


The problem happens on :

-Samsung S23 and Samsung A15 with Android 14

I tested also A50 ( Android 11)  and I did not have this issue. 

I also had to update the SDK. The example code uses quite outdated SDK.

minSdkVersion 24
targetSdkVersion 34
Tags (2)
0 Kudos
Reply
4 Replies

585 Views
kosmo-de
Contributor I

Hi @jpbino ,

have you got any clue or how did you resolve your problem?
I've got similar problem with everything working on my old phone (Galaxy S21 5G Ultra) and nothing works on brand new Galaxy A34 5G.
And link, provided by @danielchen, shows "Access denied". Marvelous!
 
 
0 Kudos
Reply

551 Views
kosmo-de
Contributor I
It seems to be just weak signal situation, first of all, check where is NFC reader located on your phone; I've got mentioned error on new phone model, where the reader itself was located under cameras' area, so then I tried to put tag to the rear side of the phone signal to communicate with tag was too weak and therefore communication could not occure properly; placing tag on the top of cameras' area did the trick and I've got no more "Tag is out of date" error
0 Kudos
Reply

428 Views
jpbino
Contributor I

Hi @kosmo-de ,

I hope I have got some about it. Here are my findings:

First, I will tell how I use the tag then I go to the app details:

  1. The device is put into deep sleep;
  2. Then, with the NFC field, I wake up the device through the harvest feature;
  3. Then, I power the board to use the ALM, so that field connection would be less of a problem.
  4. Therefore, the connection is stable.

Now, the app part,

  1. if the signal is too weak you are likely to get a Tag Lost exception. 
  2. In one specific case with Samsung A50, I received Tag LostException, but when I send the command again, the tag just kept replying.
  3. Going further, In the MainActivity when I receive the intent and then I start using the tag there, I have no problem with "out of date".  
  4. But If I discover the tag in the MainActivity and then use it in another Activity, then after one minute, the tag get "out of date"
  5. Seems that the Android is tracking who receives the Intent and then only that one Activity should use it. I searched for a way to transfer the ownership of the tag but without any success. (BTW, with the Moto G phone I didn't have this problem). 
  6. In the end, if I use the tag 

 

I used the code here to build what I am doing:

Code from NXP 

I hope these ideas can help. I attached a function that you can try to study the behavior of your tag. I tested this with the A50, S23, and the Moto G stylus 2023. 

0 Kudos
Reply

958 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi 

For TapLinx support. I would suggest you post your question on TapLinx community forum.

https://community.nxp.com/t5/TapLinx-SDK/gh-p/60564

 

Regards

Daniel

 

Tags (1)
0 Kudos
Reply