×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    20

    If I talk, will they listen?

    I have dabbled in some MIDP, but have yet to use any of the Networking classes. I gather it should be easy enough to get a MIDlet to contact a server over http. But:

    1) Can a server initiate contact with a MIDlet on a phone?


    2) Can two MIDlets on two phones contact each other, without a server helping out?

    Any very brief guidance would be very much appreciated.


    Thank you for your time,
    PAUL.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    1) In MIDP 1.0, no. In MIDP 2.0 there is the push registry that can enable that (see http://wireless.java.sun.com/midp/articles/pushreg/).
    2) Only using the WMA API, or Nokia's SMS API, they can communicate with SMS. Unfortunately most phones don't support these.

    shmoove

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    20
    Thanks a lot.

    A few other queries have arisen:

    1) In the Push Registry page it mentions wakening up the MIDlet in order to process emails, and you mentioned that MIDlets could communicate by SMS. However, I was of the impression that Java on phones did not have access to basic system features such as the message inbox, address book et cetera. So, what system features can Java get access to?

    2) Are all Nokia Java phones capable of using Nokia's SMS API? Do you expect this API to become universally acceptable anytime soon?

    3) How feasible is it to have a Java MIDlet 'constantly running' (or is this only effectively possible using the Push Registry)?


    Thank you for your time,
    PAUL.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    The Nokia SMS API is not standard and I think there is only one or two phones that support it. No new phones will support it because the WMA (Wireless Messaging API) is out and it is a J2ME standard, so any new phones to have this functionality will definitely use WMA.
    MIDlets don't have access to stuff like the phone's contact list and Inbox. If you want two MIDlets of yours to communicate through SMS, then using WMA you send an SMS specifying a port number, and your app should be listening on that port to recieve the SMS. SMS messages sent with a port number don't go to the phone's Inbox, and can only be recieved by phones running an application that listens to that port.
    That answers questions 1 and 2.
    Now to the third question:
    As far as I understand (I don't have any practical expirience with it), your app doesn't have to be running constantly. If you register it in the push registry, then any incoming message it recieves should cause the JAM to "awaken" your app and pass the message through.

    shmoove

Posting Permissions

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