Problem getMapping always null and other question
Hi,
I'm newbie on nfc.
I try example SimpleNDEFMIDlet of sdk and work fine, but I have more question:
1) Method getMapping of TargetProperties give me always null, why? I use nfc tag of emulator.
2) Example write a empty record, but what is better record to use?there is a particle principle to choose?
3) When I write a recoder i must respect particular syntax?
Best regards
Re: Problem getMapping always null and other question
Hallo,
for 1): See the documentationof the TargetProperties interface:
[QUOTE][FONT="Courier New"]java.lang.String [B]getMapping[/B]()[/FONT]
If the target type is [FONT="Courier New"]RFID_TAG[/FONT] this method returns the name of the mapping between the commands in the [FONT="Courier New"]PlainTagConnection[/FONT] and the physical target structure. The returned String can be, for example, "Mifare 1K". If the access to the tag is only supported through some target-specific connection interface the API implementation provides and not through the [FONT="Courier New"]PlainTagConnection[/FONT] interface, this method returns [FONT="Courier New"]null[/FONT]. If mapping name is provided for the [FONT="Courier New"]RFID_TAG[/FONT], the [FONT="Courier New"]PlainTagConnection[/FONT] must be one of the connections returned with the method [FONT="Courier New"]getConnectionNames[/FONT]. Mapping names ISO14443A and ISO14443B may be used to indicate protocol based mapping.
For [FONT="Courier New"]NDEF_TAG[/FONT] targets this method returns the name and the version of the NDEF mapping, like for example, "JewelTag v1.0"". In both cases the mapping name is provided by the API implementation or by the physical tag manufacturer. For other target types the method must return [FONT="Courier New"]null[/FONT].
Returns:
the name of the mapping, or [FONT="Courier New"]null[/FONT] if target type does not have mapping[/QUOTE]
So this means that it is up to the API implementation/the tag manufacturer to supply a mapping name. In this case I would believe that no mapping names where defined.
for 2): I don't really know what you are trying to ask here.
for 3): That depends on what type of record you would like to write:
* For standardized records (like Text RTD, URI RTD, Smart Poster RTD, ...): [B]yes[/B], you have to obey the NFC Forum RTD specifications ([URL="http://www.nfc-forum.org/specs/spec_list/#rtds"]You can find them here.[/URL])
* For custom record type definitions (like NFC Forum External Type) you have to follow the general record format, but you are free to define your own payload format for them.
br,
Michael
Re: Problem getMapping always null and other question
[QUOTE=mroland;763670]Hallo,
for 1): See the documentationof the TargetProperties interface:
So this means that it is up to the API implementation/the tag manufacturer to supply a mapping name. In this case I would believe that no mapping names where defined.
for 2): I don't really know what you are trying to ask here.
for 3): That depends on what type of record you would like to write:
* For standardized records (like Text RTD, URI RTD, Smart Poster RTD, ...): [B]yes[/B], you have to obey the NFC Forum RTD specifications ([URL="http://www.nfc-forum.org/specs/spec_list/#rtds"]You can find them here.[/URL])
* For custom record type definitions (like NFC Forum External Type) you have to follow the general record format, but you are free to define your own payload format for them.
br,
Michael[/QUOTE]
Many thaks for reply :)
Best regards