×

Discussion Board

Page 1 of 12 1234567891011 ... LastLast
Results 1 to 15 of 177
  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    31

    6131 NFC autostart on tag touch

    Hi,

    i'm trying to add a push-registry entry to autostart a midlet if a simple tag (not only ndef) is touched but it doesn't work. I tried a lot:

    ndef:rtd?name=urn:nfc:wkt:RFID_TAG
    ndef:rtd?name=urn:nfc:wkt:T

    What else can I try? Which entry works?

    I also tried to autostart a midlet on secure-element events. Looks like this:

    secure-element:?aid=63646530316d6672

    Also doesn't work...

    Maybe you can help.

    Thanks

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

    Re: 6131 NFC autostart on tag touch

    If you want your MIDlet to be launched only when a simple tag is touched, you need to add a filter to the PushRegistry entry. Here's is an example:

    PushRegistry.registerConnection("ndef:rtd?name=urn:nfc:wkt:T", "TestMIDlet", "nfc:ndef;type=simpletag;uid=*");

    For the secure element push, please see the following thread:

    http://discussion.forum.nokia.com/fo...d.php?t=107605
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    21

    Re: 6131 NFC autostart on tag touch

    Is it possible to read the NDEFMessage from the tag that started the MIDlet?

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

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by jorgenaasland
    Is it possible to read the NDEFMessage from the tag that started the MIDlet?
    Yes, this is possible. Please see the following thread for information on how to do this:

    http://discussion.forum.nokia.com/fo...d.php?t=105707

    Please let me know if you need more details.
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  5. #5
    Registered User
    Join Date
    Mar 2007
    Posts
    130

    Re: 6131 NFC autostart on tag touch

    How to find out that MIDlet was auto started by PushRegistry tag reading. I tried the following code

    String[] connections = PushRegistry.listConnections(true);

    if (connections != null && connections.length > 0) {.....

    But connections was null.

  6. #6
    Registered User
    Join Date
    Oct 2006
    Location
    Berlin
    Posts
    201

    Re: 6131 NFC autostart on tag touch

    Code:
    PushRegistry.registerConnection("ndef:rtd?name=urn:nfc:wkt:T", "TestMIDlet", "nfc:ndef;type=simpletag;uid=*");
    = ERROR = not correctly with jadfiles

    Code:
      DiscoveryManager.getInstance().addTargetListener(this, TargetType.NDEF_TAG); // NDEF Tag's
    for registry the Listener.

    My Thread with PushRegistry
    http://discussion.forum.nokia.com/fo...d.php?t=107134

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

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by Alex_Polt
    How to find out that MIDlet was auto started by PushRegistry tag reading. I tried the following code

    String[] connections = PushRegistry.listConnections(true);

    if (connections != null && connections.length > 0) {.....

    But connections was null.
    You can find out if the MIDlet was auto-launched by using the DiscoveryManager LaunchType property. The values for LauchType are "touch" or "manual" and you can use this for checking how the MIDlet was launched.

    If the value is "touch" then the MIDlet launch was caused by a JSR-257 PushRegistry connection, e.g. by touching a tag that contained a specific NDEF record.

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

  8. #8
    Registered User
    Join Date
    Apr 2007
    Location
    Taipei
    Posts
    22

    Re: 6131 NFC autostart on tag touch

    cde, what kind of listener are you using? NDEFRecordListener or TargetListener? did you registered your MIDlet in the DiscoveryManager?

  9. #9
    Registered User
    Join Date
    May 2007
    Posts
    31

    Re: 6131 NFC autostart on tag touch

    @gregorytaiwan: I use the gregorytaiwan and didn't register the midlet in the DiscoveryManager. Do I have to register it?

    Thanks for your replies
    Andi

  10. #10
    Registered User
    Join Date
    Oct 2006
    Location
    Berlin
    Posts
    201

    Re: 6131 NFC autostart on tag touch

    Short comment on the documentation of the NFC's SDK. Badly!!! Perhaps someone can be looked times here into the ' maps ', what is really correct

  11. #11
    Registered User
    Join Date
    May 2007
    Posts
    31

    Re: 6131 NFC autostart on tag touch

    @Raluca: I tries many times to autolauch my midlet with a simple tag but it didn't work. I exactly used your example. Do I have to enable tag detection? If so, I always get a error "unknown service type". But the midlet never starts. What else can I try?

    Thanks for your help.
    Regards
    Andi

  12. #12
    Registered User
    Join Date
    Oct 2006
    Location
    Berlin
    Posts
    201

    Re: 6131 NFC autostart on tag touch

    RFID Option = on = no Midlet start
    RFID Option = off and hand start the midlet and function = OK
    Hardware RFID option is Nokias own implementation. TAG = clean = then ' unknown service type '.
    As long as no Nokia coworker emerges here, it will test on and tries to arrive.

  13. #13
    Registered User
    Join Date
    May 2007
    Posts
    31

    Re: 6131 NFC autostart on tag touch

    I tried a few combinations, but nothing works! Has anybody ever done this before with success?

    Regards
    Andi

  14. #14
    Registered User
    Join Date
    Apr 2007
    Location
    Taipei
    Posts
    22

    Re: 6131 NFC autostart on tag touch

    @cde: Yes, you must to register the application with DiscoveryManager when you are using the NFC capabilities.

    Inmediately you have installed the application in the mobile, the device will not launch your application in any incoming tag if you are not running your application, so you must to start it at least once, and register the application, for instance, in the startApp. Go out, and the device will launch your application on incoming tags which you have registered all the time.

    In other hand, if you reinstall the application, the mobile will threat it as a new one, so the device will not launch your application until you start your application at least once.

  15. #15
    Registered User
    Join Date
    May 2007
    Posts
    31

    Re: 6131 NFC autostart on tag touch

    @gregorytaiwan: here is my code (in startApp), is this correct?

    //Register for push launch
    try
    {
    String[] regConns = PushRegistry.listConnections(false);
    String pushEntry = "ndef:rtd?name=urn:nfc:wkt:RFID_TAG";
    String filter = "nfc:ndef;type=simpletag;uid=*";
    boolean registered = false;

    for (int i = 0; i < regConns.length; i++)
    {
    if (regConns[i].equals(pushEntry))
    registered = true;
    }

    if (!registered)
    PushRegistry.registerConnection(pushEntry, "cde.TicketMain", filter);
    }
    catch (Exception e)
    {
    }

    dm = DiscoveryManager.getInstance();

    try
    {
    dm.addTargetListener(this, TargetType.RFID_TAG);
    dm.addTransactionListener(this);
    }
    catch (Exception e)
    {
    }

    It doesn't work!
    I want to autostart the application with "any" tag.

    thanks for your help
    Andi

Similar Threads

  1. Autostart application and reading tag UID with one touch
    By choege in forum Near Field Communication
    Replies: 6
    Last Post: 2010-02-22, 12:38
  2. Communication between 2 Nokia 6131 NFC
    By zhs_bravo in forum Near Field Communication
    Replies: 13
    Last Post: 2009-01-05, 10:23
  3. TargetListener Problems in nokia 6131 NFC
    By JesusFD in forum Near Field Communication
    Replies: 3
    Last Post: 2008-03-31, 11:52
  4. Nokia 6131 NFC SDK 1.0 has been released
    By Nokia Ron in forum Near Field Communication
    Replies: 0
    Last Post: 2007-03-26, 22:28
  5. Can't read RFID Tag with NFC Shell
    By begermic in forum Mobile Java Tools & SDKs
    Replies: 5
    Last Post: 2007-01-31, 23:02

Posting Permissions

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