fillAndReturnArray(contentlength, useNokiaContent)
for example with info for the TAG
see you
my entry from 2007-06-19 10:12
fillAndReturnArray(contentlength, useNokiaContent)
for example with info for the TAG
see you
my entry from 2007-06-19 10:12
Hello mariosas,
if I have understood it correctly, I should write the url with which I am going to auto-launch my midlet, on the tags. So if I have
String pushEntry = "ndef:rtd?name=urn:nfc:wkt:RFID_TAG";
with filter let's say : "nfc:ndef;type=jewel;uid=*"
Then this urn:nfc:wkt:RFID_TAG should have already been written on my tags. I don't know how to accomplish this "writing". Would you please give me some hints? Would be great! Thank you.
Hello again,
I can successfully auto-launch the application with "any" tag using:
String pushEntry = "nfc:undefined_format";
PushRegistry.registerConnection(pushEntry,//ndef:rtd?name=urn:nfc:wkt:T
midletClassName,
"nfc:rf;type=jewel;uid=*");//try between rf or ndef
One problem here is that everytime it asks: "Allow application to start when notified?" and no matter what I say (Yes or No), the application launches and the next time this message will be shown again. How can I get rid of this message?
Another problem is that I can not read the UID after I launch the application (withough touching the tag again). How can I get it right afterwards?
3- I prefer not to auto-launch my application with "any" types of tags, but as I said above, I can't get to auto-lauch the application with
pushEntry = "ndef:rtd?name=urn:nfc:wkt:RFID_TAG";
How can I run the application with the tags with a specific message on them, or bookmark or whatever else? (And keep access that data (message or bookmark) right after starting the application - and not to have to touch the tag again?)
Can anybody please help me? We have a design-fair next week!![]()
- the TAG have minimum Entry.Originally Posted by pujanzi
- no filter for the TAG reading.
- read all Tags with MessageEntry
- select message with URL und working with URL or others.
- autostart with Pushentry with all entry, see you this Thread
-> not autostart with TAG = faile in pushRegistry or not supported with Nokia 6131 NFC.
Nokia supported = see you doku for NOKIA SDK
Originally Posted by pujanzi
the problem with RFID TAG and all pushRegistry entrys
1.
with push registry
= first touch - start the midlet
(MIDP 2.0 - first action with all midlet)
= second touch - start the implements target Listener
(secondarily action)
2.
TAG.
- First touch read data from TAG
- secound touch write data to TAG
= normally
3.
Midlet manuell start
- filter with specified inquires = none away, without reading the head from TAG = example UID from TAG = the next , read data from TAG.
Is the absolute condition affects TAG to the TAG Indentification.
I have no idea about you "encoded" message. You can write in German if it's more comfortable for you.
The main Question:
How can I auto-launch tags, which have either a message written on them, or a Record. I can open up my application with any tags now, but I can't read the data on the tag (directly I mean, I don't want to retouch the Tag to get some information like UID again)
So the goal:
-Touch the tag and auto-launch the application (Done with empty tags)
-Read the UID afterwards
The problem:
I can't auto-launch my application with the tags which have a bookmark or a message written on them. (Another default application will be launched)
I can auto-launch my app with empty-tags, the problem is I can't read the UID afterwards (withough retouching)
Is there any clear answer for these questions? I really appreciate it!![]()
Last edited by pujanzi; 2007-07-11 at 15:51.
Ok. In Deutsch ist es wahrscheinlich besser.
Mein Englisch ist nicht gut.
Here is a list of all supported target types:
<target type> ::= "felica" | "jewel" | "simpletag" | "mf1k" | "mf4k" | "iso4a" | "iso4b"
und
Nokia 6131 NFC unterstützt nur (siehe list of all supported) DiscoveryManager.getInstance().addTargetListener(this, TargetType.NDEF_TAG); // NDEF Tag's
DiscoveryManager.getInstance().addTargetListener(this, TargetType.RFID_TAG); // RFID Tag's
DiscoveryManager.getInstance().addTargetListener(this, TargetType.ISO14443_CARD); // ISO Cards
// DiscoveryManager.getInstance().addTargetListener(this, TargetType.VISUAL_TAG); // BarCode = nicht unterstützt
Wenn der TAG keinen Ersteintrag oder einen Eintrag hat (TAG Type muss im TAG angeben sein, sonst Fehlermeldung mit 'unknown service type' ) , kann dieser NICHT gelesen werden und löst auch keinen PushRegitryEintrag aus zum starten des MIDlets!
Und
see you
http://discussion.forum.nokia.com/fo...d.php?t=107134
und
Empty TAG (no first write or more)
= Error with 'unknown service type' message
= first write with NFC device function
- Text message (autostart with midlet = true)
or
- Bookmark (browser start with internetadress = no midlet autolaunch)
or
- Business card (CARD to Tag with > 1kByte = no midlet autolaunch)
or
- Call request (Call Telefonnumber = no midlet autolaunch)
autolaunch with Text message = true and start the midlet
Ein TAG mit 'unknown service type' Meldung kann mit aktiven Midlet gelesen und beschrieben werden (read the UID from TAG)! Das ist kein Problem, aber nicht mit 'PushEntry' und nicht 'autolaunch' !
Last edited by mariosas; 2007-07-25 at 07:06.
In order to launch the MIDlet by touching a tag that has an NDEF record on it and also get the information on the tag after the MIDlet has been launched, you must implement NDEFRecordListener and its method recordDetected and also, in the constructor, add the NDEFRecordListener to the DiscoveryManager with the corresponding NDEFRecordType.
It's not possible to read the tag UID from the first touch. You can only launch your application and read an NDEF record from the tag, in case you have one on it. You have to touch the tag again to read the UID.
However, if you want to launch your application by touching a tag that has a certain UID, you can add the UID as a filter in your PushRegistry entry. You can also specify the type of tag that will launch your application.
E.g.:
String pushEntry = "nfc:undefined_format";
String filter = "nfc:rf;type=simpletag;uid=11223344556677";
Please let me know if you need more information.
Raluca Cindrea
Helsinki, Finland
www.nokia.com/nfc
Hello Raluca_
The problem with the entry in the pushregistry!
complett string for the entry in
Sender IP(/Filter):
nfc:undefined_format
= no!
Connection String:
nfc:rf;type=simpletag;uid=11223344556677
= no!
Please the complete character string call and not only a part.
Your suggestion is however not implemented without problems accepted with the jad variant -> autolaunch.
Here there is a general problem for all with the understanding of the RFID system with the Nokia 6131NFC
One TAG affect and the program starts automatically?!
If no non-specified cannot start TAG the program, why is it a specified TAG resembles TYP's it to be able?
Terms:
TYP = mifare UL ....
Service typ = Call request
see you (with same TAG UID and device NFC function on)
{
Empty TAG (no first write or more)
= Error with 'unknown service type' message
= first write with NFC device function
- Text message (autostart with midlet = true)
or
- Bookmark (browser start with internetadress = no midlet autolaunch)
or
- Business card (CARD to Tag with > 1kByte = no midlet autolaunch)
or
- Call request (Call Telefonnumber = no midlet autolaunch)
autolaunch with Text message = true and start the midlet
data in TAG for read (www.xxx.de or hello) = all the same.
}
why that?
first touch start the midlet with Pushentry with filter
second touch start the implements for implements TargetListener or others
well super then goes it nevertheless = no = 'unknown service type'
by clean TAG (no first write = no service type)
Mhm.
![]()
Which is that!!!!!
Internal NFC function is in the program sequence of the hardware before the examination of the Registry?!!!
Hi mariosas,Originally Posted by mariosas
As you can see from cde's posts in this thread, launching a MIDlet using an empty tag is working just fine and cde was able to make it work following the instructions provided here.
I am still trying to understand the problems you encounter when using tags that have NDEF records written on them. I will come back with more info as soon as possible.
Raluca Cindrea
Helsinki, Finland
www.nokia.com/nfc
Sorry Raluca_
It concerned in the last 3 entries ' unknown the service type '. With exactly this the whole play does not function.
autolaunch = no with 'unknown the service type'
manuellaunch = no problem with 'unknown the service type ' and MIDlet.
The entries specified by you do not function in the combination with the JAD file.
I have to say my problem thereby solved. TAG must be called at least once 'text service type' and not more data (The minimum requirement for Push Registry).
Hello everyone!
I am so happy that I finally could auto-launch my midlet with the tags I want, read the record-content on the immediately and finish the job! I will summerize the things I learned (and I had problems with at the beginning) for those who have the same problem:
The goal is:
You have a tag, you want to write some information on it, and then auto-launch your application by dragging that tag and also read the information written on it.
{
Just in case you want to auto-launch your application with "Any" tags, it is possible only with any "Empty" tags. (Tags with no record written on them).
Here is the instruction:
String pushEntry = "nfc:undefined_format";
String pushFilter = "nfc:rf;type=jewel;uid=*";//Can also be "*"
// the type-part in filter can also vary according to your tag type
// (i.e. simpletag) in my case it was jewel
PushRegistry.registerConnection(pushEntry, yourMidletClassName, pushFilter);
That's it! One problem (with any-autolaunch) is you can not read the Tag-UID right after the auto-launch, but you should drag the tag again to be able to read it. Another problem is that your auto-launch doesn't work with the tags which are not empty. (You get ' unknown the service type ' error in that case) @mariosas: Could be your case.
}
Anyway, back to the "civilized" auto-launch.
Here are the steps:
1- You should write a method to do the Record-writing on your tags. The information you write (The NDEFRecord) consists of two parts.
First part:
is the type of your record which is NDEFRecordType. This part itself consists of two items:
*NDEFRecordType id
which can be (NFC_FORUM_RTD, MIME, EXTERNAL_RTD, ... ) these are static attributes of NDEFRecordType, so you can access them easily.
*The url (title) of the record (tagRecordURL)
Which is the in the form of urn:nfc:wkt:something this something can be anything you want. There are also other things for the prefix (urn:nfc:wktwhich you can read about in the user's guides. Let's call it tagRecordURL, as we will need it soon.
Second part: The "content" of your record, which is actually the information which differentiates your tags from other ones. This is your personal information. Can be anything you want, like your company name, a piece of information, an image, any thing. The only important issue is that you can't insert this information as String or something else. It should be given to the Record as an array of bytes (byte[]). The Text object written in Nokia 6131 Programmers guide can ease the pain for you to do this conversion.
So the NDEFRecord we want to write looks something like this:
(new NDEFRecordType(NDEFRecordType.NFC_FORUM_RTD, tagRecordURL), new byte[0], convert(content, lang))
//For convert() method read Text object as I explained above.
//lang is just an empty string given to convert method
This record among with other (possible) records which you want to write on the tags, are written using these methods:
NDEFMessage message = new NDEFMessage(new NDEFRecord[]{myRecord});
ndefTagConnection.writeNDEF(message);
//ndefTagConnection can be obtain from Connector.open when you give the right URL of your TargetProperties[] to it
//some thing like this: (NDEFTagConnection)
//Connector.open(tProp[0].getUrl(connections[i]));
Perfect! Now you have the right information written on your tag(s).
For auto-launching your tags, you should just give this pushEntry to your pushRegistery:
String pushEntry = "ndef:rtd?name="+tagRecordURL;
String pushFilter = "nfc:ndef;type=jewel;uid=*";
//pay attention to the nfc:ndef in filter (It's not nfc:rt anymore)
The last thing, is to add listener in your midlet constructor to discovery manager which looks like this:
DiscoveryManager.getInstance().addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.NFC_FORUM_RTD, tagRecordURL));
and implement the corresponding method of NDEFRecordListener interface which is recordDetected (NDEFMessage ndefMessage)
You can access to the "content" you wrote on your tag by:
ndefMessage.getRecord(0).getPayload()
which is in byte[] and is very easy to become String, Image or whatever else!
The last problem you might confront with is the message
"Allow application to start when notified?"
everytime you start (or auto-launch) your application. That is because you don't need to register your application everytime. The first time is enough. So you should check your PushRegistry connections to see if your application is already registered or not. You can find the method written by mariosas somewhere in this thread.
I think I am done! Hope some people would find this useful. Took me two weeks to get to this point!
Ciao
hi everyone...total beginner here. I am trying to read this thread but it's making no sense, I have no idea where all the different bits of code go!
I see this code many times in the thread:
String pushEntry = "nfc:undefined_format";
String filter = "nfc:rf;type=simpletag;uid=*";
where does this go? in the .java file? in the .jad?
what does go in the .java file? what do i need to import? how is the package used?
I basically want it to be along the lines of how the SecurPro example in the nokia Toolbox 2.1 work.
If anyone can help to a complete step by step that would be greatly appreciated.
Thanks.
PS. my tags are not empty.
ok, i got it to semi work...i got it to ask me if i want the application to start when notified, but it doesnt work if i say 'yes'. I have put the PushRegistry in a method using DeviceEvent, the PushRegistry is called at :-
case DeviceEvent.EVENT_CONNECTION:
is this ther right way to do it?
i really dont understand what to do here:
i cant see what is going on at all there.The last thing, is to add listener in your midlet constructor to discovery manager which looks like this:
DiscoveryManager.getInstance().addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.NFC_FORUM_RTD, tagRecordURL));
and implement the corresponding method of NDEFRecordListener interface which is recordDetected (NDEFMessage ndefMessage)
Last edited by sdny; 2007-07-19 at 14:21.