Original Author Paul Laughton, 2011
Page 131
De Re BASIC!
Phone.dial <sexp>
Open the phone dialer app. The phone number contained in the string expression will be displayed in
the dialer. Alphabetic characters in the string will be converted to digits, as if the corresponding key of a
phone pad had been touched.
Phone.rcv.init
Prepare to detect the state of your phone. If you want to detect phone calls using Phone.rcv.next, or
you want Phone.info to attempt to report signal strength, you must first run this command.
Phone.rcv.init starts a background "listener" task that detects changes in the phone state. There is no
command to disable this listener, but it is stopped when your program exits.
Phone.rcv.next <state_nvar>, <number_svar>
The state of the phone will be returned in the state numeric value. A phone number may be returned in
the string variable.
State = 0. The phone is idle. The phone number will be an empty string.
State = 1. The phone is ringing. The phone number will be in the string.
State = 2. The phone is off hook. If there is no phone number (an empty string) then an outgoing call is
being made. If there is a phone number then an incoming phone call is in progress.
States 1 and 2 will be continuously reported as long the phone is ringing or the phone remains off hook.
Sms.send <number_sexp>, <message_sexp>
The SMS message in the string expression <message_sexp> will be sent to number in the string
expression <number_sexp>. This command does not provide any feedback about the sending of the
message. The device must be connected to a cellular network to send an SMS message.
Sms.rcv.init
Prepare to intercept received SMS using the sms.rcv.next command.
Sms.rcv.next <svar>
Read the next received SMS message from received SMS message queue in the string variable.
The returned string will contain "@" if there is no SMS message in the queue.
The sms.rcv.init command must be called before the first sms.rcv.next command is executed.
Example:
SMS.RCV.INIT
DO