Android Tutorial [Tool / Guide] B4X Master Studio – Interactive Training Manual & Visual Designer Simulator

Hi Everyone,

I would like to share a project created for both newcomers and seasoned developers in the B4X ecosystem: B4X Master Studio.

It is an interactive web-based training manual and visual simulator designed to explore and understand the modern B4X philosophy—especially B4XPages, the Visual Designer & Anchors, and B4J/B4A deployment workflows.

You can either run it instantly in your browser (no installation) or download and run it offline on your local computer using the provided 1-click batch launcher.

I will only show how to run it locally on you Windows PC:
How to Run It Locally on Your Windows PC (1-Click Launch)

If you prefer to keep and run it offline on your own machine, follow these simple steps:

Prerequisite:

You only need Node.js (LTS version) installed on your PC: Download Node.js here (Standard, free installer).

Installation & Running:

Download and unzip the project folder (e.g. B4XWEBTraining).
Inside the project folder, simply double-click run.bat.

What run.bat handles automatically for you:

Verifies that Node.js is present.
Installs all required dependencies on first launch (npm install).
Checks if port 3000 is occupied by an earlier session and automatically frees it (preventing EADDRINUSE errors).
Launches the local server and automatically pops open your default web browser at http://localhost:3000.

Tip: To stop the server when you are done, simply close the Command Prompt window or press Ctrl + C.

🚀 Features Included in the Studio

Interactive Visual Designer & Anchor Simulator:
Test how controls behave under LEFT, RIGHT, BOTH, TOP, and BOTTOM anchors when dynamically switching between phone portrait, tablet landscape, and desktop window sizes. Includes real-time AutoScaleAll simulation.

Environment Path Validator:
An interactive checker that verifies your paths to javac.exe (Java 19), android.jar, and B4A-Bridge, catching spaces in directory names and version mismatches before compiling.

8-Module Curated Curriculum:

Ecosystem & Philosophy (Native cross-compilation)
Setup & SDK Configuration
Visual Designer, Anchors & AutoScaleAll
Modern B4XPages Architecture (Eliminating Activity lifecycle issues)
Resumable Subs & Async Programming (Wait For, Sleep(0), HttpJob)
Cross-Platform Data Persistence (SQLite, DBUtils, DirInternal vs DirData)
End-to-End Task Manager Blueprint
Production Deployment (TargetSDK 34 Google Play AAB & B4JPackager11 Standalone EXE)

Forum Wisdom & Anti-Pattern Cheatsheet:
Side-by-side comparisons highlighting best practices from Erel and forum veterans (e.g., avoiding deprecated DoEvents, managing runtime permissions, and preventing memory leaks).

Interactive Inno Setup Script Generator:
Configures ready-to-compile .iss scripts to package your standalone B4J builds into professional Windows installers.

Feedback and suggestions are welcome!
I hope this provides a helpful reference and training resource for the B4X community.
 
Seems to not have attached the zip file. I have added it.
Installation Notes:
After unzipping (anywhere on your computer) run the run.bat file, the All-in-One 1 - Click Launcher, it will (should) install all the necessary to get it running. once completed, run the following in any browser: http://localhost:3000 and it should run the app.
(Note: Keep that Command Prompt window open while you use it. When you are finished and want to stop it later, just press Ctrl + C in that window).

Double-clicking run.bat handles the entire process automatically:
  • Checks for Node.js: Verifies if Node.js is installed (and provides the direct download link if it's not).
  • Auto-Installs Dependencies: Automatically detects if it's the first run and runs npm install for you.
  • Port Conflict Resolver: Detects if port 3000 is stuck or left open from an earlier session and frees it automatically so you never see EADDRINUSE again.
  • Starts the Server: Launches the development server.
  • Auto-Opens Your Browser: Opens your default browser directly to http://localhost:3000.
Should there be a port conflict use the following commands to get port 3000 release:
command line:
netstat -ano | findstr :3000
if it is not 3000 and another number, say it returned 14256 (or any other number) it means that is who is using port 3000.
use the following to kill it:

taskkill /F /PID 14256 (replace with the number you were given)
then run:
npm run dev

IF you do not want to use port 3000 then simply use the following in the command line: for another port number
set PORT=3005 && npm run dev //if you want to use port 3005
once it started then typ in browser:

Optional Dedicated Setup Script
Running the setup.bat file
If you prefer running installation separately before launching:
Double-clicking setup.bat checks versions, runs npm install, prepares your .env configuration, and offers to launch run.bat right away.

OR if you do not want to run the bat file simply do the following:
In the command line where the zip file has been extracted to, run the following commands
npm install
npm run dev
Open your browser to
Hope this will help with the installation.
Thanx
Lammie
 
You can only upload attachment up to 500kb for each file and with only some allowed file extensions.
 
I run a quick test. Here are my comments:
  1. You don't need to include node_modules. Just delete the folder (169MB) and zip the folder. You will get a file at 106KB only. Then use commands npm install and npm run dev.
  2. The first tab "Training Manual (8 modules)" does not show any contents. Not sure it is only my side.
  3. I read there is an inaccurate information about B4JPackager11.
B4X: Copy
    #CustomBuildConfig:
        ' Exclude unused Java modules to minimize exe package size
        b4jpackager11.IncludedModules = java.base, javafx.controls, javafx.fxml, java.sql
        b4jpackager11.ExeName = InventoryMaster.exe
        b4jpackager11.IconFile = ..Filesapp_icon.ico
    #End CustomBuildConfig

I think it should be something like this:
B4X: Copy
#Region CustomBuildConfig
#PackagerProperty: IncludedModules = jdk.charsets, jdk.crypto.ec
#PackagerProperty: ExeName = Demo
#PackagerProperty: IconFile = ..\Files\icon.ico
#End Region
 

Attachments

Why the modules were not showing is because there was an internal tab identifier mismatch between the navigation bar and the main view.
I have installed it on one of my other laptops and it seems to run now.
Thanx for the assistance so far.
 

Attachments

Back
Top