Wednesday, 29 April 2009

Initiating a phone call in Blackberry

Lets say you wish you make your application to attempt to make a call in Blackberry. This is how you do it.

PhoneArguments pa = null;
pa = new PhoneArguments(PhoneArguments.ARG_CALL,"67838763520");
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, pa);

The bolded part is the number you wish to make a call to.

You might also want to check for any active calls before making a call. So here it is:

private static boolean gotActiveCall() {
  boolean callExist = false;
  if(Phone.getActiveCall() != null) {
    callExist = true;
  return callExist;

No comments: