B4J Tutorials

[Server] Send and receive objects

This is an old example. Better use B4XSerializator to serialize objects.

One of the nice things about using B4J server as the backend of B4A applications is that you can send and receive...
 
Last edited:

Companion thread to B4J Training Video 5 - Bridge Scripts

As promised in this the B4J Training Video about the Bridge, I am attaching the scripts for running the Bridge from Mac or Raspberry Pi (Linux):

Mac:
1) Create a file called bridge.sh
2) Insert...
 
Last edited:

(B4X) Creating LAMP server with b4x on Amazon EC2

LAMP: Linux Apache MySQL PHP

In this tutorial I will explain how to bring complete working server, on Amazon EC2 (you get 1 year free)

I am using this server for sending notification for iphone...
 

[WebApp][IoT] PiFace (Raspberry Pi) Server Example

SS-2014-04-17_10.51.25.png


This example demonstrates how a Raspberry Pi board can be controlled from the browser.

It tracks the switches state and...
 

Attachments

  • PiFaceServer.zip
    6 KB · Views: 1,326

where to code put code when using multiple forms

I've started using B4J after using B4A for a few months. What is the best structure of the code when using multiple forms. Unlike B4A where each activity has its own code, or indeed with vb.net...
 

[IoT] Headless Raspberry Pi

During my building of a security camera for my wife's mall store and prep for projects with my personal RPi and PiFace, I quickly discovered that having a headless RPi would be nice.

What is a...
 
Last edited:

TreeView Tutorial

B4J v1.05 adds support for the TreeView node.

TreeView as it name suggests visualizes a tree structure.

Each item in the TreeView is a TreeItem (or CheckBoxTreeItem). Each item has a list of...
 

GameView - Simple Sprites Engine

Attachments

  • jGameViewHelper.zip
    5.6 KB · Views: 1,259
  • Asteroids.zip
    244.3 KB · Views: 1,229
Last edited:

Modal dialogs

B4J allows you to show modal dialogs or modal forms.
The difference between a modal form to non-modal form is that with a modal form the calling code will only continue after the form is closed...
 

Attachments

  • ModalExample.zip
    2 KB · Views: 2,052
Last edited:

B4J tutorial for Basic4android developers

B4J development tool is similar to Basic4android. The language and IDE are mostly identical.

The APIs (methods, keywords and libraries) are identical in some cases and different in other cases...
 

FlickrViewer

SS-2013-11-13_12.43.15.jpg


This example downloads an html page, parses it and finds the image links. It then uses a class named ImageDownloader to...
 

Attachments

  • FlickrViewer.zip
    3.2 KB · Views: 1,038

AsyncStreamsObject - Send and receive objects over the network

For new projects it is recommended to use B4XSerializator instead of this solution.



SS-2013-11-14_13.26.52.png


AsyncStreamsObject allows you...
 

Attachments

  • AsyncStreamsObject.zip
    4.1 KB · Views: 3,321
Last edited:

Synchronize ListView Scrolling

Attachments

  • LVSyncClass.zip
    2.8 KB · Views: 540
  • LVSync-2.zip
    3.1 KB · Views: 504
Last edited:

Customized ListView

Use xCustomListView instead.
 
Last edited:

[Server] Regex Tool

Attachments

  • regex.zip
    2.4 KB · Views: 975

[WebApp] Quiz Example

B4J HelloWorld(s) Examples

As a helper to get started with B4J, some classical HelloWorld type of apps.
B4J offers many solutions in the way an app(lication) can be developed.

Status: 20150502

Below examples...
 

Attachments

  • B4JHowToHelloWorlds.zip
    23.4 KB · Views: 1,477
Last edited:

In-line Java in multiple modules

I have been using the in-line java for ages and only just discovered that you do not have to put all the code in one module, as I was previously doing.
It can be placed in the module to which it...
 

Attachments

  • java code modules test.zip
    1.6 KB · Views: 456

Use Timelines to 'slide' listviews

Using timelines, it's possible for two (or more if you change code) listviews to occupy the same space on a form.
This demo will slide one listview, revealing the hidden listview. (A bit like...
 

Attachments

  • sliding listviews.zip
    1.9 KB · Views: 490

Nodes / Views / Controls - Tips

I'll try to collect tips related to the UI elements in this thread.

In B4J (and JavaFX) the main UI element is named Node. It is similar to Basic4android View or Basic4ppc (.Net) Control.

B4J...
 
Top