×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2008
    Posts
    8

    using PushRegistry

    HI,

    I new to J2ME programming and am trying to use PushRegistry to start an application upon an incoming bluetooth connection. I dynamically register the entry and no exceptions are thrown (when the application runs, the user is prompted "allow application to start when notified?" - YES), but when I look at the push registry entries, there are none and the application does not start when the incoming connection happens. I am running the MIDlet on a Nokia 6085.

    Here is the relevant portion of code:

    ...
    String connString = dsrcAgent.selectService(myService, ServiceRecord.NOAUTHENTICATE_NOENCRYPT, false);
    String midletClassName = this.getClass().getName();
    String filter = "*";
    ...
    StreamConnection conn = (StreamConnection)Connector.open(connString);
    input = conn.openDataInputStream();
    PushRegistry.registerConnection(connString, midletClassName, filter);
    ...

    Any help would be greatly appreciated. I am a college student working on this project for school, and the phone was specifically purchased for this project and is not activated with service. Does the fact that there is no SIM card have any relevance to my problem?

    Beau

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2005
    Posts
    923

    Re: using PushRegistry

    When your app is running normally, can you connect to your service from another device or a PC? That is, your BT service is correctly registered with the Service Record?

    Daniel

  3. #3
    Registered User
    Join Date
    Sep 2008
    Posts
    8

    Re: using PushRegistry

    Here is more information into my struggles. Not only am I having a problem with the PushRegistry, but also in implementing a server connection.

    When it comes time to connect, I am able to make a client connection from my phone to the other device that I am working with (the other device is an OEM Bluetooth Serial Adapter - product link: http://www.a7eng.com/downloads/pb-eb506-ser.pdf), but when I attempt a server connection for the other device to connect to and then try to connect using the other device (the only way to make a connection from this device is to connect directly using the bluetooth address of the device to connect to), the device connects to my Nokia 6085 phone, but is not linked to the application that is in the "acceptAndOpen()" method waiting for a client to connect.

    Thus, the only way that I can have a connection that can be used by my app is to connect to the other device from the Nokia 6085. The 16-bit UUID I am using is 0x1101. Do I need to do things differently for registering my service in the Service Record? Here is the code that I've tried to use for a server connection:

    ...
    String connString = "btspp://localhost:1101";
    StreamConnectionNotifier conNotify = (StreamConnectionNotifier)Connector.open(connString);
    StreamConnection sconn = conNotify.acceptAndOpen();
    input = sconn.openInputStream();
    ...

    Thanks for your help.

    Beau

  4. #4
    Registered User
    Join Date
    Sep 2008
    Posts
    8

    Re: using PushRegistry

    Well, I have successfully registered a connection to the PushRegistry, but still the application will not auto-start with the incoming Bluetooth connection. Also, when trying to offer services from the Nokia 6085, the program just hangs waiting for a client connection from my other device. I am able to connect the other device to my phone, but it is not linked to my application. Anyone experience similar problems?

    Beau

Similar Threads

  1. PushRegistry - SMS wakeup problem.
    By akchaudhury in forum Mobile Java General
    Replies: 7
    Last Post: 2009-02-26, 06:06
  2. Problem using PushRegistry on Mifare tags
    By obrand in forum Near Field Communication
    Replies: 7
    Last Post: 2007-09-20, 00:12
  3. PushRegistry not available on Nokia 6708 (UIQ)
    By akchaudhury in forum Mobile Java Networking & Messaging & Security
    Replies: 6
    Last Post: 2007-01-05, 17:47
  4. PushRegistry & MessageListener
    By jat in forum Mobile Java General
    Replies: 1
    Last Post: 2006-10-30, 18:32
  5. 6600 & PushRegistry alarms & power up
    By random_john_doe in forum Mobile Java General
    Replies: 0
    Last Post: 2003-12-08, 04:34

Posting Permissions

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