background image
Original Author Paul Laughton, 2011
Page 149
De Re BASIC!
If <nexp> = -1 then the pattern will play once and not repeat.
If <nexp> = 0 then the pattern will continue to play over and over again until the program ends.
If <nexp> > 0 then the pattern play will be cancelled.
See the sample program, f21_sos.bas, for an example of Vibrate.
VolKeys
Certain keys and buttons have special meaning to your Android device. By default, BASIC! propagates
these special keycodes to the Android system, even if your program detects them. So, for example,
when you press the "Volume Up" button, your program can catch it (see INKEY$), but you still see the
Volume Control window open on your screen, and your audio gets louder.
The VolKeys.off and VolKeys.on commands let you control this behavior for five keys. These keys may
be on the Android device or on a headset plugged into the device.
Key Name
(Android docs)
Key Code
(decimal)
Usual Action
VOLUME_UP
24
Increase speaker volume
VOLUME_DOWN
25
Decrease speaker volume
VOLUME_MUTE
164
Mute the speaker (Android 3.0 or later)
MUTE
91
Mute the microphone
HEADSETHOOK
79
Hang up a call, stop media playback
VolKeys.off
Disables the usual action of the keys listed in the VolKeys table, above. Your program can still detect
these keypresses, but BASIC! does not pass the events on to the Android system.
VolKeys.on
Enables the usual action of the keys listed in the VolKeys table, above. This is the default setting when
your BASIC! program starts.
SQLITE
Overview
The Android operating system provides the ability to create, maintain and access SQLite databases.
SQLite implements a
self-contained
,
serverless
,
zero-configuration
,
transactional
SQL database engine.
SQLite is the
most widely deployed
SQL database engine in the world. The full details about SQLite can
be found at the
SQLite Home Page (http://www.sqlite.org/)
.
An excellent online tutorial on SQL can be found at
www.w3schools.com
(http://www.w3schools.com/sql/default.asp)
.
Database files will be created on the base drive (usually the SD card) in the directory, "<pref base
drive>/rfo-basic/databases/ ".