Home > Language Reference > Classes

Telephony Class

  + Object
    + Telephony

Description

The Telephony object encapsulates all the methods required to manage mobile phone communications through the palmOne telephony API. This class is instantiable but neither clonable nor derivable.

Note that the palmOne telephony library does not allow third-party applications to control phone calls directly. This implies it is not possible to write an application that dial a number or that answer an incoming call. However you can still set up handlers to be notified to such events, you can send and receive short text messages, and you can configure most properties of the phone.

Initialization of the mobile phone

The phone library is loaded and initialized the first time you instantiate a Telephony object. If the library could not be found, a runtime error is raised; therefore it is advised to encapsulate this first try into a Try...Catch... statement. If this allocation succeeds however, you are assured all subsequent instantiations will be successful. For example, you could write in your main application class:

Private Sub Application_NormalLaunch()
  Dim f As frmMain
  Dim t As Telephony

  Try
    t = New Telephony
  Catch
    MsgBox "Telephony API not available!"
    Exit Sub
  End Catch

  f = New frmMain
  f.Show hbFormModeless+hbFormGoto
End Sub

You can then instantiate other Telephony classes wherever you need it in your application without risking more errors. It could also be convenient to store this first Telephony object into a global variable you could access from anywhere in your application.

Mobile phone information and configuration

The Telephony class provides many properties to configure the mobile phone or to get information about the phone or the subscriber. Refer to the list of properties below for more information.

Most properties require the radio to be on and the phone to be registered onto the network. You can use the Power property to check the radio is switched on, the Attached property to check your terminal is registered, and if using a GSM device, the SIMStatus property to check the phone is ready.

Some properties are only meaningful on GSM or CDMA devices. Calling them on a device that does not support them raises a runtime error. You can check your phone type by calling the PhoneType property.

Sending and receiving messages

To learn how to send and receive messages, please refer to the SMS class.

Members

MembersDescription
Attached Indicates wether the phone is registered on the network or not.
CLIP Calling Line Identification Presentation.
CLIR Calling Line Identification Restriction
Forwarding Call forwarding settings.
GPRSAttached Indicates if GPRS is available.
IMEI International Mobile Equipment Identity.
IMSI International Mobile Subscriber Identity.
LastError Last error code.
LED Forces the state of the LED indicator.
Mute Mute call.
OperatorLock Indicates if the phone is locked to an operator.
OperatorName Operator name.
OwnNumbers Returns the own numbers.
PhoneBook Phone book of the SIM card.
PhoneType Phone type.
Power Powers the radio on and off.
Provider Provider name.
RegisterNotify Registers a notification request.
SendSMS Sends a SMS.
SendUSSD Sends an USSD query.
SignalQuality Signal quality.
SignalQualityThreshold Signal quality threshold.
SIMStatus SIM card status.
SMSServiceCenter Number of the center service for sending messages.
UnregisterNotify Unregisters all notification requests.
Vibrate Vibrates the phone.
Inherited from ObjectDescription
ClassID Returns the type identifier corresponding to the actual class of the object.
Implements Determines whether the object implements the features of a given class.
Iterate Event raised to iterate over the elements of a container object.
Recipient Recipient of events sent by the object.
Serialize Event raised to serialize the object content into a stream.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 5.0Only available on smart phone devices.