Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    TCP/IP connection with JavaPhone API

    Q1: Does 9210 open a dial-up connection automatically? The examples PhoneCall and Telegraph do not seem to work, and I'm not sure if JavaPhone APIs really work in a real 9210 machine.

    Q2: Do calling and SMS message sending functions work only in the real 9210 machine?

  2. #2
    Registered User
    Join Date
    Mar 2003

    RE: TCP/IP connection with JavaPhone API

    Resolution for question 1: The answer is yes. You can assume that accessing the Internet from a Java app works in a real 9210 device. The example PhoneCall has a recognized bug in its code, and after this being fixed, the NullPointerException should not occur. For a detailed description of how to fix the bug, please refer to the separate description below. So the exception does not occur because phone call function is not supported but merely, because the application has a bug.

    How to get around the NullPointerException bug in PhoneCall example
    The cause of the exception is that the Call is not set to ACTIVE state
    before the terminalConnectionRinging() method is called. This means
    that in your implementation of that method getConnections() returns
    null, because the getConnections() method only returns an array of
    Connections if the Call is ACTIVE. You could get around this by
    caching the call object in the terminalConnectionRinging() method and
    then getting the connections after the method has finished, when the
    call will be ACTIVE. Perhaps you could trigger this via the UI, or
    check on a separate thread.
    This problem has also been mentioned in "Wireless Java for the
    Symbian Platform Java Course" by Jonathin Allin.


    Resolution for question 2: Yes. Phone call and SMS message sending are supported functions in JavaPhone API. This means those functions work both in the 9210 Java Emulator and in a real 9210 device. Therefore you may assume that the functions can be tested with the Emulator or a real 9210 device.

Posting Permissions

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