Original Author Paul Laughton, 2011
Page 147
De Re BASIC!
Miscellaneous Commands
Headset <state_nvar>, <type_svar>, <mic_nvar>
Reports if there is a headset plugged into your device, and returns data about the headset. The
parameters are all names of variables that receive the data:
<state_nvar>: 1.0 if a headset is plugged in, 0.0 if no headset is plugged in, and -1.0 if
unknown.
<type_svar>:
A string describing the device type of the last headset known to your device.
<mic_nvar>:
1.0 if the headset has a microphone, 0.0 if the headset does not have a
microphone, and -1.0 if unknown.
If you plug in or unplug a headset, new information becomes available. Your program must run the
Headset command again to get the update.
Notify <title_sexp>, <subtitle_sexp>, <alert_sexp>, <wait_lexp>
This command will cause a Notify object to be placed in the Notify (Status) bar. The Notify object
displays the BASIC! app icon and the <alert_sexp> text. The user taps the Notify object to open the
notification window. Your program's notification displays the <title_sexp> and <subtitle_sexp> text.
The code snippet and screenshots shown below demonstrate the placement of the parameter strings.
If <wait_lexp> is not zero (true), then the execution of the BASIC! program will be suspended until the
user taps the Notify object. If the value is zero (false), the BASIC! program will continue executing.
The Notify object will be removed when the user taps the object, or when the program exits.
Print "Executing Notify"
Notify "BASIC! Notify", "Tap to resume running program",~
"BASIC! Notify Alert", 1
! Execution is suspended and waiting for user to tap the Notify Object
Print "Notified"