PhoneCall object

Instantiating the PhoneCall object

At design time, you can add PhoneCall object to a window by selecting Insert>Object>PhoneCall from the PocketBuilder menu. The default name for the first PhoneCall object is pcall_1. If you use the PocketBuilder IDE to add the object, PocketBuilder automatically instantiates the object at runtime. If you do not use the PocketBuilder IDE to add a PhoneCall object, you must instantiate the object in code (and optimally destroy it after a user finishes placing the call or closes the application).

PhoneCall object example

The following example makes a voice call to a local take-out restaurant after setting some properties on the pcall_1 object:

Integer li_ret
//set properties of phone call object
pcall_1.VoiceCall = true
pcall_1.PhoneNumber = “1-617-123-4567”
pcall_1.CalledParty = “pizza order”
//place a phone call
li_ret = pcall_1.MakeCall()