Free extension

CBIC Background Runner

A free extension for MIT App Inventor and Niotron. It runs your own procedures while the app is closed: later, every 15 minutes or more, at a set time, after the phone starts, or as a foreground task with a notification.

Free for any app, also apps you sell. Closed source. No network connection, no tracking.

Downloads

Check a file: sha256sum FILE (Linux), shasum -a 256 FILE (macOS), certutil -hashfile FILE SHA256 (Windows). The result must match the hash above.

Six rules

  1. Give the procedure name as text (for example "syncNow") and its arguments as a list. For a procedure with no inputs, use "create empty list".
  2. Every job has a name. A block with the same name replaces that job. Cancel, JobState and LastResult take the name.
  3. A background run has no screen. The procedure can use TinyDB, Web, File, Clock and similar components, and ShowNotification. It cannot use buttons, labels or other screen components. If it tries, the run fails with a clear error and the app does not crash.
  4. Build the app. Background jobs need a built app (APK or AAB). In the Companion each block gives a clear error.
  5. A job or alarm run can take up to 9 minutes, events such as Web.GotText included.
  6. JobFinished, JobFailed and ForegroundStopped reach the app only while it is open. For runs while the app was closed, read LastResult and JobState.

Blocks

BlockWhat it does
RunProcedureLaterRuns the procedure once, at least delayMinutes from now. Optional: only with a network.
RunProcedureEveryRuns the procedure every intervalMinutes (15 or more). Android can move runs to save battery.
RunProcedureAtRuns the procedure at a time (milliseconds or a Clock instant). repeatMinutes 0 = once, 1440 = every day.
RunProcedureAtStartupRuns the procedure each time the phone has started.
StartForeground, StartShortTaskStart a task with a notification and a Stop button (types dataSync and shortService). Call them while the app is open.
UpdateForeground, StopForegroundChange the notification text, or stop the task.
Cancel, CancelAll, JobsCancel one job or all jobs, or list the jobs.
JobState, LastResult, LastRunTimeScheduled, Running, Succeeded, Failed or Cancelled; the returned value or the error; the last run time.
AlarmTiming, CanScheduleExactAlarms, OpenExactAlarmSettingsShow if an alarm is exact, and open the "Alarms & reminders" page.
ShowNotification, CancelNotificationShow or remove a notification, also in background runs.
InBackground, ForegroundTaskNameTrue inside a background run; the task that runs now.
ExactAlarms (designer)Turn on only if the app needs the exact minute. Adds the exact-alarm permission.
JobFinished, JobFailed, ForegroundStoppedEvents in the open app.

Android behaviour you must know

Google Play

Permissions

Only the permissions of the blocks you use go into your app.

PermissionAdded when
RECEIVE_BOOT_COMPLETEDalways
ACCESS_NETWORK_STATERunProcedureLater, RunProcedureEvery
SCHEDULE_EXACT_ALARMExactAlarms on
FOREGROUND_SERVICE, WAKE_LOCKStartForeground, StartShortTask
FOREGROUND_SERVICE_DATA_SYNCStartForeground
POST_NOTIFICATIONSStartForeground, StartShortTask, ShowNotification

Tested

Tests of the 1.0.0 build (18 November 2026): the sample app built with the MIT App Inventor build server, on Android emulators.

AndroidResult
14 (API 34)Pass: app swiped away, one-time, chained, periodic and alarm jobs (also in Doze), foreground task, Stop button, short-task time limit, reboot. 0 crashes.
15 (API 35)Pass: app swiped away, jobs, alarm, foreground task, reboot. 0 crashes.
16 (API 36)Pass: same steps as Android 15. 0 crashes.

The 1.0 tester build, with the same engine, also passed on Android 12, 15 and 16 (MIT App Inventor build: force-stop, app update, battery saver, exact-alarm and notification permission changes) and on Android 15 and 16 (Niotron build).

Kodular and Android Builder: tested successfully by the Casagbic team.

Not tested: real phones (phone-maker battery savers are not covered), and Android 5 to 11.

Privacy and licence

The extension makes no network connection and collects nothing. It keeps each job's name, arguments, state and last result in your app's private storage on the phone. Details: privacy note.

Free for any app, including apps you sell, with no credit needed. You may share .aia projects that contain the extension. Do not decompile it or offer the .aix on other sites; link to this page. Full terms: licence (EULA).

Changes

1.0.0 (18 November 2026): first public release. Full changelog.

Help

Ask in the extension topic on your builder's community forum, or write to [email protected]. Send the builder and its version, the extension version, the phone model, the Android version, an image of your blocks, and a logcat filtered by CBICBackgroundRunner.