×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Hyderabad.
    Posts
    99

    how to activate midlet using socket connection in emulator

    hi,
    I had created two midlet one is client and anather one is server.
    At client side i written code like this
    scn = (ServerSocketConnection)Connector.open("socket://:5000");
    PushRegistry.registerConnection("socket://:5000","SocketMidlet","*");
    // Wait for a connection.
    sc = (SocketConnection)scn.acceptAndOpen();
    and waiting for a connection to accept.
    and at server side
    sc = (SocketConnection)Connector.open("socket://localhost:5000");
    making a request to client.

    and here when i run the application both client and server using two different emulators i am able to send message from server emulator to client emulator.

    but when i run the client application via OTA and run the server application
    then here i am not able to activate the midlet using server connection even after registering the port.

    can any one please help me how to activate a midlet in emulator using socket connection if possible with a small example.


    regards,
    basu.

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

    Re: how to activate midlet using socket connection in emulator

    You won't be able to do such a connection on real devices unless you know the IP addresses of server device in the operator network, so you can connect from the client application. "localhost" will point to the own device when it's on a real network.

    You need the IP.

    The best solution here is to use JSR 180 SIP, or some kind of way that one application sends an SMS to the other informing it's server IP address.

    Daniel

Similar Threads

  1. Explicitly close socket connection
    By phibo in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2010-05-06, 19:34
  2. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42
  3. problem with socket connection in s60 emulator
    By fm in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-10-19, 19:04
  4. Sercurity Exception with SOCKET connection attempt,do I need my midlet signed?
    By headachecnn in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-03-02, 13:21
  5. Nokia 6020 Http connection in a Midlet
    By dannyant in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-11-21, 07:29

Posting Permissions

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