×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    12

    how IM client being implemented

    Hi,

    Would just like to get some opinion on this.

    My understanding is that MIDP1.0 requires only http to be implemented. And with http, there is no way for a server to initiate a connection to a client. With this restriction, am curious to find out how some of the other developers manage to implement an instant messaging client.

    To expand further, there is no IP address associated with a mobile handset. How can a server contact a client.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

    Polling

    Polling is the only viable answer. The client requests updates (with an http request, of course) from the server every x seconds.
    Some phones support sockets, but polling is the only truly portable way to achieve this for now.

    shmoove

  3. #3
    Registered User
    Join Date
    Jul 2003
    Posts
    36
    We use a 'Gateway' server to talk to the various IM flavors ... and have the J2ME client continually poll that server for new chat messages and buddy-list status updates.

  4. #4
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    Guys, I've got an idea about this IM for J2ME.

    When you open HTTP connections, you can send and receive data at any time, right?

    Why wouldn't you send just something like one symbol per minute, not to timeout the connection and send real messages when IM message arrives?

  5. #5
    Registered User
    Join Date
    Jul 2003
    Posts
    36
    That's pretty much what we do ...

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4
    hi bvolk,

    In your solution do ou keep HTTP COnnection open or each poll requires a new HTTP (A new TCP) connection ?

  7. #7
    Registered User
    Join Date
    Jul 2003
    Posts
    36
    I don't know ... I'm management ;-)

    We do use a seperate thread ... and we keep that thread alive.

  8. #8
    Registered User
    Join Date
    Mar 2003
    Posts
    33
    Holding an http connection open doesn't work on Series 40, only on Series 60. We have an IM client for MSN (and Yahoo) and most of the problems we faced were on Series 40 and the intervention of the operator's WAP gateway. Still, it *can* be done, just takes lots of coffee and piza :-)

  9. #9
    Registered User
    Join Date
    Jul 2003
    Posts
    36
    Yes, I think holding the HTTP connection doesn't work.

    How did you get around the WAP-Gateway problem? Other than changing to a alternative gateway.

  10. #10
    Registered User
    Join Date
    Mar 2003
    Posts
    4
    Rsmith, Bvolk

    Question: Having or not a WAP gateway is clearly carier dependant. In other words, it's up to my mobile carier to decide or not to give direct access on the Internet ?

    regards.

  11. #11
    Registered User
    Join Date
    Mar 2003
    Posts
    4
    Rsmith,

    Do you have any demos or a web site where i can try your application ?

    regards
    Ced

  12. #12
    Registered User
    Join Date
    Jun 2003
    Posts
    24

    Clarifications

    Can any one explain me . Is Http the only possible solution for all handsets to implement IM?
    Or any plain socket connections can serve this ?

    If only Http then how the request messages are sent to web server. And how does a webserver respond to request.

  13. #13
    Registered User
    Join Date
    Jul 2003
    Posts
    36
    The current phones only support HTTP networking from J2ME. So we use a gateway server that responds to these HTTP requests and makes the appropiate socket connections to the various IM services.

  14. #14
    Registered User
    Join Date
    Jul 2003
    Location
    Finland, Tampere
    Posts
    1,113
    rsmithh
    Holding an http connection open doesn't work on Series 40, only on Series 60.

    Could you explain why it doesn't work.
    Is it timouted fast? Or maybe phone doesn't actually send anything until the conection is closed?

    I'm confused

  15. #15
    Registered User
    Join Date
    Jun 2004
    Posts
    5

    one year later

    hello all,

    one year later after this last post in this thread
    any new ideas about this issue?

    we are developing a turn-based game in midp 1.0/http and dont want to poll any longer

    perheps we can restart discussion about this
    any fresh ideas about that?
    thanks

Posting Permissions

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