B4J Tutorials

[server] Run a Server on a VPS

The steps required to run a B4J server on a hosted server (such as a VPS) are:

1. Download Java...
 
Last edited:

[IoT] Linux Embedded Boards - Gettings started

There are many Linux based, embedded boards available. Most or all of them support Java which means that they also support B4J.

In order to start development we need to install Java JRE 7+ (JDK...
 
Last edited:

[IoT] Web Server Performance: Raspberry Pi 2 vs. Intel Edison vs. BeagleBone Black

I ran some tests to check how these boards perform as web servers.

The tests were similar to the tests done here and here.

Data was read and written to a SQLite database in wal mode...
 

[IoT] Welcome to the Internet of Things

This example demonstrates how the B4X tools can be used to create a solution with multiple types of components and communication channels.

See the following video (make sure to watch it in HD...
 

Attachments

  • IoTExample.zip
    29.1 KB · Views: 1,375

Creating 1D and 2D Barcodes using inline Java Code and the ITEXT library

The attached project uses inline Java code and the ITEXT library to create various types of 1D and 2D barcodes. The barcodes are store in a PDF file(s). Change the code in the B4J class or add...
 

Attachments

  • ITEXT_BARCODES.zip
    4.5 KB · Views: 840

[example] [B4X] Control the desktop with your phone

This example shows how simple it is to create network solutions with B4J, B4A and B4i.

In this case the network communication is based on UDP.

It implements a remote desktop mouse, where the...
 

Attachments

  • RemoteDesktopControl_B4J.zip
    2.6 KB · Views: 2,138
  • RemoteDesktopControl_B4A.zip
    9.3 KB · Views: 2,135
  • RemoteDesktopControl_B4i.zip
    4.1 KB · Views: 1,384
Last edited:

MonoBuilder - Compile B4J programs on Linux or Mac

Don't use this builder. It is no longer maintained.

Mono is a Mac / Linux port of .Net Framework: http://www.mono-project.com/

Using Mono it is possible use B4JBuilder, the command...
 
Last edited:

The Official Raspberry Pi Projects book

Free download here
 

[server] Http/2 Configuration

Attachments

  • Http2.zip
    1.3 KB · Views: 996
Last edited:

SplitPane Tutorial

B4J v4.00 adds support for SplitPane container. SplitPane is a container made of two or more sections divided with movable dividers.

The SplitPane orientation is either horizontal or vertical...
 

Attachments

  • SplitPane.zip
    8.5 KB · Views: 1,678

Msgbox / InputList

Simple message box:
B4X:
fx.Msgbox(MainForm, "This is the message", "This is the title")
SS-2015-12-17_12.19.19.png


Message box with result:
B4X:
...
 

[IoT] - Raspberry Pi CCTV with MQTT

Simple solution that uses an embedded MQTT broker with a MQTT client to send the camera output to any connected client. The camera used is the standard RPi camera module.

The program starts...
 

Attachments

  • PiCCTV_B4J.zip
    1.1 KB · Views: 951
  • PiCCTV_B4A.zip
    7.7 KB · Views: 858
Last edited:

[ABMaterial] Number of Data Grid Rows to Display

I work on a laptop (14" screen) as my primary screen.
I also have a 21 inch screen as my extended display (used for browser display mostly).

The Feedback example hard-coded the number of...
 

[ABMaterial] One Page, Many Uses

TripInspect.png


This example uses one ABM page to handle all tables listed under "Configure App".
In an effort to reduce code size (and maintenance), number of pages and duplicate methods, I am...
 
Last edited:

[ABMaterial] Populate a combo based on another selection

You may be thinking that I create these tutorials for myself. You may be right!!!
My RAM memory is very limited. Erel has offered (us) a place to securely store them (he is so kind) for future...
 

Remote control Raspberry Pi with Tablet via Bluetooth.

Based on various tutorials and posts, I have made this remote control for my RPi.
Hardware required: Tablet with 1200 x 800 resolution (can be reduced by changing the layout file) and Bluetooth...
 

Attachments

  • Windsonic_server.zip
    1.9 KB · Views: 347
  • winsonic_client.zip
    86 KB · Views: 377
  • windsonic_client.png
    windsonic_client.png
    36.3 KB · Views: 443
Last edited:

[server] Automatic Reconnecting WebSocket

When working with WebSocket handlers the client maintains an online connection. The connection is expected to be kept alive for as long as needed.

However there are cases where the connection can...
 

Attachments

  • GuessMyNumberWithReconnection.zip
    9.4 KB · Views: 1,350

[ABMaterial] One Page - Subs required

Continuing the One Page, Many Uses example, here we demonstrate how to create and collect the events raised for each Type (Employee, Vehicle, User, etc).

The module form is getting rather large...
 

[ABMaterial] and SEO (Search Engine Optimization)

seo.png


I got and interesting question from Herbert asking how ABMaterial for B4J coped with SEO-optimization. As a lot of other...
 

[ABMaterial] Showcase (one to many table relation)

TripInspect_inspects.png
This example shows a Master (Vehicle ID) - detail (Group ID) - detail (Item id)
The fixed footer controls the Master grid (VEHICLE). Each detail is based on the...
 
Last edited:
Top