×

Discussion Board

Page 5 of 12 FirstFirst 123456789101112 LastLast
Results 61 to 75 of 177
  1. #61
    Registered User
    Join Date
    Jul 2007
    Posts
    1

    Re: 6131 NFC autostart on tag touch

    For us newbies would it be possible to see the code which makes all this magic work so that we can see where it all fits together?

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

    Re: 6131 NFC autostart on tag touch

    First step.

    Entrys in the jad file.

    MIDlet-Permissions: javax.microedition.io.Connector.http, javax.microedition.io.PushRegistry, javax.microedition.contactless.DiscoveryManager, javax.microedition.io.Connector.ndef, javax.microedition.io.Connector.rf, javax.microedition.io.Connector.sc
    MIDlet-Push-1: ndef:rtd?name=urn:nfc:wkt:RFID_TAG,RFIDReaderMidlet,*
    MIDlet-Push-2: ndef:rtd?name=urn:nfc:wkt:NDEF_TAG,RFIDReaderMidlet,*
    MIDlet-Push-3: ndef:rtd?name=urn:nfc:wkt:ISO14443_CARD,RFIDReaderMidlet,*
    MIDlet-Push-4: ndef:rtd?name=urn:nfc:wkt:T,RFIDReaderMidlet,*
    MIDlet-Push-5: ndef:rtd?name=urn:nfc:wkt:U,RFIDReaderMidlet,*
    MIDlet-Push-6: ndef:rtd?name=urn:nfc:wkt:St,RFIDReaderMidlet,*
    Last edited by mariosas; 2007-07-24 at 14:00.

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

    Re: 6131 NFC autostart on tag touch

    Second step.

    midlet with
    Code:
    implements TargetListener
    extend

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

    Re: 6131 NFC autostart on tag touch

    Third step.

    overwrite necessary methods.
    Code:
    public void targetDetected(TargetProperties[] properties)  {
    with code for the read the data from TAG.
    Last edited by mariosas; 2007-07-24 at 08:44.

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

    Re: 6131 NFC autostart on tag touch

    fourth step.

    in the public void startApp() {}
    for

    Code:
       try {
                // TAG Typ add Target Listener
                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 - hier nicht erforderlich bzw. unterstützt
                // DiscoveryManager.getInstance().addTargetListener(this, TargetType.VISUAL_TAG); // BarCode     = nicht unterstützt
          
            } catch (Exception e) {
            }
    and for delete the registration from TargetListener

    in the public void destroyApp(boolean unconditional) {}

    Code:
       DiscoveryManager.getInstance().removeTargetListener(this, TargetType.NDEF_TAG);
           DiscoveryManager.getInstance().removeTargetListener(this, TargetType.RFID_TAG);
           DiscoveryManager.getInstance().removeTargetListener(this, TargetType.ISO14443_CARD);

  6. #66
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    mariosas...thanks for the reply
    i did as u said, but I get the following error from the .jad file inputs:
    java.lang.ClassNotFoundException: No MIDlet-<n> registration
    java.lang.SecurityException: Application not authorized to access the restricted API
    And returns Invalid application

    if i implement the Push in the code, it loads successfuly but i am getting Unknown service type



    My tags have CID: MF0U1-####XX##X#####
    Last edited by sdny; 2007-07-24 at 11:19.

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

    Re: 6131 NFC autostart on tag touch

    Note: Emulator has wrong implementation.
    See you this Thread.
    Note: Emulator is not real device!!!

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

    Re: 6131 NFC autostart on tag touch

    the next step and help for all.

    Empty TAG (no first write = Empty of production [or write of production = no problem = no error with 'unknown servive type'])
    = 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

  9. #69
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    yes...i know its not a real device, on the phone it says invalid appliction, and i dont know why...the output from the emulator was just to try to see what was happening.
    Last edited by sdny; 2007-07-24 at 14:21.

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

    Re: 6131 NFC autostart on tag touch

    check the jad entrys!
    See you new -> Today, 07:27
    Which IDE uses you?
    RFIDReaderMidlet = example with me jad entrys change to own
    Last edited by mariosas; 2007-07-24 at 14:41.

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

    Re: 6131 NFC autostart on tag touch

    the next help.

    #
    javax.microedition.contactless - provides target discovery and classes common to all targets
    #
    javax.microedition.contactless.ndef - contains classes and interfaces needed to communicate with tags that have NDEF formatted data
    #
    javax.microedition.contactless.rf - allows communication with RFID tags that do not have NDEF formatted data
    #
    javax.microedition.contactless.sc - enables communication with external smart cards

    from
    Overview - JSR 257

    javax.microedition.contactless.visual - allows reading and generating visual tags
    = not with Nokia 6131 NFC

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

    Re: 6131 NFC autostart on tag touch

    the next help.

    Code:
     
    boolean getRFID()
    {
    	try { Class.forName("javax.microedition.contactless.DiscoveryManager"); }		
    	catch (ClassNotFoundException e) {return false; } 		 	      
    	return true;
    }
    Hardware has NFC function?

    or

    from Overview JSR 257

    Version information

    Applications can determine the version of the Contactless Communication API present in the device, if any, by querying the value of the system property microedition.contactless.version. For this version of the API the value returned must be the string "1.0". If the value returned is null, the Contactless Communication API must not be present.

  13. #73
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    ............i use eclipse, yes...i changed RFIDReaderMidlet to my own.

  14. #74
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by mariosas
    Third step.

    overwrite necessary methods.
    Code:
    public void targetDetected(TargetProperties[] properties)  {
    with code for the read the data from TAG.

    ok...here, what data do i read from the tag? the UID?

    so with this method i dont need to use NDEFRecordListener??

    is ur method the best way to do this? it looks different from pujanzi's method. Think i will cry now
    Last edited by sdny; 2007-07-24 at 15:20.

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

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by sdny
    ok...here, what data do i read from the tag? the UID?

    so with this method i dont need to use NDEFRecordListener??

    is ur method the best way to do this? it looks different from pujanzi's method. Think i will cry now
    You can use the NDEFRecordListener if you want to launch the MIDlet and read the NDEF Record previously written on the tag that you use for launching. However, you don't need this method if you're using empty tags or if you just want to launch your MIDlet but you don't need to read the NDEF record on the tag.

    The TargetDetected method has nothing to do with the Push Registry process. pujanzi's steps describe the Push Registry process correctly.

    Here is some information on Push Registry from the Contactless Communication API Extensions documentation that is provided with the SDK:

    Nokia 6131 NFC supports the supports JSR-257 PushRegistry connections as defined in JSR-257 specification 1.0 Appendix B. Secure element push is limited to the same domains that are allowed to use the internal secure element connections. In addition to these the Nokia 6131 NFC supports a couple of proprietary JSR-257 push methods - a MIDlet can also be launched by touching a NTIP or empty tag. An empty tag means that the tag doesn't contain NDEF or NTIP data, i.e. the format is undefined.

    If a MIDlet is launched by touching a NDEF tag and a 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. The recordDetected() parameter will contain the NDEF record that triggered the launch. When a secure element push registration causes a MIDlet to be launched then similarly a TransactionListener will be notified.

    When a MIDlet is launched by touching an NTIP or empty tag no listeners will be notified. The MIDlet can see that it was launched by touching a tag by reading the DiscoveryManager property LaunchType. To get more information about the tag, i.e. a TargetListener call, the tag must be touched again.
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

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
  •