×

Discussion Board

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

    PhoneCall example fails: "Can't connect: java.lang.NullPointerExcept ion"

    Hi,

    Q1: Is it possible to test the PhoneAPI without actually having a phone connection to use? I don't have a GSM w/infared modem or a Jet Eye infared pod. Is there a workaround?

    Q2: Why does the PhoneCall example fail? The exception is thrown on the line "Call call = provider.createCall();"

    Q3: Is there any documentation that can help me better understand how to proceed? I want to create a simple application that dials out a phone number (basically the PhoneCall example).

    Thanks much,
    Jesse Reich

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    2

    RE: PhoneCall example fails: "Can't connect: java.lang.NullPointerExce pt ion"

    Answer to Q2:

    There is a line that looks like this prior to the line you mention:
    "provider = peer.getProvider("EpocGsmMobileProvider");"
    The "provider" that you have obtained in that previous line is most likely null. Test that by inserting a println after you get the provider and before you create the call-object.

    So when you try to call the method "provider.createCall();" in the line you mention, you are trying to call some method of a non-existent object (a null-object) that translates to a null pointer and generates the exception you mention.

    There is no remedy that I know of.
    This also answers your first question, at least partially: As far as I know, you will probably not be able to test the telephony part of the JavaPhone API (i.e. the JTAPI) unless you have a means to actually get providers, create call-objects and make actual calls (which means that you need a phone).

    What is worse is that the example does not seem to run on a Nokia 9210 either :-)

    I have finally done what I considered to be 'rude' and sent a mail directly to Jonathan Allin (the author of the example and Java Technology Director of Symbian) to ask for a solution, which relates to your 3rd question.

    I hope we both get an answer :-)
    regards,
    Naci Akkk, Norewgian Computer Center

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    2

    RE: PhoneCall example fails: "Can't connect: java.lang.NullPointerExce pt ion"

    Following up from previous reply:

    See also
    > RE: TCP/IP connection with JavaPhone API
    > (posted by TheTic on 11/06/01 in Java Enabled Phones)
    for the explanation of a 'bug' in the PhoneCall example.

    Important note:
    After receiveing an indication from Colin Turfus (thru Jonathan Allin's request) that the PhoneCall example may not be running on the Nokia 9210 due to insufficient memory, we stopped other applications on the phone and cut out the GUI of the example, leaving only the part that initiates a call. The Nokia 9210 did actually ring the specified phone number under the PhoneCall application control, and we did actually have a phone conversation.

    We still have a number of unresolved issues, of course, because the PhoneCall code itself is about 12KB, but seems to end up being a 3MB running environment on the Nokia 9210.

    ~~Naci Akkk, Senior Research Scientist, Norwegian Computing Cenetr

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    58

    Where can the example be found?

    Could someone point me at where I can find this example (Phonecall) please? Also will this example work on a 7650/3650?

    Thank you

Posting Permissions

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