Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Apr 2007

    6131 and Autolaunch


    My midlet starts from a tag but it gets no information. The user needs to touch the tag second time when the midlet is running to get info from the tag.

    I followed the example which came with JSR 257 RI and put in my midlet's constructor line:
    DiscoveryManager.getInstance().addTargetListener(this, TargetType.NDEF_TAG);

    Is there a way to achieve same functionality that with 3220/5140i to launch the application and to get data with one touch to a tag?

    Best Regards,

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

    Re: 6131 and Autolaunch

    Nokia 6131 NFC supports the JSR-257 PushRegistry connections as defined in JSR-257 specification 1.0 Appendix B. You can download this from the Java Community Process site – it contains a lot of other useful information about PushRegistry (NDEF record push, Secure Element push, possible URLs for NDEF record push, etc.)

    Briefly - if a MIDlet is launched by touching an NDEF tag and an NDEFRecordListener is registered to DiscoveryManager using the appropriate NDEF record type within thirty seconds of getting the DiscoveryManager instance, then the listener will be notified and the recordDetected() parameter will contain the NDEF record that triggered the launch.

    So, in order to launch the MIDlet by touching a tag 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.
    Raluca Cindrea
    Helsinki, Finland

  3. #3
    Registered User
    Join Date
    Jun 2007

    Re: 6131 and Autolaunch

    I am trying to write an application which read a tag data and search for some relevant information (News in my case).I am using 6131 nfc sdk 1.0 and I have 6131 nokia cell-phone. My problem is I can't manage to have the application launched after touching the tag. Here is my code:
    disMan = DiscoveryManager.getInstance();
    disMan.addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.MIME, null));//MIME is right?
    //the MiFare Ultralight tag shouldn't have any NDEF records written on it // last connecURL:
    //String pushEntry = "nfc:undefined_format";
    //String pushEntry = "ndef:external_rtd?name=urn:nfc:ext:NDEF_TAG";
    String pushEntry = "ndef:rtd?name=urn:nfc:wkt:RFID_TAG";
    readLogo = Image.createImage("/images/read-logo.png");
    newsMenu = Image.createImage("/images/hb.gif");
    System.out.println("after createImage!");
    images[0] = readLogo;
    images[1] = newsMenu;
    }catch (Exception e)
    System.out.println("Ooopst! Exception by register connection: "+e.getMessage());
    list = new MainList("Select action to do:",List.IMPLICIT,actions,images,this,null);
    I am using innovision NFC Forum Type 1 tags (Which are empty as long as I know). I also bookmarked them with a fake internet address.
    For my purpose, I will be even happy if I can launch my application with any tags, but at the same time read the ID so that I can decide what to do afterwards. Can anybody tell me what to put in PushRegistry as Connection-URL? (I guess the filter is right)
    Last edited by pujanzi; 2007-07-05 at 16:20.

  4. #4
    Nokia Developer Expert
    Join Date
    Oct 2005

    Re: 6131 and Autolaunch


    Have you tried that "nfc:undefined_format" as connection url? Note that listeners are not notified when midlet is launched with empty tag.

    For more information about PushRegistry can be found from "Contactless Communication API Extensions" javadocs of "Nokia 6131 NFC SDK 1.1" in Overview page. There is a chapter about PushRegistry that could be helpful.

    There is also example midlet in our wiki that might be worth checking: http://wiki.forum.nokia.com/index.ph...detect_example

Posting Permissions

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