Telecom

Programs that run under RFO-BASIC! can telecommunicate by managing connections in the following services:
 * The cell telephone
 * Texts using the Simple Message Service (SMS)
 * Email

The first two types of statement might not be available. The prerequisites are as follows:
 * The Android device must be a cell phone with a working connection to a cellular network.
 * Operation of the cell phone and of SMS requires Android permissions. The user is asked to grant RFO-BASIC! these permissions after installing RFO-BASIC!.  The user is free not to grant the permissions.
 * The SMS statements are not available in RFO-BASIC! versions 1.92gp nor 1.92.1 (see the Main Page), because the Google Play Store no longer hosts applications that can send SMS messages.

Cell telephone
RFO-BASIC! statements let a program send a phone number to the dialer app and detect an incoming call, subject to the prerequisites listed in this article's Introduction. They do not let a BASIC program conduct a call, such as with text-to-speech and speech-to-text. You can write a custom phone dialer or a program that alerts the user that a call is arriving. Usually, the user would then use the phone app shipped with the device.

MYPHONENUMBER
Determine the device's phone number

MYPHONENUMBER 
 * Synopsis

The MYPHONENUMBER statement returns in  the phone number of the Android device. If the device is not a telephone or is not connected to a cellular network, the value returned is undefined.
 * Description

Dialing the phone
Place a phone call

PHONE.CALL  PHONE.DIAL 
 * Synopsis

These two statements place a phone call. The number to call is in the string expression. The digits of this string must include the exact digits to dial, including access code, country code, area code, and so on.
 * Description

The PHONE.CALL statement dials the phone directly. The BASIC program would next monitor the state of the phone, using the statements described in the next section.

The PHONE.DIAL statement feeds the phone number to the device's dialer app. The dialer app is opened and gets control of the Android screen. If someone picks up the phone on the other end, the local user can have a conversation using the dialer app. When the call is complete, BASIC regains control of the Android screen.

If  contains letters, they are converted to numbers according to the keytop legends on American phones:

Detecting phone state
PHONE.RCV.INIT PHONE.RCV.NEXT , 
 * Synopsis

The cell phone can be in one of three states: Idle (0), ringing (1), and call-in-progress (2).
 * Description

To monitor the phone state, the RFO-BASIC! program uses the PHONE.RCV.INIT statement. This starts a listener task that detects changes in the phone state. The listener task remains active until the program exits.

Assuming the listener task is operating, the RFO-BASIC! program uses the PHONE.RCV.NEXT statement. It returns in  one of three values according to the phone state: