getUniqueId()

Working with android app,

for annotations,
I used annot.setUniqueId(“xyz”);

When I do a annot.getUniqueId() ,
I am expecting the same “xyz”. How to do that? Please explain, documentation is not helping in this case.

Also, if this not used the way I am using, please tell me how I can tag different annotations with unique tags.

Thanks.

That is indeed how Annot.SetUniqueID/Annot.GetUniqueID should work. What output are you seeing? Could you post a modified PDF document showing the annotation after calling Annot.SetUniqueID and saving? Additionally, which version of the Android SDK are you running?

In case you are just curious how to get the unique ID back as text, you would use Obj.getAsPDFText():

https://www.pdftron.com/pdfnet/mobile/docs/Android/pdftron/SDF/Obj.html#getAsPDFText()