Main Page
Manual contents (Statement index) | |
---|---|
Language features | The basics • Arrays • Data structures • Interrupt routines • User-defined functions |
Interfaces | Audio player • Bluetooth • Files • Graphics • HTML • Keyboard • Sockets • SQL |
Programming notes | Coexisting with Android |
Welcome! This wiki documents RFO-BASIC! versions 1.91/1.92/1.92.1, a BASIC interpreter that runs on Android, with a program text editor, that lets old-style programmers quickly write apps with access to most of the device's features, including web surfing, telephony, and texting. This manual is based on the published manual, plus comments the community has provided on the Forum.
Pages of this wiki will be written gradually and will be based on the existing manual, on personal observations, on study of the examples in the distribution kit, and on discussions on the Forum. Any given assertion might not yet have been reviewed by anyone with detailed knowledge of the code. It may give you additional insight but you rely on it at your own risk. This website is not complete until we say it is!
This wiki contains an overview article, which is a useful place to start reading.
To make suggestions or report mistakes, click on "Discussion" at the top of the article in question, to edit that article's talk page; or use the Forum. This is a wiki that anyone can edit. However, if English is not your native language, please comment on the Discussion page, adding links to relevant Forum discussions or bug reports, and allow me to shine it up.
Running RFO-BASIC! programs[edit]
Apps written in RFO-BASIC! can be activated in one of two ways:
- You can sideload the APK file for RFO-BASIC! and install it on the Android device. Then run it and give it the permissions it requests. This is not as scary as it seems; for example, RFO-BASIC! does not need to send texts, but it requests that permission so that BASIC programs can do so (with the SMS statements[1]).
A BASIC source file can be transferred to the Android device in any desired way, such as with Bluetooth, web transfer, or thumbdrive. BASIC code can also be written using the text editor in RFO-BASIC!.
Once both RFO-BASIC! and the BASIC source program are on board, you can run the program in one of the following ways:- Start RFO-BASIC, select Load and run on the pulldown menu, and specify the name of the BASIC source program.
- Installing RFO-BASIC! adds a widget that lets you associate a BASIC source program with a graphic and places the graphic on the home screen. The Android device will run the BASIC program whenever you touch the graphic.
- Using the program shown below, you can develop the BASIC program on a PC and create an APK file that includes both the RFO-BASIC! interpreter and the BASIC program. This APK file can be sideloaded onto the Android device.
APK files created using option 2 above are not "shrink-wrapped" programs. A user of the APK file could view or change the BASIC code by renaming APK to ZIP and then exploring the file.
Newer versions[edit]
- Version 1.92
In 2019, Google imposed new requirements on publishing APK files created using option 2 above on the Google Play Store. RFO-BASIC! version 1.91 used API 18 as the target Android version, but Google requires that apps published on the Play Store must target Android API Level 26. RFO-BASIC! version 1.92, published in April 2019, runs on API Level 27 (Android 8/Oreo). It can run on API Level 28 (Android 9/Pie) but some commands fail.
Additional changes in version 1.92 are as follows:
- On installation, the procedure to grant RFO-BASIC! various Android permissions is different.
- The user interface uses Japanese if that is the locale specified for the Android device.
- The SMS statements (to send or receive texts)[1] are no longer supported in the Google Play Edition, but are supported in the Full Edition.
- The documentation of the NOTIFY statement (to place a notification in the Android Status Bar)[1] mentions that it will deliver different results on different versions of Android.
- Version 1.92.1
A version called 1.92-gp (Google Play) was prepared, limited to meet Google's restrictions on the Play Store, but was never put into the Play Store because bugs remained, primarily related to changes Google made to programs that used the Apache library.
On 30-Jul-20, Mougino prepared version 1.92.1. It omitted the SMS statements, packaged in the GW user-interface library and a new Sample Programs/f41_gw_gui.bas
as an introduction, revised and corrected Sample Programs/f01_commands.bas
, and fixed the crash in the DEVICE statement in API 22 and newer. It targets API 29.
The package name is com.rfo.Basic
because com.rfo.basic
already exists in the Play Store. This means it could coexist with the other "current versions," and a BASIC program running under 1.92.1 could run concurrently with a BASIC program running under another current version. You should rename the rfo-basic
directory before installing the version 1.92.1, in order to preserve work done under the old version.
Alternatives to version 1.92 are to use one of the private versions of RFO-BASIC!, such as hBasic or Oli-BASIC, or special instructions to the APK compiler.
Resources[edit]
Implementors are welcome to modify the web addresses in this list if their projects move.
- RFO-BASIC! software as of July 2020
- Version 1.92.1 (see above)
- RFO-BASIC! software as of April 2019
- Version 1.92 (see above)
- Full release notes have not yet been completed.
- RFO-BASIC! software as of March 2017
- The official RFO-BASIC! version 1.91 (an .APK that can be sideloaded into an Android device and then installed)
- The official version 1.91 manual, De Re BASIC!
- An incomplete tutorial based on version 1.71
- Private versions
Several users have taken RFO-BASIC! further and published newer versions. This wiki describes areas in which they have done additional work, but does not document their versions.
- The hBasic edition and its documentation are available at the hBasic repository, http://humpty.drivehq.com/promotes/rfo-basic/hbasic/repository/index.html — This includes:
- v2.60, 15-May-19, which has been successfully compiled for Android API 28
- v2.92, 3-Mar-20, updated to target Android API 29, with a flag in the Manifest to specify the traditional file-storage scheme instead of Scoped Storage
- v2.93, 1-Apr-20, updated to ensure that the DEVICE.OS statement returns a usable result
- v3.00, 19-Jul-20, built to support Scoped Storage (no Manifest option); has a fix to the SENSORS statement to support devices with Android 10.
- v3.04, 14-Feb-21, targets Android 11, built with API 30. Announced in the Forum.
- OLI-BASIC (version 20) with examples
- OLI-BASIC (version 21, 23-Dec-17)
- OLI-BASIC (preview of version 30, targets Android API 28)
- 8-Feb-21 preview of version 30; bug fixes; API is an attachment to this thread.
- GW library
The GW library is Mougino's user-defined functions that create user-interface objects to make it easy to write an app. Download information for version 5.4 (5-Feb-21) is available through the RFO-Basic! Forum.
- Other support software
This wiki contains the documentation for the following user-defined function, which anyone is welcome to include in BASIC programs:
For more support software, visit the Tools for BASIC! topic on the Forum
- RFODESIGNER — Integrated Development Environment to develop BASIC programs and APKs on the PC for sideloading
- Launcher — Mougino's software that lets you write BASIC code on the PC and then transfer it and execute it on your Android device
- Other helpful information
- The Forum of users of RFO-BASIC!
- A page of Frequently Asked Questions (FAQ) on the Miraheze wiki farm that hosts this guide
- The MediaWiki help center: How to edit a website like this one
Sources[edit]
- Forum 4408: Hot summer of code: Meeting the new Play Store requirements
- Forum 4969: Version v01.91 released
- Forum 6074: Downloading Basic! [Version 1.92.1]
- Forum 5472: BLE support (Development of Grau-BASIC)
- Forum 5609: hBasic v2.00 released
- Forum 5669: hBasic v2.30 released
- Forum 6073: hBasic v3.00 released