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 :-)
Naci Akkk, Norewgian Computer Center
> 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.
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
Where can the example be found?