×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Apr 2005
    Location
    Germany
    Posts
    10

    Question Autostart application and reading tag UID with one touch

    Is there any possibility to autostart my application, read out the NDEF records and the tag UID with just one touch to the tag?

    If I touch the tag the registered application is started and the application as NDEFRecordListener is called with recordDetected(...). With this call I get the NDEF records content. But how can I get the tag UID?
    Even If I implement TargetListener.targetDetected(...) this method will only be called, if I touch the tag for a second time and the application is already running.

    Does anyone have any suggestions to solve this problem?

  2. #2
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91

    Re: Autostart application and reading tag UID with one touch

    You can only get the NDEF records content with one touch of the tag (the one that launches the application). If you need other target specific information, like the tag UID, you have to touch the tag again.

    However, PushRegistry connection filters can be used to define which type of tags can trigger a MIDlet to be launched and you might find this useful, depending on your needs.

    The filter syntax for NDEF PushRegistry is:
    <filter> ::= "*" | "nfc:"<conn type>";type="<target type>";uid="<uid>

    You could set filters so that the MIDlet is launched only if a tag with a certain UID is detected. For example, if you want to touch a SimpleTag that has the UID 0x11223344556677 in order to launch the MIDlet, you can use the following line:

    PushRegistry.registerConnection("ndef:mime?name=text/plain",
    "test.TestMIDlet", "nfc:ndef;type=simpletag;uid=11223344556677");

    I hope this helps.
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  3. #3
    Registered User
    Join Date
    Sep 2007
    Posts
    5

    Re: Autostart application and reading tag UID with one touch

    Thanks. Yes, it works now.

    __
    http://djcall.com

  4. #4
    Registered User
    Join Date
    Sep 2007
    Posts
    4

    Re: Autostart application and reading tag UID with one touch

    Hi,
    I wonder if i've 4 card with 4tag UID(ex 1 2 3 4), how could i start MIDletA with 123 and MIDletB with 4? I mean how can i pushregistry with differences UIDs at the same type of card, so what is the syntax for?

    Thank you,
    Minh

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    4

    Re: Autostart application and reading tag UID with one touch

    Hello,
    I want to write a midlet that will triggered only one touch a tag and autostart. The difficulty is to read data from tag on the first touch. On nokia 6131 nfc phone, there is an application that outo detects business cards. Like that i want to launch my application and read tag simultaneously.

  6. #6
    Nokia Developer Expert
    Join Date
    Oct 2005
    Posts
    21

    Re: Autostart application and reading tag UID with one touch

    Hi,

    As Raluca said, only NDEF message can be read when midlet is started using push registry. For other types of tags another touch is needed.

    NDEF message can be get using NDEFRecordListener. See example,
    http://wiki.forum.nokia.com/index.ph...detect_example

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    23

    Re: Autostart application and reading tag UID with one touch

    Quote Originally Posted by samuuh View Post
    Hi,

    As Raluca said, only NDEF message can be read when midlet is started using push registry. For other types of tags another touch is needed.

    NDEF message can be get using NDEFRecordListener. See example,
    http://wiki.forum.nokia.com/index.ph...detect_example
    I notice that when PushRegistry is used to start MIDlet on any tag and targetDetected() is called, that the tag UID is in the URL returned by:

    TargetProperties target = detectedTarget[0];
    String url = target.getUrl();

    I wondered if in the auto-start from NDEF message case, if it is not possible in recordDetected() to get the URL from the NDEf message, and hence get the URL?

    Just an idea.

Similar Threads

  1. reading sms from the sms application
    By hatwarbabu in forum General Messaging
    Replies: 6
    Last Post: 2007-03-22, 19:40
  2. Any way of an application reading an sms from phone?
    By chasers_bc in forum General Messaging
    Replies: 3
    Last Post: 2006-05-18, 06:53
  3. Replies: 4
    Last Post: 2005-12-19, 15:59

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×