×

Discussion Board

Page 10 of 12 FirstFirst 123456789101112 LastLast
Results 136 to 150 of 177
  1. #136
    Regular Contributor
    Join Date
    Mar 2007
    Location
    Helsinki, Finland
    Posts
    91

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by Raluca_ View Post

    String pushEntry = "ndef:external_rtd?name=nokia.com:li:id";
    @sdny

    Are you sure that nokia.com:li:id is the type for your tag?
    Raluca Cindrea
    Helsinki, Finland
    www.nokia.com/nfc

  2. #137
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    Quote Originally Posted by Raluca_ View Post
    @sdny

    Are you sure that nokia.com:li:id is the type for your tag?
    well, thats what TagTestMidlet says. nothing else is working.

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

    Re: 6131 NFC autostart on tag touch

    See you thread entry
    Yesterday, 07:24
    for test with Nokia 6131 NFC

    with entry
    ndef:external_rtd?name=urn:nfc:ext:nokia.com:id","mobileServer","*"
    push ok
    with entry
    ndef:external_rtd?name=urn:nfc:ext:nokia.com:li:id","mobileServer","*"
    push with error
    Illegall Argument java/lang/IllegalArgumentException with Invalid Parameter

  4. #139
    Registered User
    Join Date
    Jul 2007
    Posts
    29

    Re: 6131 NFC autostart on tag touch

    mariosas;331316
    See you thread entry
    Yesterday, 07:24
    for test with Nokia 6131 NFC

    with entry
    ndef:external_rtd?name=urn:nfc:ext:nokia.com:id","mobileServer","*"
    push ok



    nope...this give "Invalid parameter"

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

    Re: 6131 NFC autostart on tag touch

    Mhm?!

    Pushentry with
    ndef:external_rtd?name=urn:nfc:ext:nokia.com:id
    in the real device = no problem.
    And
    push with
    ndef:external_rtd?name=urn:nfc:ext:nokia.com:li:id
    = no problem

    all entry in the .jad file, install and start = no problem.

    im self testing = no problem.
    I have no TAG (external_rtd) for the next testing for autolaunch.

    in realdevice with
    Code:
    MIDlet-1: mobileS RFID,/icons/logo24.png,Midlet
    MIDlet-Jar-Size: 16350
    MIDlet-Jar-URL: 6131NFC.jar
    MIDlet-Name: mobileS RFID
    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,RFIDReader,*
    MIDlet-Push-2: ndef:rtd?name=urn:nfc:wkt:NDEF_TAG,RFIDReader,*
    MIDlet-Push-3: ndef:rtd?name=urn:nfc:wkt:ISO14443_CARD,RFIDReader,*
    MIDlet-Push-4: ndef:rtd?name=urn:nfc:wkt:T,RFIDReader,*
    MIDlet-Push-5: ndef:rtd?name=urn:nfc:wkt:U,RFIDReader,*
    MIDlet-Push-6: ndef:rtd?name=urn:nfc:wkt:St,RFIDReader,*
    MIDlet-Push-7: ndef:mime?name=text/uri-list,RFIDReader,*
    MIDlet-Push-8: ndef:mime?name=text/x-uri,RFIDReader,*
    MIDlet-Push-9: ndef:external_rtd?name=urn:nfc:ext:nokia.com:li:id,RFIDReader,*
    MIDlet-Vendor: XXXX
    MIDlet-Version: 0.6.4
    MicroEdition-Configuration: CLDC-1.1
    MicroEdition-Profile: MIDP-2.0
    = no problem

    The next to last entry said, goes not. But I have the positive suppl.-smooth-eat now the entry.
    I deleted and then again installed the old ' Midlet ' only.
    Last edited by mariosas; 2007-08-20 at 12:06.

  6. #141
    Registered User
    Join Date
    Sep 2007
    Posts
    40

    Re: 6131 NFC autostart on tag touch

    Pujanzi, Thanks a lot, finally a post that made some sense for newbies!
    I finally got this thing working.

    Juan C. Ramirez

  7. #142
    Registered User
    Join Date
    Feb 2008
    Posts
    6

    Re: 6131 NFC autostart on tag touch

    Hi,

    I just got started with the 6131 NFC emulator. I'm having issues with PushRegistry auto-start. There's a chance that I'm trying in the wrong direction. Here's what I'm doing:

    1. I write to the MF1K tag in the emulator, with a separate MIDlet, with the following code:

    I have a target listener registered as:

    Code:
    dm.addTargetListener(this, TargetType.NDEF_TAG);
    and in the targetDetected method:

    Code:
    conn = (NDEFTagConnection)connector.open(properties[0].getUrl());
    	
    NDEFRecord[] records = new NDEFRecord[] {new NDEFRecord( new NDEFRecordType(NDEFRecordType.EXTERNAL_RTD, "urn:nfc:ext:yourcompany.com:pushexample"), null, null)};
    
    NDEFMessage message = new NDEFMessage(records);
    
    conn.writeNDEF(message);
    Then I right click the MF1K and press "Save Data", then plug it out, and close the emulator.

    2. Secondly, I open the MIDlet to be auto-started via the emulator, which has the following code in it:

    Code:
    PushRegistry.registerConnection(					"ndef:external_rtd?name=urn:nfc:ext:yourcompany.com:pushexample",
    "com.TestMidlet",
    "nfc:ndef;type=mf1k;uid=58db93b0");
    The "nfc:ndef;type=mf1k;uid=58db93b0" is obtained via the properties[0].getUrl() in the first tag writer MIDlet.

    Then I close this MIDlet by pressing the red "No" button in the emulator, and connect the MF1K by double clicking it, but nothing happens.

    What is wrong, any ideas?

  8. #143
    Registered User
    Join Date
    Mar 2008
    Posts
    3

    Re: 6131 NFC autostart on tag touch

    I read this thread and finally the task to launch a midlet by touching a tag works fine. Thanks for all your help here!
    But now I have another task which is almost similar:

    Is it possible to autostart one midlet from one midlet, which is running, by touching a tag?
    In detail:
    - I have an open running midlet
    - then I touch a tag and in this moment another midlet should
    launch

    Is that possible to perform?

    Thanks for all ideas and help!

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

    Re: 6131 NFC autostart on tag touch

    urn:nfc:ext:yourcompany.comushexample
    in emulator?
    Emulator not realdevice!!!
    you code
    Code:
    PushRegistry.registerConnection("ndef:external_rtd?name=urn:nfc:ext:yourcompany.com:pushexample",
    "com.TestMidlet",
    "nfc:ndef;type=mf1k;uid=58db93b0");
    see you entry
    -> 2007-08-20 11:55
    statically registry entry in name.jad
    Code:
    MIDlet-Push-9: ndef:external_rtd?name=urn:nfc:ext:nokia.com:li:id,RFIDReader,*
    UID those is all the same
    first test for all UID und check this for autolaunch.

    AND see you extra entry
    2007-08-07 08:24
    OR
    Code:
    try
    {
      PushRegistry.registerConnection("ndef:external_rtd?name=","mobileServer","*");
    }
    catch (ClassNotFoundException e)
    {
     e.printStackTrace();
    }
    catch (IOException e)
    {
     e.printStackTrace();
    }
    check you new entry with in the last code
    Code:
    PushRegistry.registerConnection("ndef:external_rtd?name=urn:nfc:ext:yourcompany.com:pushexample",
    "com.TestMidlet",
    "nfc:ndef;type=mf1k;uid=58db93b0");

  10. #145
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Re: 6131 NFC autostart on tag touch

    Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */
    
    package com.sg.np.ict.ryhmes;
    
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.PushRegistry;
    import javax.microedition.contactless.*;
    import javax.microedition.contactless.ndef.*;
    
    /**
     * @author Administrator
     */
    public class StartTour extends MIDlet implements CommandListener,TargetListener,NDEFRecordListener,ItemCommandListener{
        private Form mScreen,duke,np;
        private ImageItem img,img2;
        private Command exitC,backC;
        private boolean autoLaunched=true;
        private NDEFMessage lastNDEF;
        private Displayable current;
        public TT(){
            mScreen = new Form("Welcome");//creates form
            exitC = new Command("Exit",Command.EXIT,1);//creates command
            mScreen.addCommand(exitC);//add commands to screen
            mScreen.setCommandListener(this);//set listener for commands
            StringItem launchBtn = new StringItem(null,"Application installed. Please flash your phone over tag again. ");
            //launchBtn.setLayout(Item.LAYOUT_NEWLINE_AFTER);
            launchBtn.setPreferredSize(130, 200);
            launchBtn.setLayout(Item.LAYOUT_CENTER|Item.LAYOUT_2);
            launchBtn.setFont(Font.getFont(Font.FONT_STATIC_TEXT,Font.STYLE_PLAIN,Font.SIZE_SMALL));
            launchBtn.setItemCommandListener(this);
            mScreen.append(launchBtn);//add button to screen
            //try saving tag id for auto launching of application
            try{
                DiscoveryManager dm = DiscoveryManager.getInstance();
                dm.addTargetListener(this,TargetType.NDEF_TAG);
                dm.addTargetListener(this,TargetType.RFID_TAG);
                dm.addNDEFRecordListener(this, new NDEFRecordType(NDEFRecordType.NFC_FORUM_RTD, "urn:nfc:wkt:T"));
            }
            catch(Exception ce)
            {
                System.err.println();
            }        
        }
        public void startApp() {
            
            //Register for push launch
            try{
                String [] regConnections = PushRegistry.listConnections(false);
                boolean registered = false;
                for (int i = 0; i < regConnections.length; i++)
                {
                    if(regConnections[i].equals("ndef:rtd?name=urn:nfc:wkt:T"))
                        registered=true;
                }
                if(!registered)
                {
                    PushRegistry.registerConnection("ndef:rtd?name=urn:nfc:wkt:T", "com.sg.np.ict.ryhmes.StartTour", "*");
                }
            }
            catch(Exception e)
            {
                System.err.println();
            }
            current = Display.getDisplay(this).getCurrent();
            if(current==null)
            {
                Display.getDisplay(this).setCurrent(mScreen);
            }
            else
            {
                Display.getDisplay(this).setCurrent(current);
            }
        }
    
        public void pauseApp() {
        }
    
        public void destroyApp(boolean unconditional) {
        }
        public void targetDetected(TargetProperties[]prop)
        {
            if(prop[0].getUid().toString().equalsIgnoreCase("044f7cb9c00280"))
            {
                			destroyApp(false);
    			notifyDestroyed();
            }
            else if(prop[0].getUid().toString().equalsIgnoreCase("044f52b9c00280"))
            {
                NP();
            }else if(prop[0].getUid().toString().equalsIgnoreCase("044f63b9c00280"))
            {
                Duke();
            }
        }
        public void recordDetected(NDEFMessage msg)
        {
            if(autoLaunched)
            {
                autoLaunched=false;
                if(msg!=null)
                {
                    NDEFRecord[] records = msg.getRecords();
                    if(records !=null)
                    {
                        for(int i = 0; i<records.length; i++)
                        {
                            if(records.length>1)
                            {
                            }
                            else{
                                
                            }
                            lastNDEF = msg;
                        }
                    }
                    else{
                        
                    }
                }
                else{
                    
                }
            }
        }
        public void commandAction(Command cmd, Displayable d) {
            if(cmd==backC)
            {
                Display.getDisplay(this).setCurrent(mScreen);
            }
            else if(cmd==exitC)
            {
                destroyApp(false);
                notifyDestroyed();
            }
    	}
        public void commandAction(Command cmd, Item i) {
    
    	}
        public void NP(){
            np = new Form("NP");
            exitC = new Command("Exit",Command.EXIT,2);
            np.addCommand(backC);
            np.setCommandListener(this);
            try{
                img2 = new ImageItem(null,Image.createImage("/NP_logo.gif"),ImageItem.LAYOUT_CENTER,"NP");
                np.append(img2);
            }
            catch(Exception e)
            {
                System.err.println();
            }
            Display.getDisplay(this).setCurrent(np);        
        }
        public void Duke(){
            duke = new Form("Duke");
            backC = new Command("Back",Command.EXIT,2);
            duke.addCommand(backC);
            duke.setCommandListener(this);
            try{
                img = new ImageItem(null,Image.createImage("/duke.jpg"),ImageItem.LAYOUT_CENTER,"Duke");
                duke.append(img);
            }
            catch(Exception e)
            {
                System.err.println();
            }
            Display.getDisplay(this).setCurrent(duke);
        }
    }
    Hi, I'm currently doing a final year project using NFC 6131 Handset. It's my first time developing a mobile application and furthermore using NFC handset. Currently my school has provided my with NFC 6131 Handset and 6 NFC tag and I'm facing problem on auto launching application.

    Situation upon running application, the phone would request to tap the tag again to allow auto launch but in my case it's not working

  11. #146
    Registered User
    Join Date
    Feb 2008
    Posts
    2

    Re: 6131 NFC autostart on tag touch

    I have no idea how do i enable to make the tag run upon touch, but previously with the similar code i can't with multiple attempt but after i run the TagTestMidlet sample, the phone started to auto launch my application...
    Can anyone mind explaining? im using the similar code i post below

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

    Re: 6131 NFC autostart on tag touch

    Good mornings.

    Check the nokia device for disable NFC function.
    change code form dynamic entry to static entrys in the jad-file for the autolaunch with to all UID.
    Change code to simple RFID Reader with run ..... with only TargetListener.
    testversion - minimum code for testings with RFID Tag's for autolaunch and not more.
    Later change code to Final Version with you code.
    use try and error method.
    device start and autolaunch with midlet self = Not possible.

    reference: delete app from the device and then new install new version of app for the test.

    Best Regards Mario

  13. #148
    Registered User
    Join Date
    Jan 2008
    Posts
    11

    Re: 6131 NFC autostart on tag touch

    Hi Ferrychia,

    I am also working on NFC as my final year project. Can yu pls let me know how yu solved the autostart problem? Does it mean the connection used on the emulator will be different from that of real device?

    Thank you.

    Sylv

  14. #149
    Registered User
    Join Date
    Apr 2004
    Location
    Vienna
    Posts
    321

    Re: 6131 NFC autostart on tag touch

    As far as I'm concerend the Emulator does not support the Auto-Launch/PushReg feature on tag-touch, as it also does not support OTA deploying. (Please let me know if I'm wrong ...)

    Cheers, Gerald

  15. #150
    Registered User
    Join Date
    Jul 2008
    Posts
    11

    6131 NFC autostart on tag touch help needed direly

    Hello everybody,
    I am a new one n developing an application for NFC enabled devices.
    I want to start my application as soon as external Tag is brought close to the device and it must ask User_Code before entering into the application.
    Kindly let me know step by step as i have mentioned that I m beginner in this field.
    Thanx in advance

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
  •  
×