Hallo,
> How to write these information in smart poster programmatically?
> 1) URL of the discount offer
That one is easy: use the smart poster's URI record.
> 2) Count value (like offer for first 200 entries)
That depends on what you want to achieve:
a) Should every smart poster should have a unique number between 1 and
200?
In that case, you would simply add this number as a parameter to the
URI.
b) Should the counter be incremented on each read of the smart poster?
That's a difficult task. There is no standard way to do that. In a
production environment a smart poster would typically be read-only.
You would therefore need tags that allow writing and you would need an
app on the user's device that increments the counter on each read.
However, that's not the user experience that is expected with smart
posters. If you still want to take this approach, you could add the
counter into a seperate NDEF record (e.g. your own external record
type). This record can be either added after the smart poster record
or inside the smart poster record's payload. Both variants are allowed
by the NDEF RTD specifications.
A different approach would be to use a dynamic tag. I.e. a tag that
knows how many times it has been read. There's active tags from Sony
that can be used to achive this task. You could even write your own
NDEF Type 4 tag application on an ISO 14443-4 smart card. In this case
you would again add the counter as a parameter to the URI. Whenever
the tag is read, it would then increment the counter and create the
new URI.
br
Michael