×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    4

    listener in MIDlet

    Hi,

    Can I know possible the MIDlet create a 'listener' that receive any request from outside world?
    I know that we can send HTTP request to a server, and the server will reply back.
    But how if I want the server push the data to MIDlet without any HTTP request from MIDlet? Of course, the MIDlet has been activated or will be waken up by push registry if it is off.

    The only thing I know is that the server can push the data to the IP address of mobile, with an openned port, like:
    http://60.x.x.x:7788 (correct me if the method is wrong)

    if i want to push a data to that IP, how MIDlet will receive and continue the next task?

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: listener in MIDlet

    The most reliable way would be to send an SMS message to the phone and then the phone will open a HTTP connection to the server. The problem in pushing data to the phone is that the phone's IP address is not known (it can change without warning) and that the operator/carrier can block incoming connections

    A workaround is presented here
    http://opensource.nokia.com/projects...ver/index.html

    Hartti

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    4

    Re: listener in MIDlet

    Dear Hartti,

    Really thanks for reply.
    I get the mobile IP address everytime the user's MIDlet login to the API. So I think the handset wont simply change the IP while the application is running..or the possibility is low?

    Actually what i want to do is something like chat application.
    I want to send the data message charge with GPRS, not SMS operator.
    Only charge SMS Telco if the destination's MIDlet havent activated yet, i will send a push registry via SMS gateway to wake it up.
    After both MIDlet is connected, they can send the messages via GPRS (http connection).

    Assume we have MIDlet A and MIDlet B, which is both activated. MIDlet A wants to send a 'message' to MIDlet B.
    I wonder how MIDlet B knows when MIDlet A send something.

    The information i found only with the request / response (HTTP request) in HTTP connection. Cant find my luck how the MIDlet can 'listen' the incoming message

Similar Threads

  1. calling midlet from midlet throws SecurityException on 6600
    By brianpegan in forum Mobile Java General
    Replies: 3
    Last Post: 2010-10-25, 05:31
  2. SMS Listener MIDlet
    By budi_arif in forum Mobile Java General
    Replies: 3
    Last Post: 2007-11-20, 13:01
  3. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42
  4. 'Response Unknown' when downloading midlet
    By Weevil in forum Mobile Java General
    Replies: 3
    Last Post: 2004-05-30, 17:01
  5. How to create two instances of midlet
    By marquito99 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-04-30, 01:33

Posting Permissions

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