
Originally Posted by
Dervis
Ok, I understand your your problem. For the "Writing an Image to an NDEF tag" example, you'll need a) a 6131 NFC phone and b) a rewriteable RFID tag. I simply tested the demo with the included Nokia 6131 NFC emulator and the included RFID tags. This is what I found:
a) The example application has two functionalities: Read and Write. When you push the Write button, you can simply drag-drop a RFID tag over the emulator. If you have a phone yourself, you can simply touch the tag that you want to write the image to. However remember this: on a standard Mifare 1K RFID tag, you'll only have about 726 bytes available for your data. So any image you include with the jar, must be less-or-equal to 700 bytes. But, you could easily write a larger image to a RFID tag with a larger capasity. With the emulator included with the Nokia NFC SDK API, there both 1K and 4K tags available for you to play with.
b) No, the image is not on the phone. The image resides inside the jar file. However I found the source of the refered example a bit confusing since it expects to find the image outside any packages in the jar file. So what I did is the following: I downloaded the example source code and created a new ImageWrite project with the Java ME Platform SDK editor. Then inside the src folder, I created a new folder called "resources". Inside the resources folder I included to images, the first one being the one included with example and a second one which I downloaded. Both images are less then 1K. The first one is 20x20 as you said and the other one is 30x30. To make this work, you have to change this line:
"InputStream is = getClass().getResourceAsStream("smiley.png");" into this
"InputStream is = getClass().getResourceAsStream("/resources/smiley.png");"
Now build the jar file and make sure that it includes both images. The code will then look inside the "resources" folder and load any image you want.
If you want the source code which I tested, including the jar file, then PM me your email-adress and I'll send a zip to you.
Hope this help you.